Skip to content →

Category: featured

a Da Vinci chess problem

2005
was the year that the DaVinci code craze hit Belgium. (I started reading Dan Brown’s
Digital Fortress and Angels and Demons a year
before on the way back from a Warwick conference and when I read DVC a
few months later it was an anti-climax…). Anyway, what better way
to end 2005 than with a fitting chess problem, composed by Noam Elkies

The problem is to give an infinite sequence
of numbers, the n-th term of the sequence being the number of ways White
can force checkmate in exactly n moves. With the DVC-hint given, clearly
only one series can be the solution… To prove it, note that
White’s only non-checkmating moves are with the Bishop traveling
along the path (g1,h2,g3,h4) and use symmetry to prove that the number
of paths of length exactly k starting from h2 is the same as those
starting from g3…

If that one was too easy for you,
consider the same problem for the position

Here the solution are the 2-powers of those
of the first problem. The proof essentially is that White has now two
ways to deliver checkmate : Na6 and Nd7… For the solutions and
more interesting chess-problems consult Noam Elkies’ excellent
paper New directions in
enumerative chess problems
. Remains the problem which sequences can
arise on an $N \\times N$ board with an infinite supply of chess
pieces!

Leave a Comment

bivalue Sudoku graphs

Here is
a ‘difficult but not unsolvable’ Sudoku from David Eppstein‘s paper Nonrepetitive paths and cycles
in graphs with application to Sudoku
.

$\begin{sudoku-block} |5| | | | |1| | |8|. | | | | | | |6| | |.
| | | | |6|2|5|7| |. | |9| |2| |5|1| | |. | | |4| |1| |3| | |. | |
|8|3| |9| |2| |. | |7|6|9|8| | | | |. | | |5| | | | | | |. |8| | |1|
| | | |3|. \end{sudoku-block}y1 $

As always I try to solve
Sudokus without having to use backtracking (that
is, making a guess and working from there on to a solution or a
contradiction in which case one uses the other option). Clearly, this is
not well defined. When one starts solving Sudokus one often resorts to
backtracking but after a while one discovers rules which seem to avoid
backtracking (but in a sense are still). For example, if two cells in a
same block (or row or column) can only be filled with two numbers one
can use this fact by forbidding other numbers to occupy those cells.
However, this is a mini-backtracking strategy. Still, I allow all such
rules. More precisely, any formal rule is non-backtracking in my
dictionary. In Eppstein’s paper there is a good summary of the rules
most people apply when starting a Sudoku. He calls them the ‘local
rules’. Here they are

  • If a digit x has only one remaining
    cell that it can be placed in, within some row, column, or square, then
    we place it in that cell. Any potential positions of x incompatible with
    that cell (because they lie in the same row, column, or square) are
    removed from future consideration.
  • If a cell has only one
    digit x that can be placed in it, we place x in that cell. Incompatible
    positions for x are removed from future consideration.
  • If
    some three cells, formed by intersecting a row or column with a square,
    have three digits whose only remaining positions within that row,
    column, or square are among those three cells, we prevent all other
    digits from being placed there. We also remove positions for those three
    forced digits outside the triple but within the row, column, or square
    containing it.
  • If the cells of a square that can contain a
    digit x all lie in a single row or column, we eliminate positions for x
    that are outside the square but inside that row or column. Similarly, if
    the cells that can contain x within a row or column all lie in a single
    square, we eliminate positions that are inside that square but outside
    the row or column.
  • If two digits x and y each share the same
    two cells as the only locations they may be placed within some row,
    column, or square, then all other digits must avoid those two cells.
  • If the placement of digit x in cell y can not be extended to a
    placement of nine copies of x covering each row and column of the grid
    exactly once, we eliminate cell y from consideration as a placement for
    x.
  • If the placement of a digit x in cell y within a single
    row, column, or square can not be extended to a complete solution of
    that row, column, or square, then we eliminate that placement from
    consideration.

But even if one manages to use all
these rules (and frankly I only use a subset) one might get stuck. I
don’t know how many cells you can fill in the above problem with these
local rules, I’m afraid I only managed $5 $… At such
moments, the bivalue Sudoku-graph may come in handy. Eppstein defines
this as follows

In this graph, we create a vertex
for each cell of the Sudoku grid that has not yet been filled in but for
which we have restricted the set of digits that can fill it to exactly
two digits. We connect two such vertices by an edge when the
corresponding two cells both lie in a single row, column, or square, and
can both be filled by the same digit; the label of the edge is the
digit they can both be filled by.

Eppstein then goes
on to define new rules (each of which is a mini-backtracking strategy)
which often help to crack the puzzle. Here are Eppstein’s ‘global
rules’

  • If an edge in the bivalue graph belongs to a
    nonrepetitive cycle, the digit labeling it must be placed at one of its
    two endpoints, and can be ruled out as a potential value for any other
    cell in the row, column, or square containing the edge.
  • If
    the bivalue graph has a cycle in which a single pair of consecutive
    edges has a repeated label, that label can not be placed at the cell
    shared by the two edges, so that cell must be filled by the other of its
    two possible values.
  • If the bivalue graph contains two
    paths, both starting with the same label from the same cell, both
    ending at cells in the same row, column, or square, and such that in the
    two ending squares the values not occurring on the incident edge labels
    are equal, then the cell at the start of the paths can not be filled by
    the start label of the paths, and must be filled by the other of its two
    possible values.

