A SAT + CAS Approach to Finding Good Matrices: New Examples and - - PowerPoint PPT Presentation

a sat cas approach to finding good matrices
SMART_READER_LITE
LIVE PREVIEW

A SAT + CAS Approach to Finding Good Matrices: New Examples and - - PowerPoint PPT Presentation

A SAT + CAS Approach to Finding Good Matrices: New Examples and Counterexamples Curtis Bright University of Waterloo Dragomir okovi University of Waterloo Ilias Kotsireas Wilfrid Laurier University Vijay Ganesh University of Waterloo


slide-1
SLIDE 1

A SAT+CAS Approach to Finding Good Matrices:

New Examples and Counterexamples Curtis Bright

University of Waterloo

Dragomir Ðoković

University of Waterloo

Ilias Kotsireas

Wilfrid Laurier University

Vijay Ganesh

University of Waterloo

1/24

slide-2
SLIDE 2

SAT:

Boolean satisfiability problem

2/24

slide-3
SLIDE 3

SAT:

Boolean satisfiability problem

SAT solvers: Glorified brute force

2/24

slide-4
SLIDE 4

CAS:

Computer algebra system

3/24

slide-5
SLIDE 5

CAS:

Computer algebra system

Mathematical expression manipulators

3/24

slide-6
SLIDE 6

SAT + CAS

Brute force + Knowledge

4/24

slide-7
SLIDE 7

The research areas of SMT [SAT Modulo Theories] solving and symbolic computation are quite disconnected. [. . . ] More common projects would allow to join forces and commonly develop improvements on both sides.

Erika Ábrahám. Building bridges between symbolic computation and satisfiability checking. ISSAC invited talk, 2015.

5/24

slide-8
SLIDE 8

Hadamard matrices

◮ 125 years ago Jacques Hadamard defined what are now known

as Hadamard matrices.

◮ Square matrices with ±1 entries and pairwise orthogonal rows.

Jacques Hadamard. Résolution d’une question relative aux déterminants. Bulletin des sciences mathématiques, 1893.

6/24

slide-9
SLIDE 9

The Hadamard conjecture

◮ The Hadamard conjecture says that Hadamard matrices exist

in order 4n for all positive integers n.

◮ Strongly expected to hold but still open after 125 years.

7/24

slide-10
SLIDE 10

The skew Hadamard conjecture

◮ A matrix is skew if its diagonal entries are 1 and its entry at

(i, j) is the negative of its entry at (j, i).

◮ The skew Hadamard conjecture says that skew Hadamard

matrices exist in order 4n for all positive integers n.

8/24

slide-11
SLIDE 11

Good matrices

In 1970, Jennifer Seberry Wallis discovered a way to construct skew Hadamard matrices of order 4n using four “good” matrices A, B, C, D of order n with ±1 entries.

9/24

slide-12
SLIDE 12

Good matrices

In 1970, Jennifer Seberry Wallis discovered a way to construct skew Hadamard matrices of order 4n using four “good” matrices A, B, C, D of order n with ±1 entries.

Properties

◮ A is skew and B, C, D are symmetric. ◮ Every row is a shift of the previous row. ◮ AAT + B2 + C 2 + D2 is the identity matrix scaled by 4n.

9/24

slide-13
SLIDE 13

A skew Hadamard matrix of order 4 · 57 = 228 Constructed using the good matrices A, B, C, D.

10/24

slide-14
SLIDE 14

The good matrix conjecture

. . . it is conceivable that [good matrices] exist for all n = 2m + 1, m ≥ 1 and it is worth testing this hypothesis at least for those orders which are accessible to present day computers. . .

George Szekeres. A note on skew type orthogonal ±1 matrices. Combinatorics, Colloquia Mathematica Societatis János Bolyai, 1988.

11/24

slide-15
SLIDE 15

Known good matrices

In 1970, Seberry found good matrices in the orders 3, 5, 7, 9, 11, 13, 15, and 19.

1970

| |

2019

12/24

