MathCheck2: A SAT+CAS Verifier for Combinatorial Conjectures

Similar documents
MathCheck2: A SAT+CAS Verifier for Combinatorial Conjectures

MathCheck2: Combining SAT and CAS Presentation at Applications of Computer Algebra 2016 Kassel, Germany

MathCheck: A SAT+CAS Mathematical Conjecture Verifier

Combining SAT Solvers with Computer Algebra Systems to Verify Combinatorial Conjectures

Cyclic (v; k 1, k 2, k 3 ; λ) difference families with v 3 (mod 4) a prime

Interpolation. Seminar Slides. Betim Musa. 27 th June Albert-Ludwigs-Universität Freiburg

Some new periodic Golay pairs

Correcting Codes in Cryptography

conp = { L L NP } (1) This problem is essentially the same as SAT because a formula is not satisfiable if and only if its negation is a tautology.

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Algebraic Methods. Motivation: Systems like this: v 1 v 2 v 3 v 4 = 1 v 1 v 2 v 3 v 4 = 0 v 2 v 4 = 0

TC08 / 6. Hadamard codes SX

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Binary codes of t-designs and Hadamard matrices

AUTOMORPHISM GROUPS AND SPECTRA OF CIRCULANT GRAPHS

Fast DQBF Refutation

Solving Quantified Verification Conditions using Satisfiability Modulo Theories

CSE 20 DISCRETE MATH. Fall

Lecture 9: The Splitting Method for SAT

Hadamard ideals and Hadamard matrices with two circulant cores

Quantum LDPC Codes Derived from Combinatorial Objects and Latin Squares

Trades in complex Hadamard matrices

SAT/SMT/AR Introduction and Applications

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Cardinality Networks: a Theoretical and Empirical Study

Towards Lightweight Integration of SMT Solvers

Chapter 2 Combinational Logic Circuits

On Solving Boolean Combinations of UTVPI Constraints

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Goethals Seidel difference families with symmetric or skew base blocks

Some new orders of Hadamard and Skew-Hadamard matrices

Lecture 18: P & NP. Revised, May 1, CLRS, pp

ORTHOGONAL ARRAYS OF STRENGTH 3 AND SMALL RUN SIZES

SMT Unsat Core Minimization

Construction of latin squares of prime order

Linear Algebra, Boolean Rings and Resolution? Armin Biere. Institute for Formal Models and Verification Johannes Kepler University Linz, Austria

Simulation of quantum computers with probabilistic models

Satisfiability Modulo Theories (SMT)

Scalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa

NUMBERS AND CODES CHAPTER Numbers

Outline. Criteria of good signal sets. Interleaved structure. The main results. Applications of our results. Current work.

Propositional Calculus

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz

Hadamard Matrices, d-linearly Independent Sets and Correlation-Immune Boolean Functions with Minimum Hamming Weights

And for polynomials with coefficients in F 2 = Z/2 Euclidean algorithm for gcd s Concept of equality mod M(x) Extended Euclid for inverses mod M(x)

2. Polynomials. 19 points. 3/3/3/3/3/4 Clearly indicate your correctly formatted answer: this is what is to be graded. No need to justify!

Ranks of Hadamard Matrices and Equivalence of Sylvester Hadamard and Pseudo-Noise Matrices

FRACTIONAL FACTORIAL DESIGNS OF STRENGTH 3 AND SMALL RUN SIZES

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Critical Groups for Cayley Graphs of Bent Functions

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

ORDERS OF ELEMENTS IN A GROUP

NUMBERS WITH INTEGER COMPLEXITY CLOSE TO THE LOWER BOUND

This appendix provides a very basic introduction to linear algebra concepts.

Strongly Regular Decompositions of the Complete Graph

Square 2-designs/1. 1 Definition

1 Propositional Logic

Exact SAT-based Toffoli Network Synthesis

MATH10212 Linear Algebra B Homework Week 4

The Potential and Challenges of CAD with Equational Constraints for SC-Square

A Short Overview of Orthogonal Arrays

Formal Verification Methods 1: Propositional Logic

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Some results on the existence of t-all-or-nothing transforms over arbitrary alphabets

Introduction to Algorithms

Key words. silver matrix, graph colouring, coding theory, domination in graphs, finite projective

Comp487/587 - Boolean Formulas

MTH 309 Supplemental Lecture Notes Based on Robert Messer, Linear Algebra Gateway to Mathematics

MACHINE COMPUTING. the limitations

SAT Modulo Linear Arithmetic for Solving Polynomial Constraints

The Eager Approach to SMT. Eager Approach to SMT

