SlideShare a Scribd company logo
1 of 21
Boolean Equi-propagation for Optimized SAT Encoding AmitMetodi, Michael Codish, Vitaly Lagoon, and Peter J. Stuckey
Finite Domain Problem Solving ,[object Object]
Large CNFProblem (hard) Constraint Model CNF Encoding Model Direct CSP solving SAT solving Solution Satisfied assignment Model Solution Decoding Translate
Optimized SAT Encoding Problems: ,[object Object]
Large CNFConstraint Model Encoding CNF Simplify CNF’ Simplified Model Encoding Partial Evaluation CNF’’ Simplified Model’ Encoding Partial Evaluationusing Equi-Propagation Tools such as: SatELite, ReVivAl Based on Unit Propagation and Resolution. Simplified CNF
Our Approach Constraint ( C2, B2 ) Constraint ( C3, B3 ) Constraint ( Cn, Bn ) Constraint ( C1, B1 ) … M = Simplify Boolean techniques CSP techniques Equi-Propagation Constraint ( C1, B1 ) Constraint ( C’3, B‘3 ) Constraint ( C’n, B’n) Constraint ( C2, B2 ) … M’ = Encoding Standard encodings φ1 φ'3 φ'n … φ =
Outline ,[object Object]
Equi-Propagation
Experimentation
Conclusions,[object Object]
Why Order Encoding ? ,[object Object],X 1 0 X ≥ i X < j i j ,[object Object],X v u i b=c e=f=g a b d c e f g ,[object Object],+ 3 =  * 3 =  a a a b b b c c c a c b a c b c f 1 1 1 c b a div 3 =  c b a f e d g
Equi-Propagation Equi-propagation is the process of inferring new equationalconsequences from a constraint in the model (and other existing equational information). x= -y, x=y, x=0, x=1 single x can now be removed from all constraints.
Equi-Propagation Example Learned: Partial Data: U1     { 0..4 }        U1 = [x1,x2,x3,x4] U2     { 0..4 }        U2 = [y1,y2,y3,y4] Xs = [a,d,b,x3,y2,c,y4] U1     { 1,3 }        U1 = [1,x2,x2,0] U2     { 1,3 }        U2 = [1,y2,y2,0] Xs = [a,1,b,x2,y2,c,0] U1     { 1,3 }        U1 = [1,x2,x2,0] U2     { 1,3 }        U2 = [1,-x2,-x2,0] Xs = [a,1,b,x2,-x2,c,0] 1≤U1≤3  and   U1 ≠ 2  1≤U2≤3   and  U2 ≠ 2  d = 1 x1=1, x3=x2 , x4=0 y1=1, y3=y2 , y4=0 d = 1 U1 ≠ U2  (y2= -x2) diff(U1,U2) sumBits(Xs)=3 Constraints Constraints … … diff(U1,U2) … sumBits([a,b,c])=1 Constraints Encoding Encoding Encoding Simplify Simplify Simplify Simplify φsumBits([a,b,c])=1 φConstraints φConstraints … …
Equi-Propagation ,[object Object]
Global constraints (such as allDiff) implemented using Ad-Hoc rules.
There is a strong connection between Simplify and Encoding because Simplify done on the “encoding bits” and might change the encoding accordingly.,[object Object]
balanced incomplete block designs (BIBD) Definition: a 5-tuple of positive integers <v, b, r, k, l> and require to partition v distinct objects into b blocks such that each block contains k different objects, exactly r objects occur in each block, and every two distinct objects occur in exactly l blocks. Variables: B11, …, Bbv Domains:Bijϵ{0,1} Constraints:  each row constraint: sum(Bi1,…,Biv) = r each column constraint: sum(B1i,…,Bbi) = k each two rows constraint: sum(Bi1*Bj1, …,Biv*Bjv)= l b=10 v=6 BIBD <6,10,5,3,2>
We can swap between two rows or two columns to generate another valid solution. Balanced Incomplete Block Designs (BIBD) r k r-l l <v, b, r, k, l>
BIBD – BEEvs Sugar (CSP to CNF Encoder) Faster time to generate CNF Smaller CNF Faster SAT solving time
BIBD – BEEvsSatELite (CNF-Level preprocessor) Preprocess time About the same size Solving time
Conclusions Constraint ( C2, φ2 ) Constraint ( C3, φ3 ) Constraint ( Cn, φn ) Constraint ( C1, φ1 ) … M = Constraint Model Encoding CNF ,[object Object]