slide-16
SLIDE 16

Known good matrices

In 1971, Seberry found a set of good matrices in order 23.

1970 1971

| | |

2019

12/24

slide-17
SLIDE 17

Known good matrices

In 1972, Hunt found new good matrices in the orders 7, 11, 13, 15, 17, 19, 21 (via a complete search) and order 25.

1970 1972

| | | |

2019

12/24

slide-18
SLIDE 18

Known good matrices

In 1988, Szekeres found new good matrices in the orders 23, 25, 27, 29, and 31 (via a complete search).

1970 1988

| | | | |

2019

12/24

slide-19
SLIDE 19

Known good matrices

In 1993, Ðoković found new good matrices in the orders 33, 35, and 127.

1970 1993

| | | | | |

2019

12/24

slide-20
SLIDE 20

Known good matrices

In 2002, Georgiou, Koukouvinos, and Stylianou found new good matrices in the orders 33, 35, 37, and 39 (via a complete search) showing that the good matrix conjecture holds for n < 40.

1970 2002

| | | | | | |

2019

12/24

slide-21
SLIDE 21

Known good matrices

In 2018, Ðoković and Kotsireas found new good matrices in the

  • rders 43 and 45 (via a complete search) and found that 41,

47, and 49 are counterexamples to the good matrix conjecture.

1970 2018

| | | | | | | |

2019

12/24

slide-22
SLIDE 22

Known good matrices

In our paper we find new good matrices in the orders 27 and 57 (via a complete search) and found that 51, 63, and 69 are counterexamples to the good matrix conjecture.

1970 2019

| | | | | | | | | 12/24

slide-23
SLIDE 23

System overview

Good matrix conjecture in order n Preprocessing SAT solver Good matrix Counterexample SAT instance UNSAT SAT

13/24

slide-24
SLIDE 24

System overview

Good matrix conjecture in order n Preprocessing SAT solver Good matrix Counterexample SAT instance UNSAT SAT

This setup is simple but only works for small n.

13/24

slide-25
SLIDE 25

System overview

Good matrix conjecture in order n Preprocessing SAT solver Good matrices Counterexample SAT instances UNSAT SAT

Split up the search space during preprocessing:

Solvers perform better on smaller search spaces and the subspaces are independent so can be solved in parallel.

13/24

slide-26
SLIDE 26

Splitting

The simplest thing would be to fix the first entries of A, but this does not perform well.

14/24

slide-27
SLIDE 27

Splitting

The simplest thing would be to fix the first entries of A, but this does not perform well.

Compression

◮ Instead, we fix the entries of the compression of A. ◮ Compression of a row of order n is defined as follows:

A = [a0, a1, a2, a3, a4, a5, a6, a7, a8] A′ =

  • a0 + a3 + a6,

a1 + a4 + a7, a2 + a5 + a8

  • .

14/24

slide-28
SLIDE 28

Uncompression

Let the Boolean variables a0, . . . , an−1 represent the entries

  • f A with true representing 1 and false representing −1.

15/24

slide-29
SLIDE 29

Encoding in SAT

◮ Say the first entry in the 3-compression of A is 3, i.e.,

a0 + an/3 + a2n/3 = 3.

◮ We encode this in Boolean logic as the three unit clauses

a0, an/3, a2n/3.

16/24

slide-30
SLIDE 30

Encoding in SAT

◮ Say the first entry in the 3-compression of A is 1, i.e.,

a0 + an/3 + a2n/3 = 1.

◮ We encode this in Boolean logic as the four clauses

¬a0 ∨ ¬an/3 ∨ ¬a2n/3, a0 ∨ an/3, a0 ∨ a2n/3, an/3 ∨ a2n/3.

17/24

slide-31
SLIDE 31

System overview

Good matrix conjecture in order n Preprocessing SAT solver Good matrices Counterexample SAT instances UNSAT SAT

This works better but does not exploit theorems about good matrices that cannot easily be encoded in Boolean logic.

18/24

slide-32
SLIDE 32