Algorithms for Satisfiability beyond Resolution.

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Chapter 11 Evolution by Permutation

PCP Theorem and Hardness of Approximation

NONABELIAN GROUPS WITH PERFECT ORDER SUBSETS

Information Flow Analysis via Path Condition Refinement

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Symmetry Breaking using Value Precedence

1 Introduction In [2] a method for computing the Walsh spectrum in R-encoding of a completely specified binary-valued function was presented based on

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

#A32 INTEGERS 10 (2010), TWO NEW VAN DER WAERDEN NUMBERS: w(2; 3, 17) AND w(2; 3, 18)

Complex Hadamard matrices and 3-class association schemes

Hadamard matrices and strongly regular graphs with the 3-e.c. adjacency property

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Difference sets and Hadamard matrices

An Introduction to SAT Solving

NAME MATH 304 Examination 2 Page 1

Formal methods in analysis

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT

Can You Hear Me Now?

Computer Organization: Boolean Logic

Chapter 2 Combinational Logic Circuits

Algebraic aspects of Hadamard matrices

Database Theory VU , SS Ehrenfeucht-Fraïssé Games. Reinhard Pichler

A Concurrency Problem with Exponential DPLL(T ) Proofs

Combinational Logic. By : Ali Mustafa

An Overview of Complex Hadamard Cubes

Encoding Basic Arithmetic Operations for SAT-Solvers

Transcription:

MathCheck2: A SAT+CAS Verifier for Combinatorial Conjectures Curtis Bright University of Waterloo May 13, 2016 1 / 26

Motivation The research areas of SMT [SAT-Modulo-Theories] solving and symbolic computation are quite disconnected. On the one hand, SMT solving has its strength in efficient techniques for exploring Boolean structures, learning, combining solving techniques, and developing dedicated heuristics, but its current focus lies on easier theories and it makes use of symbolic computation results only in a rather naive way. Erica Ábrahám 1 1 Building bridges between symbolic computation and satisfiability checking. Proceedings of the 2015 International Symposium on Symbolic and Algebraic Computation. 2 / 26

Satisfiability checking Problem statement Given a logical formula, determine if it is satisfiable. A logical formula is an expression involving Boolean variables and logical connectives such as,,. A formula is satisfiable if there exists an assignment to the variables which make the formula true. Example Is (x y z ) ( x y) z satisfiable? 3 / 26

Satisfiability checking Problem statement Given a logical formula, determine if it is satisfiable. A logical formula is an expression involving Boolean variables and logical connectives such as,,. A formula is satisfiable if there exists an assignment to the variables which make the formula true. Example Is (x y z ) ( x y) z satisfiable? Yes: Take x to be false, and take y and z to be true. 3 / 26

The MathCheck2 System Uses SAT and CAS functionality to finitely verify or counterexample conjectures in mathematics. Used to study conjectures in combinatorial design theory about the existence of Hadamard and Williamson matrices. CAS SAT instance Problem Generator SAT SAT solver result SAT (Solution / UNSAT core) UNSAT Authors Curtis Bright, Vijay Ganesh, Albert Heinle, Ilias Kotsireas, Saeed Nejati, Krzysztof Czarnecki 4 / 26

Experimental Results MathCheck2 was able to show that... Williamson matrices of order 35 do not exist. Used under 9 hours of computation time on SHARCNET 2. First shown by Ðoković 3, who requested an independent verification. Williamson matrices exist for all orders n < 35. Even orders were mostly previously unstudied. Found over 160 Hadamard matrices which were not previously in the library of the CAS Magma. 2 64-bit AMD Opteron processors running at 2.2 GHz 3 Williamson matrices of order 4n for n = 33, 35, 39. Discrete Mathematics. 5 / 26

Hadamard matrices square matrix with ±1 entries any two distinct rows are orthogonal 6 / 26

Hadamard matrices square matrix with ±1 entries any two distinct rows are orthogonal Example 1 1 1 1 1 1 1 1 H = 1 1 1 1 1 1 1 1 Conjecture An n n Hadamard matrix exists for any n a multiple of 4. 6 / 26

Naive Hadamard Encoding Each entry of H will be represented using a Boolean variable encoding with BV(1) = true and BV( 1) = false. Multiplication becomes XNOR under this encoding, i.e., BV(x y) = (BV(x ) BV(y)) for x, y {±1}. 7 / 26

Naive Hadamard Encoding Arithmetic formula encoding n 1 h ik h jk = 0 for all i j. k=0 Boolean variable encoding Using product variables p ijk := BV(h ik h jk ) this becomes the cardinality constraints n 1 k=0 p ijk true 1 = n 2 for all i j. 8 / 26