More Related Content

What's hot

Chapter 7: Matrix Multiplication
Chapter 7: Matrix MultiplicationChapter 7: Matrix Multiplication
Chapter 7: Matrix MultiplicationHeman Pathak
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometryppd1961
 
Overlapping T-block analysis and genetic optimization of rectangular grooves ...
Overlapping T-block analysis and genetic optimization of rectangular grooves ...Overlapping T-block analysis and genetic optimization of rectangular grooves ...
Overlapping T-block analysis and genetic optimization of rectangular grooves ...Yong Heui Cho
 
COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...
COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...
COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...cscpconf
 
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기NAVER D2
 
Blur Filter - Hanpo
Blur Filter - HanpoBlur Filter - Hanpo
Blur Filter - HanpoHanpo Cheng
 
Performance Improvement of Vector Quantization with Bit-parallelism Hardware
Performance Improvement of Vector Quantization with Bit-parallelism HardwarePerformance Improvement of Vector Quantization with Bit-parallelism Hardware
Performance Improvement of Vector Quantization with Bit-parallelism HardwareCSCJournals
 
Chapter 5: Mapping and Scheduling
Chapter  5: Mapping and SchedulingChapter  5: Mapping and Scheduling
Chapter 5: Mapping and SchedulingHeman Pathak
 
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch NetworkHiroshi Fukui
 
Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++Darshan Parsana
 
Mm chap08 -_lossy_compression_algorithms
Mm chap08 -_lossy_compression_algorithmsMm chap08 -_lossy_compression_algorithms
Mm chap08 -_lossy_compression_algorithmsEellekwameowusu
 
Efficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsEfficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsIOSR Journals
 
Civil engineering mock test
Civil engineering mock testCivil engineering mock test
Civil engineering mock testakshay015
 
Non-local Neural Network
Non-local Neural NetworkNon-local Neural Network
Non-local Neural NetworkHiroshi Fukui
 
Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...
Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...
Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...MLconf
 
An Introduction to Coding Theory
An Introduction to Coding TheoryAn Introduction to Coding Theory
An Introduction to Coding TheoryAlexanderWei11
 

What's hot (20)

Me 530 assignment 2
Me 530 assignment 2Me 530 assignment 2
Me 530 assignment 2
 
Chapter 7: Matrix Multiplication
Chapter 7: Matrix MultiplicationChapter 7: Matrix Multiplication
Chapter 7: Matrix Multiplication
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometry
 
Overlapping T-block analysis and genetic optimization of rectangular grooves ...
Overlapping T-block analysis and genetic optimization of rectangular grooves ...Overlapping T-block analysis and genetic optimization of rectangular grooves ...
Overlapping T-block analysis and genetic optimization of rectangular grooves ...
 
COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...
COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...
COMPARATIVE STUDY ON BENDING LOSS BETWEEN DIFFERENT S-SHAPED WAVEGUIDE BENDS ...
 
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
 
DCT
DCTDCT
DCT
 
Blur Filter - Hanpo
Blur Filter - HanpoBlur Filter - Hanpo
Blur Filter - Hanpo
 
Performance Improvement of Vector Quantization with Bit-parallelism Hardware
Performance Improvement of Vector Quantization with Bit-parallelism HardwarePerformance Improvement of Vector Quantization with Bit-parallelism Hardware
Performance Improvement of Vector Quantization with Bit-parallelism Hardware
 
Chapter 5: Mapping and Scheduling
Chapter  5: Mapping and SchedulingChapter  5: Mapping and Scheduling
Chapter 5: Mapping and Scheduling
 
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
[MIRU2018] Global Average Poolingの特性を用いたAttention Branch Network
 
Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++
 
Mm chap08 -_lossy_compression_algorithms
Mm chap08 -_lossy_compression_algorithmsMm chap08 -_lossy_compression_algorithms
Mm chap08 -_lossy_compression_algorithms
 
