brain

tamnd's digital brain — notes, problems, research

41230 notes

TAOCP 7.2.2.1 Exercise 300

The three parts have different logical status.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 30

All such trees can arise as backtrack trees of Algorithm X.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 299

Let $R$ be the $5\times54$ rectangle.

taocpmathematicsalgorithmsvolume-4project
TAOCP 7.2.2.1 Exercise 298

There are $80$ cells in the $8\times10$ rectangle.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 297

Exercise 7.

taocpmathematicsalgorithmsvolume-4research
TAOCP 7.2.2.1 Exercise 296

Exercise 7.

taocpmathematicsalgorithmsvolume-4project
TAOCP 7.2.2.1 Exercise 295

The missing figure is essential data for this exercise.

taocpmathematicsalgorithmsvolume-4project
TAOCP 7.2.2.1 Exercise 294

The missing information identified in the previous response remains a decisive obstacle.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 293

Let a hexomino be represented by a finite connected set of six unit squares.

taocpmathematicsalgorithmsvolume-4project
TAOCP 7.2.2.1 Exercise 292

Color the infinite square grid as a checkerboard, assigning the two colors according to the parity of the coordinates of a cell.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 291

Solution to TAOCP 7.2.2.1 Exercise 291.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 290

Let the board be a rectangle whose cells are colored in the usual checkerboard fashion.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 29

In particular, the missing points that must be fixed in a genuine solution are: 1.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 289

Please provide Figure (36) and the full image for exercise 289(c), or the corresponding region coordinates.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 288

Each one-sided pentomino is a fixed 5-cell polyomino with orientation distinguished up to rotation, but not reflection.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 287

Let each pentomino placement be an option $O$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 286

Let the twelve pentominoes be the standard set, with each piece used exactly once to tile the $6\times 10$ rectangle.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 285

Each one-sided pentomino is a connected 5-cell polyomino, and there are 18 distinct pieces.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 284

Let $\mathcal{P}={I,L,P,N,T,U,V,W,X,Y,Z,O,F}$ be the twelve pentominoes, considered up to translation, rotation, and reflection.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 283

Let $P$ be a fixed pentomino.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 282

The original argument fails because it replaces the geometric constraint system with an exact-cover abstraction and then draws global invariance conclusions that do not follow.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 281

The Aztec diamond of order $11/2$ contains $61$ cells, and the Aztec diamond of order $13/2$ with a hole of order $3/2$ contains $80$ cells.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 280

A Möbius strip of width $4$ formed from unit squares has fundamental domain a $4 \times 15$ rectangle, since each pentomino has area $5$ and the twelve pentominoes cover $60$ unit squares, so the tota...

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 28

Formula (27) expresses the estimated completion ratio in the form $\prod_{j=0}^{t} \frac{c_j}{t_j}$ with integers satisfying $1 \le c_j \le t_j$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 279

Let the cube have edge length $\sqrt{10}$.

taocpmathematicsalgorithmsvolume-4project
TAOCP 7.2.2.1 Exercise 278

Let $\mathcal{P}$ denote the set of all $6 \times 10$ pentomino packings obtained by Algorithm X without symmetry reduction.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 277

We restate the problem in a form that separates what is purely structural from what must be verified finitely and explicitly.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 276

Let the five tetrominoes be denoted by $I$ (straight), $O$ (square), $T$, $L$, and $S$ (skew).

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 275

Color the $8\times 8$ board in the standard checkerboard coloring and assign each square weight $+1$ for black and $-1$ for white.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 274

We restart from first principles and remove the two unsupported assumptions in the previous solution: 1.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 273

Let the $3\times 20$ board be fixed.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 272

In the exact cover formulation of pentomino packing, each option represents a placement of a specific pentomino, covering one item for the pentomino identity and five items for the occupied unit squar...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 271

A pentomino tiling of a $6\times 10$ rectangle can be encoded as an exact cover problem in the sense of Algorithm X, with items representing both geometric constraints and piece constraints, and with...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 270

Let the 11 nonsquare pentominoes be the free pentomino set with the $O$ pentomino removed.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 27

Let Langford’s problem be represented in the usual exact-cover form of Section 7.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 269

Let a decomposable packing be one in which a vertical line between columns $k$ and $k+1$ separates the $5\times 12$ rectangle into a $5\times k$ region and a $5\times(12-k)$ region, with no pentomino...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 268

The problem is an exact cover instance in the sense of (6)–(9): each legal placement of a pentomino on the $5\times 12$ board corresponds to one option, and a valid tiling corresponds to a set of opti...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 267

Let the Conway pentomino names be used in their standard letter forms $F, I, L, N, P, T, U, V, W, X, Y, Z$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 264