System overview

Good matrix conjecture in order n Preprocessing SAT solver CAS Good matrices Counterexample SAT instances UNSAT SAT Assignment Clause

Encode some knowledge programmatically:

Allows encoding much more expressive constraints.

18/24

slide-33
SLIDE 33

Power spectral density

◮ The power spectral density PSDA(k) of A = [a0, . . . , an−1] is

the value

  • n−1
  • j=0

ajωjk

  • 2

where ω := exp(2πi/n).

◮ Can be computed very efficiently by CAS functions.

19/24

slide-34
SLIDE 34

Power spectral density

◮ The power spectral density PSDA(k) of A = [a0, . . . , an−1] is

the value

  • n−1
  • j=0

ajωjk

  • 2

where ω := exp(2πi/n).

◮ Can be computed very efficiently by CAS functions (but not

SAT solvers)!

19/24

slide-35
SLIDE 35

PSD filtering

If a sequence has a PSD value larger than 4n then it cannot be a row of a good matrix.

20/24

slide-36
SLIDE 36

Example

◮ Let n = 2m + 1. ◮ Say the SAT solver assigns the first m + 1 entries of A to 1

(true) and the last m entries of A to −1 (false).

21/24

slide-37
SLIDE 37

Example

◮ Let n = 2m + 1. ◮ Say the SAT solver assigns the first m + 1 entries of A to 1

(true) and the last m entries of A to −1 (false).

◮ In this case we can compute that PSDA(1) ≈ 0.4n2 which is

larger than 4n for large n.

21/24

slide-38
SLIDE 38

Example

◮ Let n = 2m + 1. ◮ Say the SAT solver assigns the first m + 1 entries of A to 1

(true) and the last m entries of A to −1 (false).

◮ In this case we can compute that PSDA(1) ≈ 0.4n2 which is

larger than 4n for large n.

Consequence

A cannot be a row of a good matrix, so the SAT solver learns the clause blocking A: ¬a0 ∨ · · · ∨ ¬am ∨ am+1 ∨ · · · ∨ an−1

21/24

slide-39
SLIDE 39

Filtering results

◮ A simple filtering approach would require knowing all values of

A, B, C, and D and blocking clauses would be of length 4n.

◮ The programmatic PSD filtering approach was hugely

successful, usually allowing the SAT solver to learn a blocking clause just of size n.

22/24

slide-40
SLIDE 40

Filtering results

◮ A simple filtering approach would require knowing all values of

A, B, C, and D and blocking clauses would be of length 4n.

◮ The programmatic PSD filtering approach was hugely

successful, usually allowing the SAT solver to learn a blocking clause just of size n.

◮ The programmatic approach was over 10 times faster in

  • rder 33 and the speedup looked exponential in n.

22/24

slide-41
SLIDE 41

Enumeration results

◮ Two new sets of good matrices: One of order 27 (missed by

Szekeres’ search) and one of order 57.

◮ Three new counterexamples: No good matrices exist in the

  • rders 51, 63, and 69. (Independent verification requested!)

◮ Code available from the MathCheck website:

uwaterloo.ca/mathcheck

23/24

slide-42
SLIDE 42

Conclusion

◮ The SAT+CAS paradigm is very general and can be applied

to problems in many domains, especially “needle-in-haystack” problems that require rich mathematics.

24/24

slide-43
SLIDE 43

Conclusion

◮ The SAT+CAS paradigm is very general and can be applied

to problems in many domains, especially “needle-in-haystack” problems that require rich mathematics.

◮ Make use of the immense amount of engineering effort that

has gone into CAS and SAT solvers.

24/24

slide-44
SLIDE 44

Conclusion

◮ The SAT+CAS paradigm is very general and can be applied

to problems in many domains, especially “needle-in-haystack” problems that require rich mathematics.

◮ Make use of the immense amount of engineering effort that

has gone into CAS and SAT solvers.

◮ Splitting up the problem in a way that takes advantage of this

requires domain knowledge.

24/24