Lossy
LossyLossy
Lossy
 
Efficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsEfficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixels
 
Civil engineering mock test
Civil engineering mock testCivil engineering mock test
Civil engineering mock test
 
Non-local Neural Network
Non-local Neural NetworkNon-local Neural Network
Non-local Neural Network
 
Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...
Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...
Danai Koutra – CMU/Technicolor Researcher, Carnegie Mellon University at MLco...
 
NCCU CPDA Lecture 12 Attribute Based Encryption
NCCU CPDA Lecture 12 Attribute Based EncryptionNCCU CPDA Lecture 12 Attribute Based Encryption
NCCU CPDA Lecture 12 Attribute Based Encryption
 
An Introduction to Coding Theory
An Introduction to Coding TheoryAn Introduction to Coding Theory
An Introduction to Coding Theory
 

Viewers also liked

Java Developer Working at CSIR-URDIP
Java Developer Working at CSIR-URDIPJava Developer Working at CSIR-URDIP
Java Developer Working at CSIR-URDIPLaxmi Narayan Khatri
 
Caracterizacion control-social-ciudadano
Caracterizacion control-social-ciudadanoCaracterizacion control-social-ciudadano
Caracterizacion control-social-ciudadanodmbetancourt
 
Presentation1
Presentation1Presentation1
Presentation1Qia99
 
Social media for your business (1)
Social media for your business (1)Social media for your business (1)
Social media for your business (1)Mziebell80
 
‘Ubuntu’ and the Social Justice African Diaspora Scholar
‘Ubuntu’ and the Social Justice African Diaspora Scholar‘Ubuntu’ and the Social Justice African Diaspora Scholar
‘Ubuntu’ and the Social Justice African Diaspora Scholarmogadime
 

Viewers also liked (7)

Java Developer Working at CSIR-URDIP
Java Developer Working at CSIR-URDIPJava Developer Working at CSIR-URDIP
Java Developer Working at CSIR-URDIP
 
Saving the fairy_tiger
Saving the fairy_tigerSaving the fairy_tiger
Saving the fairy_tiger
 
Caracterizacion control-social-ciudadano
Caracterizacion control-social-ciudadanoCaracterizacion control-social-ciudadano
Caracterizacion control-social-ciudadano
 
Its hot!!!!
Its hot!!!!Its hot!!!!
Its hot!!!!
 
Presentation1
Presentation1Presentation1
Presentation1
 
Social media for your business (1)
Social media for your business (1)Social media for your business (1)
Social media for your business (1)
 
‘Ubuntu’ and the Social Justice African Diaspora Scholar
‘Ubuntu’ and the Social Justice African Diaspora Scholar‘Ubuntu’ and the Social Justice African Diaspora Scholar
‘Ubuntu’ and the Social Justice African Diaspora Scholar
 

Similar to CP 2011

ECE 2103_L6 Boolean Algebra Canonical Forms.pptx
ECE 2103_L6 Boolean Algebra Canonical Forms.pptxECE 2103_L6 Boolean Algebra Canonical Forms.pptx
ECE 2103_L6 Boolean Algebra Canonical Forms.pptxMdJubayerFaisalEmon
 
FPGA based BCH Decoder
FPGA based BCH DecoderFPGA based BCH Decoder
FPGA based BCH Decoderijsrd.com
 
Performance bounds for unequally punctured
Performance bounds for unequally puncturedPerformance bounds for unequally punctured
Performance bounds for unequally puncturedeSAT Publishing House
 
PRINCIPLES OF COMBINATIONAL LOGIC-2
PRINCIPLES OF COMBINATIONAL LOGIC-2PRINCIPLES OF COMBINATIONAL LOGIC-2
PRINCIPLES OF COMBINATIONAL LOGIC-2Supanna Shirguppe
 
Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...Beckham000
 
Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...
Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...
Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...Steven Duplij (Stepan Douplii)
 
SMU BCA SUMMER 2014 ASSIGNMENTS
SMU BCA SUMMER 2014 ASSIGNMENTSSMU BCA SUMMER 2014 ASSIGNMENTS
SMU BCA SUMMER 2014 ASSIGNMENTSsolved_assignments
 