Let the items be arranged in the circular doubly linked list headed by node $0$, with the active items forming a linear order when read from $i = \mathrm{RLINK}(0)$ forward.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 263

Let $I$ be an exact-cover instance arising from a problem in which each solution is a set of rows covering all columns exactly once.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 262

The shape $S_n$ is a $16 \times n$ rectangular region with four fixed right triangles of side $7$ removed from its corners.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 261

Let $G=(V,E)$ be a directed acyclic graph, let $S \subseteq V$ be the set of sources and $T \subseteq V$ the set of sinks.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 260

We address the reviewer’s objections by redoing the analysis from the structure of the two exact cover instances, and by separating clearly: 1.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 26

The original solution fails at the only place where the problem becomes genuinely global: it replaces a coupled partition problem by a product of independent 7-queen counts.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 259

Each bounded permutation instance has items $X_1,\dots,X_n,Y_1,\dots,Y_n$ and options $O_{ij} = \{X_i, Y_j\} \qquad (1 \le j \le a_i).$ A solution is a set of options selecting exactly one $Y_j$ for e...

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 258

The previous solution fails because it replaces Algorithm Z’s actual backtracking dynamics with a single-pass incidence count.

taocpmathematicsalgorithmsvolume-4hm-medium
TAOCP 7.2.2.1 Exercise 257

The items are $1,2,\dots,n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 256

Algorithm Z reduces the problem of finding perfect matchings of a graph to an exact cover instance in which each vertex is an item and each edge is an option covering its two endpoints, with the addit...

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 255

Let $K_n$ denote the complete graph on vertex set ${1,2,\dots,n}$ and consider the exact cover formulation of perfect matchings where each item is a vertex and each option is an unordered pair ${i,j}$...

taocpmathematicsalgorithmsvolume-4hm-hard
TAOCP 7.2.2.1 Exercise 254

Let Algorithm Z operate on an exact cover instance with primary items and secondary items with colors, in the sense of Section 7.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 253

Let $Z$ denote Algorithm Z as in Section 7.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 252

Let (121) denote the set of options defining the exact cover instance, and let Algorithm Z construct a ZDD by recursive application of step Z3, where each node corresponds to a choice of an item $i$ a...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 251

Algorithm Z operates by recursive search over partial exact covers, maintaining the invariant that the current data structure represents the residual exact cover instance induced by the choices alread...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 250

Let $Z$ be a set of characters with the property that for each $\alpha \in Z$, every option contains exactly one primary item whose name begins with $\alpha$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 25

Let $Q_8$ be the graph whose vertices are the $64$ squares of an $8\times 8$ chessboard, with two vertices adjacent when a queen placed on one square attacks the other along a row, column, or diagonal...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 249

Let the costs be revealed as a sequence $x_1, x_2, \ldots, x_{dt}$, where $\{x_1,\ldots,x_{dt}\} = \{c_1,\ldots,c_{dt}\}$ and each $x_t \ge 0$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 248

Let $i$ be an active item, and let $f(i)$ denote the number of active options that contain $i$ and have cost strictly less than $\theta = T - C_l$ at the current level $l$ in step C3$^s$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 247

Let each option $O$ have original cost $c(O)\ge 0$.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 246

Let a partition consist of options $O_1,\dots,O_7$, each induced subgraph on its vertex set having size fixed by the construction in (118).

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 245

Let $G$ be the USA graph on 48 states, and let $G'$ be the augmented graph obtained by adding vertex $\mathrm{DC}$ adjacent only to $\mathrm{MD}$ and $\mathrm{VA}$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 244

Let $G$ be an undirected graph on vertex set $V$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 243

Let a solution consist of exactly $d$ options, and let the weight of option $k$ be $x_k$ for $1 \le k \le d$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 242

Let $G = (V,E)$ be the graph processed by the algorithm of exercise 7.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 241

Algorithm $P^s$ is a specialization of a general backtracking scheme in which a partial solution is extended step by step and each extension is later undone before exploring alternative branches.

taocpmathematicsalgorithmsvolume-4simple
TAOCP 7.2.2.1 Exercise 240

The original solution failed because it never used the actual USA-partition instance.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 24

An $n$-queens solution is a permutation $p$ of ${1,\dots,n}$ such that queens are placed at $(i,p(i))$ and no two attack each other.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 239

A family ${S_1,\ldots,S_m}$ of subsets of ${1,\ldots,n}$ is given together with weights $(w_1,\ldots,w_m)$, where each $w_j>0$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 238

Let the array entries be constrained by digit class as follows: each entry is either a 3-digit prime or an $n$-digit prime, and all entries are distinct.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 237

