|Ivars Peterson's MathTrek|
May 8, 2000
Here are two examples of Latin squares of order 4:
In effect, each row (and each column) is a permutation of four distinct numbers (or symbols).
Such arrays have proved useful for a variety of purposes. Suppose, for example, you wanted to check the resistance to wear of four brands of automobile tires. Putting one tire of each brand on the four wheels of one car isn't good enough because the amount of wear may differ in those four positions and vary from week to week owing to different weather conditions. A better experiment would be to use four tires for four weeks and to interchange the four positions from week to week according to a four-by-four Latin square.
Latin squares are also linked to algebraic objects known as quasigroups. A quasigroup is defined in terms of a set, Q, of distinct symbols and a binary operation (called multiplication) involving only the elements of Q. A quasigroup's multiplication table turns out to be a Latin square. Each element of the set Q occurs exactly once in each row and each column of the table.
The so-called quasigroup completion problem concerns a table that is correctly but only partially filled in. The question is whether the remaining blanks in the table can be filled in to obtain a complete Latin square (or a proper quasigroup multiplication table).
Computer scientists have proved that the quasigroup completion problem belongs to a category of difficult computational problems described as NP-complete. As the number of elements, n, increases, a computers solution time grows exponentially in the worst case. In effect, systematically solving such a worst-case problem involving many elements can take an enormous amount of time, even on the fastest available computers.
In typical cases, however, solution times can vary tremendously and depend on the specific search algorithm used to find an answer. Many search problems take much less time to solve than worst-case scenarios would suggest.
Moreover, researchers have discovered that, just as water abruptly freezes when the temperature dips below the freezing point, the quasigroup completion problem exhibits a computational phase transition--a shift from cases for which a Latin square can be found to those for which no solution is possible when the fraction of initially filled-in squares in the table has a certain threshold value.
"At the phase transition, problem instances switch from being almost all solvable to being almost all unsolvable," Carla P. Gomes of Cornell University and her coworkers report in a recent issue of the Journal of Automated Reasoning. That transition occurs when about 42 percent of the blanks in the table are initially filled in.
Interestingly, the problems that take longest to resolve one way or the other (soluble versus insoluble) lie at the phase transition, where there are enough constraints (filled-in squares) to limit the number of good choices but not enough to show immediately that the case is hopeless.
Gomes has set up a Web page at http://www.cs.cornell.edu/Info/People/gomes/QUASIdemo.html where you can try out various instances of the quasigroup completion problem. In this demonstration, Gomes uses a 10-by-10 grid and 10 different colors.
You can select a sample pattern of colored-in squares as your starting point, generate a random, colored array filling a specified fraction of the grid, or manually create your own partial Latin square. Clicking on the button labeled "RUN Stochastic" instructs the computer to solve the problem following a built-in algorithm (a randomized backtrack search procedure, in this case). Clicking again presents a different solution.
On certain runs, the computer solves the problem easily, Selman observes. On other runs, it may fail to complete the pattern within the allotted time. Varying the fraction of filled-in squares also alters computation times. When the fraction is close to the critical value, computation times become very large.
Such experiments provide insights into the factors that make certain computational problems particularly difficult and may suggest improved search strategies for solving a variety of problems.
Copyright 2000 by Ivars Peterson
Achlioptas, D., C. Gomes, H. Kautz, and B. Selman. Preprint. Generating satisfiable problem instances.
Ball, W.W.R., and H.S.M. Coxeter. 1974. Mathematical Recreations and Essays, 12th Ed. Toronto: University of Toronto Press.
Gomes, C.P., B. Selman, N. Crato, and H. Kautz. 2000. Heavy-tailed phenomena in satisfiability and constraint satisfaction problems. Journal of Automated Reasoning 24:67. (Available at http://www.cs.cornell.edu/gomes/Papers.htm.)
Gomes, C.P., and B. Selman. 1997. Problem structure in the presence of perturbations. In Proceedings of the Fourteenth National Conference on Artificial Intelligence (AAAI-97), New Providence, R.I.
Hayes. B. 1997. Cant get no satisfaction. American Scientist 85(March-April):108.
Peterson, I. 2000. Changes of mathematical state. Science News 157(May 6):296.
Try out an algorithm for solving the quasigroup completion problem at http://www.cs.cornell.edu/Info/People/gomes/QUASIdemo.html.
Information about Latin squares can be found at http://mathworld.wolfram.com/LatinSquare.html.
Computer scientist Bart Selman of Cornell University has a Web page at http://www.cs.cornell.edu/home/selman.
Comments are welcome. Please send messages to Ivars Peterson at email@example.com.