Naive Hadamard Encoding A binary adder consumes Boolean values and produces Boolean values; when thought of as bits, the outputs contain the binary representation of how many inputs were true. a b s = a b c = a b To encode the cardinality constraints we use a network of binary adders with: n inputs (the variables { p ijk } n 1 k=0 ) log 2 n + 1 outputs (counting the number of input variables which are true) 9 / 26

Williamson Matrices n n matrices A, B, C, D entries ±1 symmetric, circulant A 2 + B 2 + C 2 + D 2 = 4nI n 10 / 26

Symmetric and Circulant Matrices Such matrices are defined by their first n+1 2 entries so we may refer to them as if they were sequences. Examples (n = 5 and 6) a 0 a 1 a 2 a 2 a 1 a 1 a 0 a 1 a 2 a 2 a 2 a 1 a 0 a 1 a 2 a 2 a 2 a 1 a 0 a 1 a 1 a 2 a 2 a 1 a 0 a 0 a 1 a 2 a 3 a 2 a 1 a 1 a 0 a 1 a 2 a 3 a 2 a 2 a 1 a 0 a 1 a 2 a 3 a 3 a 2 a 1 a 0 a 1 a 2 a 2 a 3 a 2 a 1 a 0 a 1 a 1 a 2 a 3 a 2 a 1 a 0 symmetric conditions circulant conditions 11 / 26

Symmetric and Circulant Matrices Such matrices are defined by their first n+1 2 entries so we may refer to them as if they were sequences. Examples (n = 5 and 6) a 0 a 1 a 2 a 2 a 1 a 1 a 0 a 1 a 2 a 2 a 2 a 1 a 0 a 1 a 2 a 2 a 2 a 1 a 0 a 1 a 1 a 2 a 2 a 1 a 0 a 0 a 1 a 2 a 3 a 2 a 1 a 1 a 0 a 1 a 2 a 3 a 2 a 2 a 1 a 0 a 1 a 2 a 3 a 3 a 2 a 1 a 0 a 1 a 2 a 2 a 3 a 2 a 1 a 0 a 1 a 1 a 2 a 3 a 2 a 1 a 0 symmetric conditions circulant conditions 11 / 26

Williamson Matrices Sequences sequences A, B, C, D of length n+1 2 entries ±1 PAF A (s) + PAF B (s) + PAF C (s) + PAF D (s) = 0 for s = 1,..., n 1 2. The PAF 4 here is defined n 1 PAF A (s) := a k a (k+s) mod n. k=0 4 Periodic Autocorrelation Function 12 / 26

Compression The m-compression of a sequence A = [a 0,..., a n 1 ] of length n = dm is the sequence of length d Example A (d) := [ a (d) 0,..., a (d) ] d 1 where a (d) m 1 j := a j +kd. k=0 The sequence A = [a 0, a 1, a 2, a 3, a 4, a 5, a 6, a 7, a 8, a 9 ] has the 5-compression A (2) = [ a 0 + a 2 + a 4 + a 6 + a 8, a 1 + a 3 + a 5 + a 7 + a 9 ]. 13 / 26

Compression The m-compression of a sequence A = [a 0,..., a n 1 ] of length n = dm is the sequence of length d Example A (d) := [ a (d) 0,..., a (d) ] d 1 where a (d) m 1 j := a j +kd. k=0 The sequence A = [a 0, a 1, a 2, a 3, a 4, a 5, a 6, a 7, a 8, a 9 ] has the 2-compression A (5) = [ a 0 + a 5, a 1 + a 6, a 2 + a 7, a 3 + a 8, a 4 + a 9 ]. 13 / 26

Useful Properties of Compressed Sequences Lemma 1 The entries of an m-compression of a ±1-sequence of length dm: have absolute value at most m have the same parity as m Lemma 2 The compression of a symmetric sequence is also symmetric. 14 / 26

Technique 1: Sum-of-squares Decomposition Ðoković Kotsireas 5 theorem Williamson sequences satisfy PAF A (d)(0) + PAF B (d)(0) + PAF C (d)(0) + PAF D (d)(0) = 4n. When d = 1, this becomes rowsum(a) 2 + rowsum(b) 2 + rowsum(c ) 2 + rowsum(d) 2 = 4n. 5 Compression of periodic complementary sequences and applications. Designs, Codes and Cryptography 15 / 26

