SAT Solving with Computer Algebra: A Powerful Combinatorial Search - - PowerPoint PPT Presentation

sat solving with computer algebra a powerful
SMART_READER_LITE
LIVE PREVIEW

SAT Solving with Computer Algebra: A Powerful Combinatorial Search - - PowerPoint PPT Presentation

SAT Solving with Computer Algebra: A Powerful Combinatorial Search Method Curtis Bright University of Waterloo SFU Discrete Mathematics Seminar September 3, 2019 1/34 SAT: Boolean satisfiability problem 2/34 SAT: Boolean satisfiability


slide-1
SLIDE 1

SAT Solving with Computer Algebra: A Powerful Combinatorial Search Method

Curtis Bright University of Waterloo SFU Discrete Mathematics Seminar September 3, 2019

1/34

slide-2
SLIDE 2

SAT:

Boolean satisfiability problem

2/34

slide-3
SLIDE 3

SAT:

Boolean satisfiability problem

SAT solvers: Clever brute force

2/34

slide-4
SLIDE 4

Effectiveness of SAT solvers

Many problems that have nothing to do with logic can be effectively solved by reducing them to Boolean logic and using a SAT solver.

3/34

slide-5
SLIDE 5

Effectiveness of SAT solvers

Many problems that have nothing to do with logic can be effectively solved by reducing them to Boolean logic and using a SAT solver.

Examples

◮ Hardware and software verification ◮ Scheduling subject to constraints ◮ Finding or disproving the existence of combinatorial objects

3/34

slide-6
SLIDE 6

Limitations of SAT solvers

SAT solvers lack mathematical understanding beyond the most basic logical inferences and will fail on some trivial tiny problems.

4/34

slide-7
SLIDE 7

Limitations of SAT solvers

SAT solvers lack mathematical understanding beyond the most basic logical inferences and will fail on some trivial tiny problems.

Example

Have a SAT solver to try to find a way to put 20 pigeons into 19 holes such that no hole contains more than one pigeon. . .

4/34

slide-8
SLIDE 8

CAS:

Computer algebra system

5/34

slide-9
SLIDE 9

CAS:

Computer algebra system

Symbolic mathematical computing

5/34

slide-10
SLIDE 10

Effectiveness of CAS

Computer algebra systems can perform calculations and manipulate expressions from many branches of mathematics.

6/34

slide-11
SLIDE 11

Effectiveness of CAS

Computer algebra systems can perform calculations and manipulate expressions from many branches of mathematics.

Example

What is the value of

  • n=1

1 n2 ?

6/34

slide-12
SLIDE 12

Effectiveness of CAS

Computer algebra systems can perform calculations and manipulate expressions from many branches of mathematics.

Example

What is the value of

  • n=1

1 n2 ? Maple returns π2/6.

6/34

slide-13
SLIDE 13

Effectiveness of CAS

Computer algebra systems can perform calculations and manipulate expressions from many branches of mathematics.

Example

What is the value of

  • n=1

1 n2 ? Maple returns π2/6 . . . not 1.64493406685.

6/34

slide-14
SLIDE 14

Limitations

CASs are not optimized to do large (i.e., exponential) searches.

7/34

slide-15
SLIDE 15

SAT + CAS

Brute force + Knowledge

8/34

slide-16
SLIDE 16

MathCheck

Our SAT+CAS system MathCheck has constructed over 100,000 various combinatorial objects. For example, this {±1}-matrix with pairwise orthogonal rows: uwaterloo.ca/mathcheck

9/34

slide-17
SLIDE 17

Results of MathCheck

Found the smallest counterexample of the Williamson conjecture. Verified the even Williamson conjecture up to order 70. Found three new counterexamples to the good matrix conjecture. Verified the best matrix conjecture up to order seven. Verified the Ruskey–Savage conjecture up to order five. Verified the Norine conjecture up to order six. Enumerated all quaternary Golay sequences up to length 28. Verified the nonexistence of weight 15 and 16 codewords in a projective plane of order ten.

10/34

slide-18
SLIDE 18

Hadamard matrices

In 1893, Hadamard defined what are now known as Hadamard matrices: square matrices with ±1 entries and pairwise orthogonal rows.

11/34

slide-19
SLIDE 19

The Hadamard conjecture

The Hadamard conjecture says that Hadamard matrices exist in

  • rder 4n for all n ≥ 1.

Strongly expected to hold but still open after 125 years.

12/34

slide-20
SLIDE 20

Williamson matrices

Williamson matrices are symmetric and circulant (each row a cyclic shift of the previous row) {±1}-matrices A, B, C, D such that A2 + B2 + C 2 + D2 is a scalar matrix.

13/34

slide-21
SLIDE 21

Williamson’s theorem

