Solving Open Quasigroup Problems by ... - Semantic Scholar

5 downloads 0 Views 200KB Size Report
under grant NSC-83-0408-E-002-012T. ..... using his propositional prover, McCune found a. QG6(17) without the ... 6] McCune, W.: A Davis-Putnam program and.
Solving Open Quasigroup Problems by Propositional Reasoning Hantao Zhang

Department of Computer Science The University of Iowa Iowa City, IA 52242 [email protected]

Department of Computer Science and Information Engeneering National Taiwan University, Taipei, Taiwan [email protected]

Abstract.

There are many open problems in the study of quasigroups. Recently, automated techniques have been employed to attack these open problems. In this paper, we show how a propositional satis ability prover is used to solve many open problems in quasigroups. Our success relies on a powerful propositional prover called SATO and a useful technique called the cyclic group construction. We provide detailed solutions to open problems solved by SATO.

1 Introduction In the recent years, there has been considerable renewed interest in the propositional satis ability problem (SAT). Because the SAT problem is the rst known NP-complete problem, it is relatively easy to transform any NP-complete problem in mathematics, computer science and electrical engineering into the SAT problem. The SAT problem is known to be dicult to solve in theory. However, contrary to the common perception that transforming a problem into the SAT problem will not make the problem easier to solve, many problems can in fact be solved more e ectively by a SAT problem solver than by a special program. Needless to say, transforming a problem into the SAT problem is much easier than writing a special program. The existence problem of nite  Partially supported by the National Science Foundation under Grants CCR-9202838 and CCR-9357851.

y Partially supported by the National Science Council

under grant NSC-83-0408-E-002-012T.

Jieh Hsiangy

quasigroups satisfying certain constraints is such an example. A quasigroup is simply a cancellative nite groupoid, hS; i, where S is a set,  a binary operation on S . The cardinality of S , jS j, is called the order of the quasigroup. The \multiplication table" for the operation  forms a Latin square, of which each row and each column is a permutation of S . Interest attaches to many classes of quasigroups, partly because they are very natural objects in their own right and partly because of their relationships to design theory. In this paper, we are interested in the problems in quasigroups given by Fujita, Slaney and Bennett in their award-winning IJCAI paper [3]. The constraints in Table 1 are taken from [3]: Among the Latins squares satisfying these constraints, we are also interested in those squares with a hole, i.e., a subsquare (which itself is also a Latin square) of the square is missing. Quasigroups raise many combinatorial problems, some of which are often approached computationally. The usefulness of advanced automated reasoning techniques to attack these problems have been successfully demonstrated in [11, 3, 7, 10, 6]. In 1990, Zhang reported a case of open problems in quasigroups solved using a constraint solving technique [11]. Subsequently, Fujita used MGTP, a model-generation based rst-order theorem prover, and Slaney used FINDER, a program based on constraint solving, to solve several open problems in quasigroups [3]. Later, Stickel and Zhang, independently, used their proposi-

Table 1: Some constrains of quasigroups.

Name QG1

QG2 QG3 QG4 QG5 QG6 QG7

Constraint x  y = u; z  w = u; v  y = x; v  w = z ) x = z, y = w x  y = u; z  w = u; y  v = x; w  v = z ) x = z, y = w (x  y)  (y  x) = x (x  (y  x))  y = x ((x  y)  x)  x = y (x  y)  y = x  (x  y) ((x  y)  x)  y = x

tional provers, based on the Davis-Putnam algorithm [2], to attack these problems and reported very competitive and new results [7, 8, 10]. The experimental results of this paper are obtained by the program SATO (SAtis ability Testing Optimized) ([8], [10]) which is an ecient implementation of the Davis-Putnam algorithm. Quasigroups raise very hard computational problems. Many of these problems are simply intractable for today's automated reasoning programs. For instance, it remains open if there exists a Latin square of order 10 satisfying QG2. While it is beyond the reach of the current reasoning techniques to do an exhaustive search, we may take advantage of techniques developed by mathematicians over decades for constructing quasigroups. One such technique we found very useful is a starter-adder-type construction. This technique has been used extensively by various mathematicians (e.g., see [5, 4, 1]). The main idea is to generate a Latin square under a cyclic group from the rst row and the rst column of the square. This cyclic group technique o ers a significant computation advantage: instead of searching for O(v2 ) entries of a square of order v, only O(v) entries need to be searched. If a propositional reasoning prover is used, only O(v2 ) propositional variables instead of O(v3 ) variables are needed. In general, to nd latin squares satisfying QG1{ QG7, only O(v3 ) clauses instead of O(v6 ) clauses are needed. Despite of the fact that this technique is incomplete, we are able to nd many new Latin squares using the SATO prover.