Relative squared distances to a conic
Relative squared distances to a conic Relative squared distances to a conic
Relative squared distances to a conic ijcga
 
ECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptx
ECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptxECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptx
ECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptxMdJubayerFaisalEmon
 
Affine Yield Curves: Flexibility versus Incompleteness
Affine Yield Curves: Flexibility versus IncompletenessAffine Yield Curves: Flexibility versus Incompleteness
Affine Yield Curves: Flexibility versus IncompletenessDhia Eddine Barbouche
 
IRJET- On Greatest Common Divisor and its Application for a Geometrical S...
IRJET-  	  On Greatest Common Divisor and its Application for a Geometrical S...IRJET-  	  On Greatest Common Divisor and its Application for a Geometrical S...
IRJET- On Greatest Common Divisor and its Application for a Geometrical S...IRJET Journal
 
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...Shizuoka Inst. Science and Tech.
 
A novel steganographic method for jpeg images
A novel steganographic method for jpeg imagesA novel steganographic method for jpeg images
A novel steganographic method for jpeg imagesAjit Kumar Pradhan
 
Module 2 plane coordinate geometry
Module  2   plane coordinate geometryModule  2   plane coordinate geometry
Module 2 plane coordinate geometrydionesioable
 

Similar to CP 2011 (20)

ECE 2103_L6 Boolean Algebra Canonical Forms.pptx
ECE 2103_L6 Boolean Algebra Canonical Forms.pptxECE 2103_L6 Boolean Algebra Canonical Forms.pptx
ECE 2103_L6 Boolean Algebra Canonical Forms.pptx
 
FPGA based BCH Decoder
FPGA based BCH DecoderFPGA based BCH Decoder
FPGA based BCH Decoder
 
Performance bounds for unequally punctured
Performance bounds for unequally puncturedPerformance bounds for unequally punctured
Performance bounds for unequally punctured
 
PRINCIPLES OF COMBINATIONAL LOGIC-2
PRINCIPLES OF COMBINATIONAL LOGIC-2PRINCIPLES OF COMBINATIONAL LOGIC-2
PRINCIPLES OF COMBINATIONAL LOGIC-2
 
Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...Solutions manual for logic and computer design fundamentals 5th edition by ma...
Solutions manual for logic and computer design fundamentals 5th edition by ma...
 
Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...
Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...
Steven Duplij, Raimund Vogl, "Polyadic Braid Operators and Higher Braiding Ga...
 
SMU BCA SUMMER 2014 ASSIGNMENTS
SMU BCA SUMMER 2014 ASSIGNMENTSSMU BCA SUMMER 2014 ASSIGNMENTS
SMU BCA SUMMER 2014 ASSIGNMENTS
 
K map
K mapK map
K map
 
Relative squared distances to a conic
Relative squared distances to a conic Relative squared distances to a conic
Relative squared distances to a conic
 
PECCS 2014
PECCS 2014PECCS 2014
PECCS 2014
 
object 3d(2)
object 3d(2)object 3d(2)
object 3d(2)
 
07object3d 1
07object3d 107object3d 1
07object3d 1
 
ECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptx
ECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptxECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptx
ECE 2103_L6 Boolean Algebra Canonical Forms [Autosaved].pptx
 
Affine Yield Curves: Flexibility versus Incompleteness
Affine Yield Curves: Flexibility versus IncompletenessAffine Yield Curves: Flexibility versus Incompleteness
Affine Yield Curves: Flexibility versus Incompleteness
 
IRJET- On Greatest Common Divisor and its Application for a Geometrical S...
IRJET-  	  On Greatest Common Divisor and its Application for a Geometrical S...IRJET-  	  On Greatest Common Divisor and its Application for a Geometrical S...
IRJET- On Greatest Common Divisor and its Application for a Geometrical S...
 
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
 
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
 
A novel steganographic method for jpeg images
A novel steganographic method for jpeg imagesA novel steganographic method for jpeg images
A novel steganographic method for jpeg images
 
kmaps
 kmaps kmaps
kmaps
 
Module 2 plane coordinate geometry
Module  2   plane coordinate geometryModule  2   plane coordinate geometry
Module 2 plane coordinate geometry
 