If A, B, C, D are Williamson matrices of order n then     A B C D −B A −D C −C D A −B −D −C B A     is a Hadamard matrix of order 4n.

14/34

slide-22
SLIDE 22

The Williamson conjecture

It does, however, seem quite likely that not merely Hadamard matrices, but Hadamard matrices of the Williamsom type, “always exist,”. . . Solomon Golomb and Leonard Baumert, 1963

15/34

slide-23
SLIDE 23

Williamson matrices: A history

In 1944, Williamson found Williamson matrices in the orders 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 37, 43, twice each number on this list, as well as 12, 20, and the powers

  • f two up to 32.

1944

| | 16/34

slide-24
SLIDE 24

Williamson matrices: A history

In 1962, Baumert, Golomb, and Hall found one in order 23.

1944 1962

| | | 16/34

slide-25
SLIDE 25
  • S. Golomb, L. Baumert, M. Hall, 1962.

17/34

slide-26
SLIDE 26

Williamson matrices: A history

In 1965, Baumert and Hall found seventeen sets of Williamson matrices in the orders 15, 17, 19, 21, 25, and 27.

1944 1965

| | | | 18/34

slide-27
SLIDE 27

Williamson matrices: A history

The next year Baumert found one in order 29.

1944 1966

| | | | | 18/34

slide-28
SLIDE 28

Williamson matrices: A history

In 1972, Turyn found an infinite class of them, including one in each order 27, 31, 37, 41, 45, 49, 51, 55, 57, 61, 63, and 69.

1944 1972

| | | | | | 18/34

slide-29
SLIDE 29

Williamson matrices: A history

In 1977, Sawade found four in order 25 and four in order 27 and Yamada found one in order 37.

1944 1977

| | | | | | | 18/34

slide-30
SLIDE 30

Williamson matrices: A history

In 1988, Koukouvinos and Kounias found four in order 33.

1944 1988

| | | | | | | | 18/34

slide-31
SLIDE 31

Williamson matrices: A history

In 1992, Ðoković found one in order 31. The next year he found one in order 33 and one in order 39. Two years later he found two in order 25 and one in order 37.

1944 1992–1995

| | | | | | | | | | | 18/34

slide-32
SLIDE 32

Williamson matrices: A history

In 2001, van Vliet found one in order 51.

1944 2001

| | | | | | | | | | | | 18/34

slide-33
SLIDE 33

Williamson matrices: A history

In 2008, Holzmann, Kharaghani, and Tayfeh-Rezaie found one in order 43.

1944 2008

| | | | | | | | | | | | | 18/34

slide-34
SLIDE 34

Williamson matrices: A history

In 2018, Bright, Kotsireas, and Ganesh found one in order 63.

1944 2018

| | | | | | | | | | | | | | 18/34

slide-35
SLIDE 35

A Hadamard matrix of order 4 · 63 = 252

19/34

slide-36
SLIDE 36

Counterexamples

In 1993, the counterexample 35 was found by Ðoković. In 2008, the counterexamples 47, 53, and 59 were found by Holzmann, Kharaghani, and Tayfeh-Rezaie. Ðoković noted that 35 was the smallest odd counterexample but left open the question if it was the smallest counterexample.

20/34

slide-37
SLIDE 37

Even orders

In 2006, Kotsireas and Koukouvinos found Williamson matrices in all even orders n ≤ 22 using a CAS. In 2016, Bright et al. found Williamson matrices in all even orders n ≤ 30 using a SAT solver.

21/34

slide-38
SLIDE 38

Even orders

In 2006, Kotsireas and Koukouvinos found Williamson matrices in all even orders n ≤ 22 using a CAS. In 2016, Bright et al. found Williamson matrices in all even orders n ≤ 30 using a SAT solver. In 2018, Bright, Kotsireas, and Ganesh enumerated all Williamson matrices in all even orders n ≤ 70 using a SAT+CAS method.

21/34

slide-39
SLIDE 39

SAT encoding

Let the Boolean variables a0, . . . , an−1 represent the entries of the first row of the matrix A with true representing 1 and false representing −1.

22/34

slide-40
SLIDE 40

Naive setup

Encoding that Williamson matrices of order n exist SAT solver Williamson matrices

  • r counterexample

23/34

slide-41
SLIDE 41

Naive setup

Encoding that Williamson matrices of order n exist SAT solver Williamson matrices

  • r counterexample

This is suboptimal as SAT solvers alone will not exploit mathematical facts about Williamson matrices.

23/34

slide-42
SLIDE 42

System overview

The SAT solver is augmented with a CAS learning method:

SAT solver CAS

partial satisfying assignment conflict clause

24/34

slide-43
SLIDE 43

System overview

The SAT solver is augmented with a CAS learning method:

SAT solver CAS