This paper is organized as follows. In the next section, we introduce some problems in quasigroups and show how to represent them in the propositional logic. In section 3, we present one of our tools to solve problems in quasigroups, i.e., the cyclic group construction. In section 4, we present solutions to some open quasigroup problems. Section 5 concludes the paper.

2 Quasigroup Problems Recall that a quasigroup is a pair hS; i where S is a nite set,  a binary operation on S and the \multiplication table" of  forms a Latin square. Without loss of generality, we assume S = f0; 1; :::; v ? 1g, where v is the order of hS; i. The following clauses specify a Latin square: For all elements x; y; u; w 2 S ,

x  u = y; x  w = y ) u = w u  x = y; w  x = y ) u = w x  y = u; x  y = w ) u = w (x  y = 0) _    _ (x  y = v ? 1)

(1) (2) (3) (4)

It has been shown in [7] that the following two clauses are valid consequences of the above clauses and adding them into a prover can help to reduce the search space. (x  0 = y) _    _ (x  (v ? 1) = y) (0  x = y) _    _ ((v ? 1)  x = y)

(5) (6)

In the following we denote by QGi(v) a Latin square satisfying clauses (1){(6) plus the constraint QGi given in the introduction for S = f0; :::; (v ? 1)g. In addition, the idempotence law, x  x = x, and the constraint x  (v ? 1)  x ? 1, which eliminates some isomorphic models, are used for each problem here. Further details on these problems can be found in [3] and [7]. To obtain propositional clauses, we simply instantiate variables in the clauses of QGi(v) by the values of S and replace each equality a  b = c by a propositional variable pa;b;c. The number of the propositional clauses is thus decided by the order of the quasigroup (i.e., v) and the number

of distinct variables in a clause. However, for constraints QG3{QG7, we have to transform them into \ at" form rst. For example, the at form of QG5 is (x  y = z ); (z  x = w) ) (w  x = y): It can be shown that the two \transposes" of the above clause are also valid consequences of QG5: (w  x = y); (x  y = z ) ) (z  x = w); (z  x = w); (w  x = y) ) (x  y = z ): Experimental results show that when v > 10, adding these \transposes" in the input often improves the performance of the Davis-Putnam algorithm. This is also true for QG3{QG7. For a class of Latin squares satisfying a given constraint, we are often interested in those with holes. An incomplete Latin square is a Latin square with a single hole and is speci ed as hS=X; i, where X  S and for any x1; x2 2 X , x1  x2 must be in X but is left undecided in the \multiplication table" of . This implies that for any s 2 S ? X and x 2 X , s  x (or x  s) 62 X . We may consider an incomplete Latin square as one of order jS j with a subsquare of order jX j \missing"; if we ll a Latin square of order jX j into the hole, the result should remain a Latin square. Without loss of generality, the missing subsquare can be assumed to be in the bottom right corner. A necessary condition for the existence of incomplete quasigroups satisfying QG1{QG7 is that v > 3n. We will denote an incomplete quasigroup of order v satisfying QGi, with a hole of size n, by QGi(v; n). Note that every QGi(v) can be considered as a QGi(v; 1) because it is assumed to be idempotent. There is an easy way to obtain clauses for incomplete quasigroups from those of complete quasigroups:

 Attach the condition that x and y cannot be in X at the same time to clauses (1)-(3).

For the Davis-Putnam algorithm, it is relatively easier to work with incomplete groups of larger holes. To search for a QGi(v; n), if we already have a QGi(m; n), we may search for a QGi(v; m) and then ll the QGi(m; n) into QGi(v; m) to obtain a QGi(v; n). This ll-in-hole technique is useful when looking for QGi(v; n). There exist many open problems regarding the existence of QGi with holes given in Bennett and Zhu's survey paper [1]. We are able to nd new models for each type of QG1{QG7; these solved quasigroups will be given in section 4.

3 Cyclic Group Construction

