TAOCP 7.2.2.2 Exercise 112

The tomography problem of Fig.

Section 7.2.2.2: Satisfiability

Exercise 112. [46] [46] Exactly how many solutions does the tomography problem of Fig. 36 have?

Verified: no
Solve time: 2m04s


Setup

The tomography problem of Fig. 36 asks for the number of $25\times 30$ binary arrays $(x_{i,j})$ satisfying the prescribed row, column, and diagonal sums. The variables are

$$ x_{i,j}\in{0,1},\qquad 1\leq i\leq25,\quad 1\leq j\leq30 . $$

The constraints are

$$ r_i=\sum_{j=1}^{30}x_{i,j}, \qquad 1\leq i\leq25, $$

$$ c_j=\sum_{i=1}^{25}x_{i,j}, \qquad 1\leq j\leq30, $$

together with the two families of diagonal sums

$$ a_d=\sum_{i+j=d+1}x_{i,j}, \qquad 0<d<25+30, $$

and

$$ b_d=\sum_{i-j=d-30}x_{i,j}, \qquad 0<d<25+30. $$

Thus the question is to determine the cardinality of the set

$$ \left{(x_{i,j})\in{0,1}^{750}: (x_{i,j})\text{ satisfies all of the above equations}\right}. $$

The problem is a finite counting problem. A complete solution requires either an exhaustive enumeration with a verifiable counting argument, or a mathematical derivation of the exact cardinality.

Known results

The data in Fig. 36 correspond to the digital tomography reconstruction problem for the $25\times30$ "Cheshire cat" image. Knuth explains that the instance consists of

$$ 25+30+54+54=163 $$

simultaneous linear equations in

$$ 25\cdot30=750 $$

binary variables.

The constraints are strong enough that the original picture is recognizable, but they do not determine the image uniquely. Knuth states that the instance has "many billions of solutions," and he presents Fig. 37 as an illustration of alternative solutions.

The problem can be encoded as a SAT instance by translating the cardinality constraints into clauses. For the Fig. 36 instance, Knuth describes an encoding with approximately $40,000$ clauses, $9,000$ variables, and about $100,000$ literals. Such encodings permit enumeration in principle, but the exercise asks for the exact count, not merely for examples of solutions.

Partial argument

A direct counting argument from the stated linear constraints does not follow from the information in the section. The constraints define a $0$-$1$ integer feasibility polytope, and the number of integral points in this polytope is the desired answer.

The SAT formulation gives a finite method. Introduce one Boolean variable for each pixel and encode every condition

$$ \sum x_{i,j}=s $$

as a cardinality constraint. A complete enumeration algorithm would then repeatedly apply a SAT solver with blocking clauses. If a satisfying assignment $A$ is found, add a clause forbidding exactly that assignment and continue. If the process terminates after $N$ assignments, then $N$ is the exact number of solutions.

The missing step is the execution of this enumeration and the resulting verified integer count. The section excerpt available here gives the construction of the instance and examples of solutions, but it does not provide the enumeration output required by the exercise.

Status

The exercise is a computational counting problem rather than an unresolved mathematical conjecture. An exact answer can be obtained by an exhaustive computation with a proof certificate or independently checkable enumeration log.

No rigorous exact numerical value can be derived from the supplied section material alone. The known qualitative result is that the number of solutions is in the billions, but the exact cardinality requires carrying out the enumeration for the specific Fig. 36 data.

Therefore the requested boxed numerical answer cannot be honestly supplied without performing that computation.