partial satisfying assignment conflict clause expression of the form x1 ∨ x2 ∨ · · · ∨ xn where each xi is a variable

  • r negated variable

24/34

slide-44
SLIDE 44

Power spectral density (PSD) filtering

If A is a Williamson matrix then

  • n−1
  • j=0

aj exp(2πijk/n)

  • 2

≤ 4n for all integers k.

25/34

slide-45
SLIDE 45

Search with PSD filtering

To exploit PSD filtering we need (1) an efficient method of computing the PSD values; and (2) an efficient method of searching while avoiding matrices that fail the filtering criteria.

26/34

slide-46
SLIDE 46

Search with PSD filtering

To exploit PSD filtering we need (1) an efficient method of computing the PSD values; and (2) an efficient method of searching while avoiding matrices that fail the filtering criteria. CASs excel at (1) and SAT solvers excel at (2).

26/34

slide-47
SLIDE 47

Learning method

SAT solver CAS assignment to a0, . . . , an−1

27/34

slide-48
SLIDE 48

Learning method

SAT solver CAS assignment to a0, . . . , an−1

The CAS computes the PSD of A. If it is too large. . .

27/34

slide-49
SLIDE 49

Learning method

SAT solver CAS assignment to a0, . . . , an−1

  • ai true

in assign

¬ai

The CAS computes the PSD of A. If it is too large. . . . . . a conflict clause is learned.

27/34

slide-50
SLIDE 50

Enumeration results

We found over 100,000 new Williamson matrices in all even orders up to 70. A huge number of Williamson matrices of order 64 were found.

28/34

slide-51
SLIDE 51

Enumeration results

We found over 100,000 new Williamson matrices in all even orders up to 70. A huge number of Williamson matrices of order 64 were found. Interestingly, Williamson matrices in all orders 2k can be found by generalizing their structure.

28/34

slide-52
SLIDE 52

Projective planes

A projective plane is a square {0, 1}-matrix such that any two columns or rows have an inner product of 1, the matrix has dimension n2 + n + 1, and each column/rowsum is n + 1. Such a projective plane is said to have order n.

29/34

slide-53
SLIDE 53

Projective planes

A projective plane is a square {0, 1}-matrix such that any two columns or rows have an inner product of 1, the matrix has dimension n2 + n + 1, and each column/rowsum is n + 1. Such a projective plane is said to have order n. Explicit constructions are known when n is a prime power.

29/34

slide-54
SLIDE 54

The first critical value of n is n = 10. A thorough investigation of this case is currently beyond the facilities

  • f computing machines.

Marshall Hall Jr. Finite Projective Planes 1955

30/34

slide-55
SLIDE 55

Projective planes of order ten: Weight 15 codewords

The simplest case of this search has been verified by at least three different independent implementations on modern desktops:

◮ Implementation in C, runs in 78 minutes. ◮ Implementation in GAP, runs in 7 minutes. ◮ Implementation in Mathematica, runs in 55 minutes.

31/34

slide-56
SLIDE 56

Projective planes of order ten: Weight 15 codewords

The simplest case of this search has been verified by at least three different independent implementations on modern desktops:

◮ Implementation in C, runs in 78 minutes. ◮ Implementation in GAP, runs in 7 minutes. ◮ Implementation in Mathematica, runs in 55 minutes.

We verified this using a SAT+CAS method in under 10 seconds.

31/34

slide-57
SLIDE 57

Learning method

SAT solver CAS partial projective plane

32/34

slide-58
SLIDE 58

Learning method

SAT solver CAS partial projective plane

The CAS computes a nontrivial symmetry P of the plane. . .

32/34

slide-59
SLIDE 59

Learning method

SAT solver CAS partial projective plane

  • p∈P

p true

¬p

The CAS computes a nontrivial symmetry P of the plane. . . . . . and a symmetry blocking clause is learned.

32/34

slide-60
SLIDE 60

Conclusion

The SAT+CAS paradigm is currently the fastest way of performing searches for certain combinatorial objects.

33/34

slide-61
SLIDE 61

Conclusion

The SAT+CAS paradigm is currently the fastest way of performing searches for certain combinatorial objects. Moreover, the code tends to be simpler: no need to write and

  • ptimize a special-purpose search algorithm.

33/34

slide-62
SLIDE 62

Conclusion

The SAT+CAS paradigm is currently the fastest way of performing searches for certain combinatorial objects. Moreover, the code tends to be simpler: no need to write and

  • ptimize a special-purpose search algorithm.

The main difficulty lies in setting up and tuning the learning method, requiring expertise in both SAT solvers and the problem domain.

33/34

slide-63
SLIDE 63

Future work

I have been awarded an NSERC PDF to further develop the SAT+CAS paradigm over the next two years and I’m open to new applications or collaborations!

34/34