CP 2011

  • 1. Boolean Equi-propagation for Optimized SAT Encoding AmitMetodi, Michael Codish, Vitaly Lagoon, and Peter J. Stuckey
  • 2.
  • 3. Large CNFProblem (hard) Constraint Model CNF Encoding Model Direct CSP solving SAT solving Solution Satisfied assignment Model Solution Decoding Translate
  • 4.
  • 5. Large CNFConstraint Model Encoding CNF Simplify CNF’ Simplified Model Encoding Partial Evaluation CNF’’ Simplified Model’ Encoding Partial Evaluationusing Equi-Propagation Tools such as: SatELite, ReVivAl Based on Unit Propagation and Resolution. Simplified CNF
  • 6. Our Approach Constraint ( C2, B2 ) Constraint ( C3, B3 ) Constraint ( Cn, Bn ) Constraint ( C1, B1 ) … M = Simplify Boolean techniques CSP techniques Equi-Propagation Constraint ( C1, B1 ) Constraint ( C’3, B‘3 ) Constraint ( C’n, B’n) Constraint ( C2, B2 ) … M’ = Encoding Standard encodings φ1 φ'3 φ'n … φ =
  • 7.
  • 10.
  • 11.
  • 12. Equi-Propagation Equi-propagation is the process of inferring new equationalconsequences from a constraint in the model (and other existing equational information). x= -y, x=y, x=0, x=1 single x can now be removed from all constraints.
  • 13. Equi-Propagation Example Learned: Partial Data: U1 { 0..4 } U1 = [x1,x2,x3,x4] U2 { 0..4 } U2 = [y1,y2,y3,y4] Xs = [a,d,b,x3,y2,c,y4] U1 { 1,3 } U1 = [1,x2,x2,0] U2 { 1,3 } U2 = [1,y2,y2,0] Xs = [a,1,b,x2,y2,c,0] U1 { 1,3 } U1 = [1,x2,x2,0] U2 { 1,3 } U2 = [1,-x2,-x2,0] Xs = [a,1,b,x2,-x2,c,0] 1≤U1≤3 and U1 ≠ 2 1≤U2≤3 and U2 ≠ 2 d = 1 x1=1, x3=x2 , x4=0 y1=1, y3=y2 , y4=0 d = 1 U1 ≠ U2 (y2= -x2) diff(U1,U2) sumBits(Xs)=3 Constraints Constraints … … diff(U1,U2) … sumBits([a,b,c])=1 Constraints Encoding Encoding Encoding Simplify Simplify Simplify Simplify φsumBits([a,b,c])=1 φConstraints φConstraints … …
  • 14.
  • 15. Global constraints (such as allDiff) implemented using Ad-Hoc rules.
  • 16.
  • 17. balanced incomplete block designs (BIBD) Definition: a 5-tuple of positive integers <v, b, r, k, l> and require to partition v distinct objects into b blocks such that each block contains k different objects, exactly r objects occur in each block, and every two distinct objects occur in exactly l blocks. Variables: B11, …, Bbv Domains:Bijϵ{0,1} Constraints: each row constraint: sum(Bi1,…,Biv) = r each column constraint: sum(B1i,…,Bbi) = k each two rows constraint: sum(Bi1*Bj1, …,Biv*Bjv)= l b=10 v=6 BIBD <6,10,5,3,2>
  • 18. We can swap between two rows or two columns to generate another valid solution. Balanced Incomplete Block Designs (BIBD) r k r-l l <v, b, r, k, l>
  • 19. BIBD – BEEvs Sugar (CSP to CNF Encoder) Faster time to generate CNF Smaller CNF Faster SAT solving time
  • 20. BIBD – BEEvsSatELite (CNF-Level preprocessor) Preprocess time About the same size Solving time
  • 21.
  • 22. Apply complete CNF simplification on each constraint is possible in polynomial time.
  • 23. By using the Equi-Propagation technique we generates a small optimized CNF which than can be simplify using CNF-Level simplifications.Simplify CNF’ Simplified Model Encoding Boolean techniques CSP techniques Equi-Propagation Partial Evaluation Constraint ( C1, φ1 ) Constraint ( C’3, φ‘3 ) Constraint ( C’n, φ’n) Constraint ( C2, φ2 ) … M’ = CNF’’ Simplified Model Encoding Partial Evaluationusing Equi-Propagation Simplified CNF
  • 25. BIBD – BEE + SatELite (CNF-Level preprocessor)
  • 26. BIBD – BEEvs MINION (Constraint solver) Modeling control
  • 27. Nonograms Definition: an nXm board of cells to color black or white and given clues per row and column of a board. A clue is a number sequence indicating blocks of cells to be colored black. Variables: B11, …, Bnm R11,…R1k,…,Rm1,…Rmp C11,…C1q,…,Cn1,…,Cnr Domains:Bijϵ{0,1} Rmoϵ{0,..,n} Cnoϵ{0,..,m} Constraints: block constraint: block(Rij,Rij+<ij size>,[B1i,…,Bni]) space constraint: block(Rij+<ij size>,Rij+1,[-B1i,…,-Bni]) no overlap constraint: leq(Rij+<ij size>+1, Rij+1)
  • 28.

