% From "Glaeser's Dominoes":
% http://www.math.grin.edu/~rebelsky/ProblemSolving/Problems/glaesers-dominoes.html
% """
% [From Thinking Mathematically, p. 172]
%
% George Glaeser of Strasbourg put a set of dominoes more or less randomly
% in a flat tray and took a photograph. The exposure was not correct, and
% although the numbers can be discerned, the positions of the individual
% dominoes cannot.
%
% Each domino is a rectangle composed of two adjacent squares, each with a
% number. In the set there is only one domino with each combination of
% numbers from the numbers 0 through 6. For example, there is one domino
% with 2,3, and one with 4,4.
%
% Can you reconstruct the dominoes?
% """
%
% Note: This has 8 rows and 7 columns (it use to be the other way around).
r = 8;
c = 7;
high = 6;
board = array2d(1..r, 1..c,
[
3,6,2,0,0,4,4,
6,5,5,1,5,2,3,
6,1,1,5,0,6,3,
2,2,2,0,0,1,0,
2,1,1,4,3,5,5,
4,3,6,4,4,2,2,
4,5,0,5,3,3,4,
1,6,3,0,1,6,6
])
;