The propositional reasoning program we used to attack quasigroup problems is called SATO (SAtis ability Testing Optimized) which is an ecient implementation of the Davis-Putnam algorithm written by Zhang [8]. For a quasigroup of order v, the number of propositional clauses obtained from clauses like QG1 and QG2 in Table 1 is O(v6 ) because there are six distinct variables in QG1 and QG2. For a large v, in addition to the large number of clauses, the search space involved in these problems is also huge. For instance, SATO, or any known computer programs, including those in [11, 3, 7, 10, 6], cannot complete an exhaustive search when v  10 for QG2(v). As a result, a direct representation of the quasigroups in the propositional logic is not likely to succeed. We now present an incomplete technique which is developed by mathematicians over the years for nding Latin squares. It is incomplete because when the method fails, we do not know if there exists a Latin square satisfying the given constraints.  Add positive unit clauses such as x  y = z We have used several other techniques, but this one is the most important because it reduces the whenever fx; y; z g  X . search space signi cantly. This technique is a  Add negative unit clauses such as x  y =6 z starter-adder-type construction and has been used whenever two of fx; y; z g are in X and the extensively by various authors (e.g., see [5, 4, 1]). other is not in X . The main idea of the technique is to generate an

Figure 1: A QG2(14; 1) by the cyclic construction. Table 2: The statistics of SATO on the QG2(v; 1) problems for v = 7 to 12, using the cyclic group construction. * | 0 1 2 3 4 5 6 7 8 9 a b c x --+---------------------------0 | 0 c 9 x a 6 8 4 b 5 1 3 7 2 1 | 8 1 0 a x b 7 9 5 c 6 2 4 3 2 | 5 9 2 1 b x c 8 a 6 0 7 3 4 3 | 4 6 a 3 2 c x 0 9 b 7 1 8 5 4 | 9 5 7 b 4 3 0 x 1 a c 8 2 6 5 | 3 a 6 8 c 5 4 1 x 2 b 0 9 7 6 | a 4 b 7 9 0 6 5 2 x 3 c 1 8 7 | 2 b 5 c 8 a 1 7 6 3 x 4 0 9 8 | 1 3 c 6 0 9 b 2 8 7 4 x 5 a 9 | 6 2 4 0 7 1 a c 3 9 8 5 x b a | x 7 3 5 1 8 2 b 0 4 a 9 6 c b | 7 x 8 4 6 2 9 3 c 1 5 b a 0 c | b 8 x 9 5 7 3 a 4 0 2 6 c 1 x | c 0 1 2 3 4 5 6 7 8 9 a b

v Model Clause Branch Search

7 8 9 10 11 12

6 12 28 0 100 0

11134 28883 67501 143938 284036 525229

50 107 475 1186 4606 14111

0.15 0.63 3.35 11.99 71.21 302.56

Example 1 Take G = Z13 , X = fxg, e = (0 12 9 x 10 6 8 4 11 5 1 3 7), f = (3) and g = (12), we

have a QG2(14; 1), shown in Figure 1. It gives us a QG2(14) when entry e(x; x) is lled by x. 2