Editor's Notes

  1. In this talk I will present the paper“Boolean Equi-propagation for Optimized SAT Encoding” which is ajoint work of mine with Michal Codish, Vitaly Lagoon, and Peter Stuckey.
  2. Given an hard finite domain problem there are several ways to solve it:Taking the direct approach by writing a dedicated algorithm.Or model the problem as set of constraints and using CSP solver to solve it.In recent years an alternative approach is becoming increasingly popular, solving finite domain constraint model via encoding to SAT.This popularity arise from two aspects:SAT solvers became increasingly stronger. (Modern SAT solvers can handle large size CNF that involving hundreds of thousands of literals and millions of clauses.)encoding techniques become increasingly sophisticated.Two comments on such CNF encodings:When encoding a constraint and modeling finite domain (integer) variables as bits, we lose in the CNF the relation between bits of an individual constraint.The resulting CNF is typically extremely large, often at the limit of what sat solvers can handle.We will focus on Encoding the Constraint Model to CNF and how to optimized it, in practical how to make it smaller.
  3. In order to reduce CNF size we can apply CNF level simplifications on the entire CNF in order to find equivalent literals or assignments.But when trying to apply optimizations on the entire CNF the two comments become problems:The relation between bits of an individual constraint is lost and there might be some relevant information lost with it.The large CNF size prevents the ability to run a complete simplification on the CNF. Therefore we have to use tools such SatELite and ReVivAl which based on Unit Propagation and Resolution in order to reduce CNF size.Another way to optimize CNF is performing partial evaluation on the Constraint Model using CSP techniques in order to receive a Simplified Model before encoding. In this case during the partial evaluation we ignores the literals representation in the CNF.Using those techniques isn’t enough.I will show a new technique for “compile” Constraint Model to CNF which produce a better and smaller CNF by taking advantage of CSP techniques and Boolean techniques.
  4. Our approach is:Given a Constraint Model, for each constraint we keeping two representations : CSP representation (Ci) and Boolean representation (Bi).We simplify the Constraint Model by applying CSP techniques and Boolean techniques on each constraint in the model.The Simplified Constraint Model will contain some of the original constraints, some constraints might been dropped and some constraints might be altered.After receiving a simplified model we generates a CNF formula for the entire problem by encoding each constraint using standard encodings.
  5. Next I will talk about:Modeling Finite Domain Constraint Satisfaction Problem and focus on number representation.Define what is Equi-Propagation and demonstrate how it works.ExperimentationConclusions
  6. When encoding Finite Domain CSP to CNF we have to represent the numbers using Boolean variables.There are two main representations: Binary and Unary.Because we dealing with small Finite Domain Problems, we chose to represent integers using Unary.There are two way to represent a number using Unary: Direct Encoding and the Order Encoding.We, as many before us, chose to represent integers using Order encoding.In this representation the bit in location i represent that the number X is great equals i.
  7. So why Order Encoding ?It is well known that Order Encoding is good for representing ranges – set lower and upper bounds is done by assign the bits outside the range.We saw that Order Encoding is also good for representing arbitrary sets:If we want to set the number X to be different from i , we simply have to unify the ith and the ith+1 bits.Another good feature of Order Encoding is that some arithmetic operations involving constants doesn’t have to be encoded to CNF.Our approach takes advantage of all those features of the order encoding in order to reduce CNF size.
  8. So what is Equi-Propagation:Equi-propagation is the process of inferring new equational consequences (such as x=y) from a single constraint in the model (and other existing equational information).When inferring such equational consequence, x can be removed from all the constraints by replacing x with it’s equivalent.
  9. So how is itworks ?We receives a constraint model. For each variable` in the model we holding its “CSP representation” and “Boolean representation”.Here we will focus on two constraints from a model and the relevant data for those constraints.We start by go over the model and simplify one constraint at the time.Lets assume that during the simplification of the last constraints we learned the following information.The information we learned can be in CSP style or Boolean unifiers.Each time we learning, we update the model accordingly (both representations) – for example if we learned that x1=true we will replace each instance of x1 in the model with true. The boolean variable x1 will be dropped from the model.We will keep go over the model and simplify the constraints until there is nothing more to learn.Here we still have information to learn and when reaching diff(U1,U2) we learns that the only way this constraint can be satisfied is when y2= -x2.We update the data accordingly (replace y2 with –x2) and as we can see it is only effect the “Boolean representation”.We give the diff constraint another look and we see there is no need to keep it or encode it because any satisfied assignment will satisfied the constraint.Therefore it can be dropped from the model.(This couldn’t be done if we where looking on the constraints in CSP style alone)We keep going and getting to sumBits constraint. We looking on the bits participate in the constraints and we see there is true bit, false bit and x2 and –x2. This means the sum of those four bits will always be equals to two. Therefore we can replace the constraint with simpler constraint sumBits=1.After there is no more information to learn we will generate the CNF formula for the constraint model by encoding each constraint in the model.Some constraint will be encoded as they were encoded before the simplify step but some constraint will be encoded differently – more efficiently – in the case, instead of encode normal sum of bits and compare the result to 3, we now encode exactly-one which have more efficient encoding.(If we didn’t kept the constraint information and only the CNF formula for each constraint we couldn’t perform such optimization).
  10. When looking on a valid solution to a problem, we can swap between two rows or two columns to generate another valid solution.We can break symmetry by adding lexical order constraints on the rows and columns.Orwe can do something smarter – assign the first two rows and column as followed…Those assignments gives starting point for the partial evaluation process.
  11. First lets compare BEE to Sugar which is a well known SAT-based constraint solver based on order encoding.We took our model for BIBD which we break symmetry by assignments, and generated CNF using BEE and Sugar. Then solved the generated CNF on the same SAT solver (CryptoMinisat 2.5.1).First we can see that BEE generate a smaller CNF than Sugarwhich effect solving time.We can also see the CNF generating time of BEE is much smaller than Sugar.
  12. Second we compared BEE to SatELite which is a well known CNF-level preprocessor.We took our model and encode it without using Equi-Propagation technique. The generated CNF was preprocessed by SatELite before solving it.We can see the CNF generated by BEE and the simplified CNF generated by SatELite is about the same size.Solving time of BEE is usually betterandsometimes the preprocess of SatELite is extremely long.If we look on the highlighted example we can see SatELite is generate a smaller and faster solved CNF but its preprocess time is extremely long.
  13. CNF IN THIS SLIDE IS AFTER ADDING ANOTHER OPTIMIZATION TO BEE (BEE compile time and solving time is actually better that what written with the new optimization – compile and SAT for BEE copy&amp;paste from previous version – didn’t had time to update).
  14. At last we compared BEE to MINION which is a general-purpose constraint solver.The 2006 paper contains experiments on large scale BIBD instances.We took the model represented in the paper which includes search order.It seems for the large size BIBD, MINION is very fast and scales well as problem size increases but for other hard instances our tool acts better.But that not a fair comparison. Therefore we gave MINION the same model as ours – the results seem to improved compare to MINION model in most cases but in the instances from 2006 paper it was slower.Unlike MINION, We looking on the SAT solver as black box and have no way to effect search order, therefore, our model didn’t contained any information about search order.By adding search order to our model we manage to reduce solving time even more.