Posts Tagged ‘ sudoku ’

simulated annealing for Sudokus [2]

March 16, 2012
By
simulated annealing for Sudokus [2]

On Tuesday, Eric Chi and Kenneth Lange arXived a paper on a comparison of numerical techniques for solving sudokus. (The very Kenneth Lange who wrote this fantastic book on numerical analysis.) One of these techniques is the simulated annealing approach I had played with a long while ago.  They seem to use the same penalisation

Read more »

Le Monde puzzle [#755?]

January 27, 2012
By
Le Monde puzzle [#755?]

Le Monde puzzle of last weekend was about sudoku-like matrices. Consider an (n,n) matrix containing the integers from 1 to n². The matrix is “friendly” if the set of the sums of the rows is equal to the set of the sum of the columns. Find examples for n=4,5,6. Why is there no friendly matrix

Read more »

1500th, 3000th, &tc

January 7, 2012
By
1500th, 3000th, &tc

As the ‘Og reached its 1500th post and 3000th comment at exactly the same time, a wee and only mildly interesting Sunday morning foray in what was posted so far and attracted the most attention (using the statistics provided by wordpress). The most visited posts: Title Views Home page 203,727 In{s}a(ne)!! 7,422 “simply start over

Read more »

The fun Package: Use R for Fun!

August 16, 2011
By
The fun Package: Use R for Fun!

A couple of days ago we released a package named fun to CRAN, but I did not dare to send an announcement to [email protected] as usual. This package is a collection of some classical computer games (e.g. the Mine sweeper and Five in a row) as well as other funny stuff. Some examples: ## install.packages('fun')

Read more »

Surprising sudoku

March 1, 2011
By
Surprising sudoku

> printSudoku(z) +-------+-------+-------+ |   9   |       | 7   5 | |     6 |       |   9   | | 4 5 3 | 1 7   | 2 8   | +-------+-------+-------+ |     5 |     7 |   6   | | 1   9 | 6 8   |       | |   8   |   3   |     1 | +-------+-------+-------+ | 7   2 |

Read more »

Le Monde puzzle [#5]

February 10, 2011
By
Le Monde puzzle [#5]

Another Sudoku-like puzzle from the weekend edition of Le Monde. The object it starts with is a 9×9 table where each entry is an integer and where neighbours take adjacent values. (Neighbours are defined as north, west, south and east of an entry.) The question is about whether or not it is possible to find

Read more »

Le Monde puzzle [52]

December 31, 2010
By
Le Monde puzzle [52]

The last puzzle of the year in Le Monde reads as follows (as far as I understand its wording!): Iter(n,x,y) is the function Iter=function(n,x,y){ if (n==1){ output=trunc(y/10)+x*(y%%10) }else{ output=Iter(n-1,x,Iter(1,x,y))} return output } Find the seven-digit number z such that Iter(6,1,z)=12, Iter(6,2,z)=19, Iter(6,3,z)=29, and Iter(6,-1,z)=Iter(6,-2,z)=Iter(6,-3,z)=0. Obviously, the brute-force solution of listing all 90 million seven digit

Read more »

Le Monde puzzle [42]

October 24, 2010
By
Le Monde puzzle [42]

An interesting suduko-like puzzle for this week puzzle in Le Monde thi A 10×10 grid is filled by a random permutation of {0,…,99}. The 4 largest figures in each row are coloured in yellow and the 4 largest values in each column are coloured in red. What is the range of the number of yellow-and-red

Read more »

Random sudokus [p-values]

May 21, 2010
By
Random sudokus [p-values]

I reran the program checking the distribution of the digits over 9 “diagonals” (obtained by acceptable permutations of rows and column) and this test again results in mostly small p-values. Over a million iterations, and the nine (dependent) diagonals, four p-values were below 0.01, three were below 0.1, and two were above (0.21 and 0.42).

Read more »

Random [uniform?] sudokus [corrected]

May 19, 2010
By
Random [uniform?] sudokus [corrected]

As the discrepancy in the sum of the nine probabilities seemed too blatant to be attributed to numerical error given the problem scale, I went and checked my R code for the probabilities and found a choose(9,3) instead of a choose(6,3) in the last line… The fit between the true distribution and the

Read more »