Example 2 Take G = Z15 , X = ;, e = (0 5 11 10 7 4 2 8 3 14 1 13 9 6 12), f = g = ;, we have a incomplete quasigroup under an Abelian group of QG2(15; 0), or QG2(15). 2 order v ? n (e.g., (Zv?n ; +)), from its rst row and from the last n elements of the rst column. In order to nd a new Latin square using the Suppose that L is a QGi(v; n) based on S with cyclic group construction, instead of looking for an a hole indexed by X . Let S = G [ X where G = entire square, we look for only vectors e, f and g. f0; 1; :::; v ? n ? 1g and X = fx1 ; x2 ; :::; xn g. We Obviously, the latter will be much easier than the will denote by e(i; j ) the entry in the cell (i; j ) former because a square of order v has v2 entries of L (i.e., e(i; j ) = i  j ). The rst row is given while the three vectors have at most 1:3v entries by the vectors e = (e(0; 0); :::; e(0; v ? n ? 1)) and altogether (because v > 3n). f = (e(0; v ? n); :::; e(0; v ? 1)), and the last n There are obvious conditions that the vecelements of the rst column are given by the vector tors e; f and g must satisfy in order to produce g = (e(v ? n; 0); :::; e(v ? 1; 0)). QGi(v; n). Instead of putting the constraints on the three vectors, we simply add instances of the Cyclic Group Construction 1 The entire L is following constraints to the clauses of a problem: constructed from e; f and g using the cyclic group (x  y = z )  ((x + 1)  (y + 1) = (z + 1)); Zm , where m = v ? n, as follows: (x  y = w)  ((x + 1)  (y + 1) = w); 1. For 0  s; t < m, e(s + 1; t0 ) = e0 where t0 = for all x; y; z < v ? n and w  v ? n, where + t + 1(mod m), and e0 = e(s; t) if e(s; t) 2 X , is modulo (v ? n). This way, we obtain a square or e(s; t) + 1(mod m), otherwise. directly from an SAT prover instead of the three vectors but this square can be reconstructed from 2. For 0  s < m, m  t < v, e(s + 1; t) = its rst row and column by the cyclic group cone(s; t) + 1(mod m). struction. This implementation reduces substantially the search space of a problem in quasigroups. 3. For m  s < v, 0  t < m, e(s; t + 1) = e(s; t) + 1(mod m). Table 2 shows the experimental results of the cyclic group construction on the QG2(v; 1) problems for v = 7 to 12. Column Model gives the

Table 3: Newly solved Quasigroup problems. QGi (v) or (v; n) QG1 (16, 2), (17, 2), (19, 2), (20, 3) QG2 (14), (15), (12, 2), (14, 2), (16, 2), (17, 2), (15, 3), (17, 3), (18, 4) (46, 15), (51, 14), (54, 15) QG3 QG4 (14, 2) QG5 (14)[without idempotency], (16) QG6 (15), (17) (15) QG7 total number of models for each case. Coulmns

Clause and Branch give, respectively, the num-

bers of input clauses and case-splittings of the Davis-Putnam algorithm. The data in column Search are the time (in seconds) spent in searching for models (collected on a HP715/50 workstation with 32 megabytes of memory). The advantage of the cyclic construction is obvious. For instance, it takes 379 seconds for SATO to complete the search of QG2(8) without the cyclic group construction but it takes only 0.63 seconds when the cyclic group construction is used. However, no QG2(12) is found by the cyclic group construction even though we know it exists, because the method is incomplete.

Figure 2: A QG4(14; 2) found by SATO. * | 0 1 2 3 4 5 6 7 8 9 a b c d --+---------------------------0 | 0 a 6 7 1 b d 9 5 c 2 4 8 3 1 | 3 1 0 2 8 6 b d 9 a 4 c 5 7 2 | 4 c 2 6 b 8 3 a 7 0 d 5 9 1 3 | 2 b d 3 5 0 8 1 c 6 7 9 4 a 4 | 1 2 5 9 4 7 a 8 b 3 c d 0 6 5 | d 8 1 a 6 5 c 3 4 2 9 7 b 0 6 | 9 d 7 0 3 c 6 b 2 4 5 a 1 8 7 | 5 0 c 4 a 3 1 7 d b 6 8 2 9 8 | 6 9 3 b 2 d 7 c 8 5 0 1 a 4 9 | a 7 b c d 1 4 2 3 9 8 0 6 5 a | c 6 9 8 0 4 2 5 1 d a 3 7 b b | 7 4 a d c 9 5 0 6 8 1 b 3 2 c | b 5 8 1 9 2 0 4 a 7 3 6 d | 8 3 4 5 7 a 9 6 0 1 b 2

group construction. The cases for QG5, QG6 and QG7(15) are negative, i.e., there do not exist such squares. The case of QG5(16) is also proved independently by Hasegawa's team in Japan. The other cases are positive and the squares are obtained by the cyclic group construction. The vectors for QG2(14; 1) and QG2(15; 0) are given in Examples 1 and 2, respectively. The other involved vectors are listed in Table 4. Note that using his propositional prover, McCune found a QG6(17) without the cyclic group construction [6].

4 Newly Solved Open Cases

5 Conclusion

It is fortunate that our program made new discovery in every type of the problems, i.e., QG1{QG7, listed in [3]. Our program is also able to reproduce all the results reported in [11, 3, 7, 6]. We present in Table 3 our results which answered for the rst time some open problems listed in [1]. When a case is solved by the cyclic group construction, instead of presenting the newly found Latin squares, we list the vectors e, f and g, which can be used to construct the entire square by the cyclic group construction. Among these cases, QG4(14; 2), given in Figure 2, is found without the help of the cyclic

We have demonstrated how to use propositional reasoning to solve open problems in quasigroups. The computing time spent on solving these problems varies from a few seconds to several weeks. For instance, it took more than 4 days to solve the case of QG7(15) by running a parallel implementation of SATO on eight workstations [9]. Because of the need of enormous amount of computing time, the eciency of SATO is very important to our success. We plan to study other construction techniques used by mathematicians. We believe that combining the knowledge of mathematicians and the ad-

vanced computer technology is a very productive way to attack any open mathematical problems, not just problems in quasigroups.

References [1] Bennett, F., Zhu, L.: Conjugate-orthogonal Latin squares and related structures. J. Dinitz & D. Stinson (eds), Contemporary Design Theory: A Collection of Surveys, John Wiley & Sons, 1992. [2] Davis, M., Putnam, H.: (1960) A computing procedure for quanti cation theory. J. of ACM, 7, 201-215. [3] Fujita, M., Slaney, J., Bennett, F.: Automatic generation of some results in nite algebra, Proc. International Joint Conference on Arti cial Intelligence, MIT Press, 1993 [4] Hedayat, A., Seiden, E.: (1974) On the theory and application of sum composition of Latin squares and orthogonal Latin squares. Paci c J. Math. 54, 85-b3. [5] Horton, J.D.: (1974) Sub-Latin squares and incomplete orthogonal arrays. J. Combin. Theory A, 16, 23-33. [6] McCune, W.: A Davis-Putnam program and its application to nite rst-order model search: quasigroup existence problems. Preprint, Division of MCS, Argonne National Laboratory, 1994. [7] Slaney, J., M. Fujita, M. Stickel: Automated reasoning and exhaustive search: Quasigroup existence problems. To appear in Computers and Mathematics with Applications. [8] Zhang, H.: SATO: A decision procedure for propositional logic. Association for Automated Reasoning Newsletter, No 22, March 1993. [9] Zhang, H., Bonacina, M. P.: Cumulating search in a distributed computing environment: a case study in parallel satis ability. Proc. of the First International Symposium on Parallel Symbolic Computation. Sept. 26{28, 1994, Linz, Austria. [10] Zhang, H., Stickel, M.: Implementing the DavisPutnam algorithm by tries. Technical Report, Dept. of Computer Science, The University of Iowa, 1994. [11] Zhang, J. Search for idempotent models of quasigroup identities, manuscript, Institute of Software, Academia Sinica, Beijing. 1990.

Table 4: Vectors for the cyclic group construction. ( ) (16, 2) v; n

(17, 2) (19, 2) (20, 3) ( ) (12, 2) (14, 2) v; n

(16, 2) (17, 2) (15, 3) (17, 3) (18, 4)

QG1

e, f, g

(0 4 9 12 8 1 3 13 10 5 11 2 2 7), (1 6), (12 13) (0 6 14 10 2 11 1 8 1 12 4 13 5 9 3), (2 7), (13 14) (0 14 16 11 8 7 12 2 2 3 15 4 13 5 1 1 6), (9 10), (15 16) (0 12 14 16 7 10 13 1 9 2 1 2 3 15 6 4 3), (5 8 11), (14 15 16) QG2 x

x

x

x

x

x

x

x

x

e, f, g

(0 2 3 6 1 10 1 2 11 5), (4 7), (4 9) (0 2 9 11 7 1 10 8 2 6 3 1), (4 5), (10 11) (0 8 1 5 13 10 12 11 9 6 4 7 2 2), (1 3), (12 13) (0 7 12 6 9 13 1 1 4 11 2 8 2 14 3), (5 10), (13 14) (0 1 10 6 5 9 11 3 3 2 4 1), (2 7 8), (9 10 11) (0 7 12 11 3 2 8 10 9 13 1 6 5 1 ), (2 3 4), (11 12 13) (0 2 1 5 11 3 10 12 9 4 13 3 6 8), (1 2 4 7), (10 11 12 13) QG3 x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

( ) e, f, g (46, 15) (0 6 22 2 7 24 4 8 26 6 9 28 8 10 30 10 11 1 12 12 2 14 13 3 16 14 4 18 15 5 20), (1 3 5 7 9 11 13 15 17 19 21 23 25 27 29), (15 14 13 12 11 10 9 8 7 6 5 4 3 2 1) (51, 14) (0 16 6 30 21 31 7 32 8 8 34 9 35 10 9 36 12 33 13 10 1 11 4 17 12 1 13 2 14 22 3 23 4 18 5 26 19), (2 3 5 6 7 11 14 15 20 24 25 27 28 29), (14 13 12 11 10 9 8 7 6 5 4 3 2 1) (54, 15) (0 6 21 7 32 25 33 8 34 8 35 9 9 10 38 37 10 13 11 36 2 16 12 17 3 1 13 20 14 2 15 3 24 4 18 5 27 14 28), (1 4 5 6 7 11 12 15 19 22 23 26 29 30 31), (15 14 13 12 11 10 9 8 7 6 5 4 3 2 1) QG7 ( ) e, f, g (17, 0) (0 13 9 12 1 3 7 11 2 15 6 10 14 16 5 8 4), ( ), ( ) v; n

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

v; n

x

x

x

x x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x