Technique 1: Sum-of-squares Decomposition Why is this useful? CAS functions exist which can determine all possible solutions of w 2 + x 2 + y 2 + z 2 = 4n w, x, y, z n (mod 2). This tells us all possibilities for the rowsums of A, B, C, D. We can then use binary adders to encode the constraints rowsum(a) = w rowsum(c ) = y rowsum(b) = x rowsum(d) = z and pass that information to the SAT solver. 16 / 26

Technique 1: Sum-of-squares Decomposition Example When n = 35, there are exactly three ways to write 4n as a sum of four positive odd squares in ascending order: 1 2 + 3 2 + 3 2 + 11 2 = 4 35 1 2 + 3 2 + 7 2 + 9 2 = 4 35 3 2 + 5 2 + 5 2 + 9 2 = 4 35 17 / 26

Williamson Equivalences Williamson sequences A, B, C, D can be re-ordered and negated without affecting the Williamson conditions. Given this, we may enforce the constraint 0 rowsum(a) rowsum(b) rowsum(c ) rowsum(d). 18 / 26

Technique 2: Divide-and-conquer For efficiency reasons, we want to partition the search space into subspaces. An effective way to do this is to have each subspace contain one possibility for the compressions of A, B, C, D. Determine all possible compressions with Lemmas 1 and 2. Use the ÐK theorem to remove possibilities which are necessarily invalid (for example, because their power spectral density is too large). 19 / 26

Power Spectral Density The power spectral density of a sequence A is PSD A (s) := DFT A (s) 2 where DFT A is the discrete Fourier transform of A. Example The power spectral density of A = [1, 1, 1, 1, 1] is given by: PSD A (0) = 1 2 = 1 PSD A (1) 3.236 2 = 10.472 PSD A (2) ( 1.236) 2 = 1.528 PSD A (3) ( 1.236) 2 = 1.528 PSD A (4) 3.236 2 = 10.472 20 / 26

Ðoković Kotsireas Theorem For all s Z, Williamson sequences satisfy PSD A (s) + PSD B (s) + PSD C (s) + PSD D (s) = 4n and these still hold if A, B, C, D are replaced with their compressions. Corollary PSD X (s) 4n if X is a Williamson sequence or a compression of a Williamson sequence. 21 / 26

Technique 2: Divide-and-conquer For n = 35 with 7-compression, the following is one of 119 compressions which satisfy the ÐK conditions: A (5) = [ 5, 1, 3, 3, 1 ] B (5) = [ 3, 3, 3, 3, 3 ] C (5) = [ 3, 1, 1, 1, 1 ] D (5) = [ 1, 3, 3, 3, 3 ] 22 / 26

Technique 2: Divide-and-conquer If n has more than one nontrivial factor it is possible to perform compression by both factors. This increases the number of subspaces, but decreases the size of each subspace. Example Using 5 and 7-compression on n = 35 lead to the following number of subspaces for each decomposition type: Instance type # subspaces 1 2 + 3 2 + 3 2 + 11 2 6960 1 2 + 3 2 + 7 2 + 9 2 8424 3 2 + 5 2 + 5 2 + 9 2 6290 23 / 26

Technique 3: UNSAT Core When an instance is found to be unsatisfiable, some SAT solvers can generate an UNSAT core containing which of those variables lead to the UNSAT result. We can prune instances which set the same variables to the same values. Example The n = 35 instances contained 3376 variables but only 168 were set differently between instances (those which encode the rowsum and compression values). 24 / 26

Experimental Results Timings on SHARCNET for Williamson orders 25 n 35 are below. The number of SAT calls which successfully returned a result is in parenthesis. A hyphen denotes a timeout after 24h. Order Base Sum-of-squares Divide-and-conquer UNSAT Core 25 317s (1) 1702s (4) 408s (179) 408s (179) 26 865s (1) 3818s (3) 61s (3136) 34s (1592) 27 5340s (1) 8593s (3) 1518s (14994) 1439s (689) 28 7674s (1) 2104s (2) 234s (13360) 158s (439) 29-21304s (1) N/A N/A 30 1684s (1) 36804s (1) 139s (370) 139s (370) 31-83010s (1) N/A N/A 32 - - 96011s (13824) 95891s (348) 33 - - 693s (8724) 683s (7603) 34 - - 854s (732) 854s (732) 35 - - 31816s (21674) 31792s (19356) 25 / 26

Conclusion We have... Outlined how MathCheck2 uses the power of SAT solvers in combination with domain specific knowledge and algorithms provided by computer algebra systems. Performed a requested verification of a nonexistence result using a new algorithm and techniques which generalize to other conjectures. Submitted new matrices to Magma s Hadamard database, including some generated by Williamson matrices of even order. 26 / 26