\def\dts{\mathinner{\ldotp\ldotp}} @*Intro. This program generates {\mc DLX3} data that finds all motley dissections'' of an $m\times n$ rectangle into subrectangles. The allowable subrectangles $[a\dts b)\times[c\dts d)$ have $0\le a #include int m,n; /* command-line parameters */ main(int argc,char*argv[]) { register int a,b,c,d,j,k; @; @; for (a=0;a } } } @ @= if (argc!=3 || sscanf(argv[1],"%d", &m)!=1 || sscanf(argv[2],"%d", &n)!=1) { fprintf(stderr,"Usage: %s m n\n", argv[0]); exit(-1); } if (m>maxd || n>maxd) { fprintf(stderr,"Sorry, m and n must be at most %d!\n", maxd); exit(-2); } printf("| motley-dlx %d %d\n", m,n); @ The main primary columns \.{$jk$} ensure that cell$(j,k)$is covered, for$0\le j= for (j=0;j; printf("\n"); @ Now let's look closely at the problem of breaking symmetry. For concreteness, let's suppose that $m=7$ and $n=8$. Every solution will have exactly one entry with interval \.{x67}, specifying a rectangle in the bottom row (since $m-1=6$). If that rectangle has \.{y57}, say, a left-right reflection would produce an equivalent solution with \.{y13}; therefore we do not allow the rectangle for which $(a,b,c,d)=(6,7,5,7)$. Similarly we disallow $(6,7,c,d)$ whenever $8-d8$, we'll forbid such rectangles whenever the bottom-row policy has not already broken left-right symmetry. Furthermore, when $c'+d'=8$ at the top, we put \.{!1} together with \.{x01} \.{y26}, and we put both \.{!1} and \.{!2} together with \.{x01} \.{y35}. It can be seen that this completely breaks left-symmetry in all cases, because no solution has $c=c'$ and $d=d'$. (Think about it.) It's tempting to believe, as the author once did, that the same idea will break top-bottom symmetry too. But that would be fallacious: Once we've fixed attention on the bottommost row while breaking left-right symmetry, we no longer have any symmetry between top and bottom. (Think about that, too.) @ @= if (a==m-1 && c+d>n) continue; /* forbid this case */ for (j=a;j=n) { /* disallow top rectangle if bottom one is symmetric */ if (c+d!=n) for (k=1;k+k= for (k=1;k+k