A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf ·...
Transcript of A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf ·...
![Page 1: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/1.jpg)
A SAT+CAS Method for EnumeratingWilliamson Matrices of Even Order
Curtis Bright1 Ilias Kotsireas2 Vijay Ganesh1
1University of Waterloo2Wilfrid Laurier University
July 29, 2017
1/28
![Page 2: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/2.jpg)
Brute-brute force has no hope. But clever, inspiredbrute force is the future.
Dr. Doron Zeilberger, Rutgers University, 2015
2/28
![Page 3: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/3.jpg)
Roadmap
Motivation
Outline
Williamson Matrices
Programmatic SAT
Enumeration Method
Conclusion
Motivation 3/28
![Page 4: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/4.jpg)
Motivation
I Many conjectures in combinatorics concern the existence ornonexistence of combinatorial objects which are onlyfeasibly constructed through a search.
I To find large instances of these objects, it is necessary to usea computer with a clever search procedure.
Motivation 4/28
![Page 5: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/5.jpg)
Example
I Williamson matrices, first defined in 1944, were enumeratedup to order 59 in 2007 but only for odd orders1. They hadnever been enumerated in even orders until this work.
I We exhaustively enumerated Williamson matrices up toorder��ZZ44 64 and found that they are much more abundant ineven orders than odd orders.
1W. H. Holzmann, H. Kharaghani, B. Tayfeh-Rezaie, Williamson matricesup to order 59, Designs, Codes and Cryptography.
Motivation 5/28
![Page 6: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/6.jpg)
Roadmap
Motivation
Outline
Williamson Matrices
Programmatic SAT
Enumeration Method
Conclusion
Outline 6/28
![Page 7: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/7.jpg)
Motivational quote
The research areas of SMT [SAT Modulo Theories]solving and symbolic computation are quitedisconnected. [. . . ] More common projects wouldallow to join forces and commonly developimprovements on both sides.
Dr. Erika Ábrahám, RWTH Aachen University, 20152
2Building bridges between symbolic computation and satisfiabilitychecking. Invited talk, ISSAC 2015.
Outline 7/28
![Page 8: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/8.jpg)
How we performed the enumeration
I Used a reduction to the Boolean satisfiability problem(SAT).
I Used a SAT solver coupled with functionality fromnumerical libraries and a computer algebra system (CAS)to perform the search.
I Used the programmatic SAT solver MapleSAT3 whichcould programmatically learn conflict clauses, through apiece of code specifically tailored to the domain.
3J. Liang et al., Exponential Recency Weighted Average BranchingHeuristic for SAT Solvers, AAAI 2016
Outline 8/28
![Page 9: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/9.jpg)
The MathCheck2 system
Uses the SAT+CAS paradigm to finitely verify orcounterexample conjectures in mathematics, in particular theWilliamson conjecture.
Williamsonconjecture Generator MapleSAT
Maple,FFTW
FFTW
Williamson matrices Counterexample
Partial assignment Conflict clause
SAT instance
Instance solutions
Domain-specificinformation
https://sites.google.com/site/uwmathcheck/
Outline 9/28
![Page 10: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/10.jpg)
Roadmap
Motivation
Outline
Williamson Matrices
Programmatic SAT
Enumeration Method
Conclusion
Williamson Matrices 10/28
![Page 11: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/11.jpg)
The Williamson conjecture
It has been conjectured that an Hadamard matrix ofthis [Williamson] type might exist of every order 4t,at least for t odd.
Dr. Richard Turyn, Raytheon Company, 1972
Williamson Matrices 11/28
![Page 12: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/12.jpg)
Disproof of the Williamson conjecture
I Dragomir Ðoković showed in 1993 that t = 35 was acounterexample to the Williamson conjecture, i.e.,Williamson matrices of order 35 do not exist.
I His algorithm assumed the Williamson order was odd.
Williamson Matrices 12/28
![Page 13: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/13.jpg)
Williamson matrices
I n × n matrices A, B , C , D with ±1 entriesI symmetricI circulant (each row is a shift of the previous row)I A2 +B2 +C 2 +D2 = 4nIn
Williamson Matrices 13/28
![Page 14: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/14.jpg)
Williamson sequences
Williamson matrices can equivalently be defined using sequences:
I sequences A, B , C , D of length n with ±1 entriesI symmetricI PSDA(s) + PSDB (s) + PSDC (s) + PSDD(s) = 4n for all
s ∈ Z.
The values of the PSD (power spectral density) of X are thesquared absolute values of the discrete Fourier transform of X .
Williamson Matrices 14/28
![Page 15: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/15.jpg)
PSD criterion
Since PSD values are non-negative and
PSDA(s) + PSDB (s) + PSDC (s) + PSDD(s) = 4n ,
if PSDX (s) > 4n for some s then X is not a member of aWilliamson sequence.
ProblemHow can the PSD criterion be encoded in a SAT instance?
Williamson Matrices 15/28
![Page 16: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/16.jpg)
PSD criterion
Since PSD values are non-negative and
PSDA(s) + PSDB (s) + PSDC (s) + PSDD(s) = 4n ,
if PSDX (s) > 4n for some s then X is not a member of aWilliamson sequence.
ProblemHow can the PSD criterion be encoded in a SAT instance?
Williamson Matrices 15/28
![Page 17: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/17.jpg)
Roadmap
Motivation
Outline
Williamson Matrices
Programmatic SAT
Enumeration Method
Conclusion
Programmatic SAT 16/28
![Page 18: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/18.jpg)
Solution: Programmatic SAT
I A programmatic SAT solver4 contains a special callbackfunction which periodically examines the current partialassignment while the SAT solver is running.
I If it can determine that the partial assignment cannot beextended into a satisfying assignment then a conflict clauseis generated encoding that fact.
Williamsonconjecture Generator MapleSAT
Maple,FFTW
FFTW
Williamson matrices Counterexample
Partial assignment Conflict clause
SAT instance
Instance solutions
Domain-specificinformation
4V. Ganesh et al., Lynx: A programmatic SAT solver for theRNA-folding problem, SAT 2012
Programmatic SAT 17/28
![Page 19: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/19.jpg)
Programmatic PSD criterion
I Given a partial assignment, we compute PSDX (s) forX ∈ {A,B ,C ,D} whose entries are all currently set.
I If any PSD value is larger than 4n then we generate a clausewhich forbids the variables in X from being set the waythey currently are.
Programmatic SAT 18/28
![Page 20: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/20.jpg)
Programmatic results
I The programmatic approach was found to perform muchbetter than an approach which encoded the Williamsonsequence definition using CNF clauses:
order n programmatic speedup20 4.3322 7.0024 7.1226 27.0028 52.5630 52.2132 58.1634 138.3736 317.6138 377.8440 428.7142 1195.9944 2276.09
Programmatic SAT 19/28
![Page 21: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/21.jpg)
Roadmap
Motivation
Outline
Williamson Matrices
Programmatic SAT
Enumeration Method
Conclusion
Enumeration Method 20/28
![Page 22: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/22.jpg)
A Diophantine equation
The PSD criterion for s = 0 becomes
rowsum(A)2 + rowsum(B)2 + rowsum(C )2 + rowsum(D)2 = 4n .
In other words, every Williamson sequence provides adecomposition of 4n into a sum of four squares.
I There are usually only a few such decompositions.I A CAS (e.g., Maple) has functions designed to compute
the decompositions.
Enumeration Method 21/28
![Page 23: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/23.jpg)
A Diophantine equation
The PSD criterion for s = 0 becomes
rowsum(A)2 + rowsum(B)2 + rowsum(C )2 + rowsum(D)2 = 4n .
In other words, every Williamson sequence provides adecomposition of 4n into a sum of four squares.
I There are usually only a few such decompositions.
I A CAS (e.g., Maple) has functions designed to computethe decompositions.
Enumeration Method 21/28
![Page 24: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/24.jpg)
A Diophantine equation
The PSD criterion for s = 0 becomes
rowsum(A)2 + rowsum(B)2 + rowsum(C )2 + rowsum(D)2 = 4n .
In other words, every Williamson sequence provides adecomposition of 4n into a sum of four squares.
I There are usually only a few such decompositions.I A CAS (e.g., Maple) has functions designed to compute
the decompositions.
Enumeration Method 21/28
![Page 25: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/25.jpg)
Compression
When n is even we can compress a sequence of length n toobtain a sequence of length n/2:
A = [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9]
A ′ =[a0 + a5, a1 + a6, a2 + a7, a3 + a8, a4 + a9
].
Enumeration Method 22/28
![Page 26: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/26.jpg)
Ðoković–Kotsireas theorem
Any compression A ′, B ′, C ′, D ′ of a Williamson sequencesatisfies
PSDA ′(s) + PSDB ′(s) + PSDC ′(s) + PSDD ′(s) = 4n
for all s ∈ Z.
Enumeration Method 23/28
![Page 27: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/27.jpg)
Using compressions
I For a given even order n , searching for compressedWilliamson sequences is easier than searching foruncompressed Williamson sequences.
I With the help of a CAS we can generate all possiblecompressions.
I For each possible compression, we generate a SAT instancewhich encodes the problem of ‘uncompressing’ thatsequence.
Enumeration Method 24/28
![Page 28: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/28.jpg)
Example SAT instance
If A ′ = [2,−2, 0] was a possible compression, this implies that
a0 + a3 = 2
a1 + a4 = −2
a2 + a5 = 0
From which we generate the SAT clauses (with ‘true’representing 1 and ‘false’ representing −1)
a0 ∧ a3
¬a1 ∧ ¬a4
(a2 ∨ a5)∧ (¬a2 ∨ ¬a5)
Enumeration Method 25/28
![Page 29: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/29.jpg)
Results
n Gen. time (m) Solve time (m) # instances #Wn2 0.00 0.00 1 14 0.00 0.00 1 16 0.00 0.00 1 18 0.00 0.00 1 110 0.00 0.00 2 212 0.00 0.00 3 314 0.00 0.00 3 716 0.00 0.00 5 618 0.00 0.01 22 4020 0.00 0.01 21 2722 0.00 0.01 22 2724 0.00 0.06 176 8026 0.01 0.01 24 3828 0.01 0.03 78 9930 0.14 0.11 281 26832 0.06 0.38 1064 20034 4.17 0.09 214 16036 6.21 1.10 1705 69138 67.55 0.18 360 8740 152.03 28.78 40924 189842 1416.95 2.47 2945 56144 1091.55 2.25 1523 378
The amount of time used to generate and solve the SAT instances, the number ofinstances generated, and the number of Williamson sequences found (#Wn ).
Enumeration Method 26/28
![Page 30: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/30.jpg)
Roadmap
Motivation
Outline
Williamson Matrices
Programmatic SAT
Enumeration Method
Conclusion
Conclusion 27/28
![Page 31: A SAT+CAS Method for Enumerating Williamson Matrices of ...cbright/talks/willevenslides.pdf · Example I Williamsonmatrices,firstdefinedin1944,wereenumerated uptoorder59in2007butonlyforoddorders1.Theyhad](https://reader033.fdocuments.us/reader033/viewer/2022041806/5e5463cf62238711747de4e3/html5/thumbnails/31.jpg)
In summary
I We have demonstrated the power of the SAT+CASparadigm and the programmatic SAT paradigm by applyingthem to the combinatorial Williamson conjecture.
I Provided an enumeration for the first time of Williamsonsequences for even orders up to��ZZ44 64.
I Shown that Williamson matrices are much more numerousin even orders. (No odd order is known for which#Wn > 10, yet #W64 = 95,504.)
Conclusion 28/28