For example, in the above problem it
is not hard to verify that the indicated places X,Y and Z form a
nonrepetitive cycle in the bivalue graph so applying the first global
rule we have two choices of filling these places (one leading to a
solution, the other to a contradiction)

$\begin{sudoku-block} |5| | | | |1| | |8|. | | | | | | |6| | |.
| | | | |6|2|5|7| |. | |9| |2| |5|1| | |. | | |4| |1| |3| | |.
|X|Y|8|3| |9| |2|Z|. | |7|6|9|8| | | | |. | | |5| | | | | | |. |8| |
|1| | | | |3|. \end{sudoku-block}y2 $

In fact, it turns out
that making this choice is enough to solve the puzzle by simple local
rules. So, if I change the original puzzle by filling in the cell X

$\begin{sudoku-block} |5| | | | |1| | |8|. | | | | | | |6| | |.
| | | | |6|2|5|7| |. | |9| |2| |5|1| | |. | | |4| |1| |3| | |. |6|
|8|3| |9| |2| |. | |7|6|9|8| | | | |. | | |5| | | | | | |. |8| | |1|
| | | |3|. \end{sudoku-block}y3 $

you will have no problem
solving the puzzle.

Leave a Comment

a 2006 chess puzzle anyone?

Noam Elkies is one of
those persons I seem to bump into (figuratively speaking) wherever my
interests take me. At the moment I’m reading (long overdue, I
know, I know) the excellent book Notes on
Fermat’s Last Theorem
by Alf Van der
Poorten
. On page 48, Elkies figures as an innocent bystander in the
1994 April fools joke e-perpetrated by
Henri Darmon
in the midst of all confusion about ‘the
gap’ in Wiles’ proof.

There has
been a really amazing development today on Fermat’s Last Theorem.
Noam Elkies has announced a counterexample, so that FLT is not true
after all! He spoke about this at the institute today. The solution to
Fermat that he constructs involves an incredibly large prime exponent
(larger than $10^{20}$), but it is constructive. The main idea seems to
be a kind of Heegner-point construction, combined with a really
ingenious descent for passing from the modular curves to the Fermat
curve. The really difficult part of the argument seems to be to show
that the field of definition of the solution (which, a priori, is some
ring class field of an imaginary quadratic field) actually descends to
$\\mathbb{Q}$. I wasn’t able to get all the details, which were
quite intricate…

Elkies is also an
excellent composer of chess problems. The next two problems he composed
as New Year’s greetings. The problem is : “How many shortest
sequences exists (with only white playing) to reach the given
position?”

$\\begin{position}
\\White(Kb5,Qd1,Rb1,Rh1,Nc3,Ne5,Bc1,Bf1,a2,b2,c4,d2,e2,f3,g3,h2)
\\end{position}{\\font\\mathbb{C}hess=chess10 \\showboard
}xc $

Here’s Elkies’ solution
:

There are 2004 sequences of the minimal length 12.
Each consists of the sin- gle move g3, the 3-move sequence
c4,Nc3,Rb1, and one of the three 8-move sequences
Nf3,Ne5,f3,Kf2,Ke3,Kd3(d4),Kc4(c5),Kb5. The move g3 may be played at
any point, and so contributes a factor of 12. If the King goes
through c5 then the 3- and 8-move sequences are independent, and can
be played in $\\binom{11}{3}$ orders. If the King goes through c4 then
the entire 8-move sequence must be played before the 3-move sequence
begins, so there are only two possibilities, depending on the choice
of Kd3 or Kd4. Hence the total count is $12(\\binom{11}{3}+2)=2004$ as
claimed.

A year later he composed the
problem

$\\begin{position}
\\White(Kh3,Qe4,Rc2,Rh1,Na4,Ng1,Bc1,Bf1,a2,b2,c3,d3,e2,f4,g2,h2)
\\end{position}{\\font\\mathbb{C}hess=chess10 \\showboard
}xd $

of which Elkies’ solution is
:

There are 2005 sequences of the minimal length 14.
This uses the happy coincidence $\\binom{14}{4}=1001$. Here White
plays the 4-move sequence f4,Kf2,Kg3,Kh3 and one of the five
sequences Nc3,Na4,c3,Qc2,Qe4,d3,Bd2(e3,f4,g5,h6),Rc1,Rc2,Bc1 of
length 10. If the Bishop goes to d2 or e3, the sequences are
independent, and can be played in $\\binom{14}{4}$ orders. Otherwise
the Bishop must return to c1 before White plays f4, so the entire
10-move sequence must be played before the 4-move sequence begins. Hence
the total count is $2 \\binom{14}{4}+3 =
2005$.

With just a few weeks remaining, anyone in for
a 2006 puzzle?

Leave a Comment