Let a solution of the prime square problem be an $n \times n$ array $(x_{ij})$ of primes satisfying the defining constraints of the problem in the text, and let the product of the solution be $P = \pr...

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 236

Let the board be indexed by $1,\dots,n$ in both directions, and let the center be $c = (n+1)/2$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 235

Let the board be $16 \times 16$ with rows and columns indexed by $i,j \in {1,\dots,16}$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 234

Let the board be $n \times n$, and let the center be $\left(\frac{n+1}{2}, \frac{n+1}{2}\right).$ For a queen placed at $(i,j)$, the cost is $8d(i,j)^2,$ and in the standard geometric interpretation u...

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 233

Let the 16-queens problem of Fig.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 232

Let a placement of 16 queens be an option set $S$ consisting of 16 chosen cells $(i,j)$, and let its cost under Algorithm $X^8$ be $w(S)=\sum_{(i,j)\in S} 8d(i,j).$ Since multiplication by the positiv...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 231

Let $G$ denote the set of all cells in the grid.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 230

Let each option $O$ in the instance of Fig.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 23

Let $n \times n$ chessboard coordinates be $(i,j)$ with $1 \le i,j \le n$.

taocpmathematicsalgorithmsvolume-4project
TAOCP 7.2.2.1 Exercise 229

A Langford pairing of order $n$ is a sequence $a_1,\dots,a_{2n}$ containing each symbol $k \in {1,\dots,n}$ exactly twice, with the two occurrences separated by exactly $k$ positions, so that if the f...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 228

Let $a_1\ldots a_{2n}$ be a Langford pairing, so each symbol $j \in {1,\dots,n}$ appears exactly twice among the $a_k$, and if $a_k = a_{k'} = j$ with $k<k'$, then $k'-k=j+1$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 227

In the Langford pairing exact cover formulation for $n=4$, options are indexed lexicographically by $(k,i)$ where $k$ is the value and $i$ is the first position, with the second position $j=i+k+1$.

taocpmathematicsalgorithmsvolume-4simple
TAOCP 7.2.2.1 Exercise 226

Let $a_1,\dots,a_{2n}$ be a Langford pairing, and define the reversed sequence by $a'_k = a_{2n+1-k}, \qquad 1 \le k \le 2n.$ For any function $f$, define $T_f = \sum_{k=1}^{2n} k\, f(a_k), \qquad T_f...

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 225

In Algorithm P, the number of options removed during a covering step equals the number of nodes eliminated from the vertical lists of items that are deleted together with the chosen item.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 224

Let the items be $x_1, x_2, \dots, x_n$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 223

Let $S$ denote the stack of options accumulated in step P7.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 222

Let item $i$ be the item to be deleted in step P7, and let $S$ denote the distinguished item whose occurrences determine which options are treated as exceptional in this stage.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 221

Let $S$ be the stack formed in step P7 after all options that begin with items already on the search stack have been examined.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 220

Let $A$ be an exact cover problem in the sense of Section 7.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 22

An $n$-queens solution is a set $S \subseteq {1,\dots,n}^2$ with exactly one queen in each row and each column, satisfying the two diagonal constraints.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 219

Let $p$ and $q$ be primary items in an XCC instance.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 218

Understood.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 217

The previous solution failed because it never actually classifies bipairs; it only restates the problem in terms of abstract “delta sets” and then assumes the conclusions.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 216

In Exercise 215, the underlying instance is an exact cover formulation of a combinatorial structure on $K_{2q+1}$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 215

Let $K_{2q+1}$ have vertex set $\{0,1,\dots,2q\}$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.2.1 Exercise 214

Let a _string solution_ be a sequence of options produced by the search procedure, where the same underlying exact cover solution may appear in different orders depending on the choices made during ba...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 213

Let the items be linearly ordered and let the restricted growth string of a partition be defined in the standard way: scanning items in increasing order, each item receives the index of the block in w...

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 212

Let primary items be linearly ordered.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.2.1 Exercise 211

We analyze bipairs in the standard exact cover formulations of the Langford pair problem, the $n$ queens problem, and Sudoku.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.2.1 Exercise 210

Let the three options be denoted $\alpha'$, $\beta'$, and $\gamma'$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 21

The flaw in the original solution is fundamental: it attempts to encode each index $j \in \{0,\dots,m-1\}$ using $L+1$ bits where $L=\lfloor \lg m \rfloor$, violating the requirement that each option...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.2.1 Exercise 209

Let the instance of the exact cover problem consist of a set of items $I$, partitioned into two disjoint classes $I = U \cup V$, $U \cap V = \varnothing$, together with a family of options $\mathcal{O...

taocpmathematicsalgorithmsvolume-4hard