SlideShare a Scribd company logo
1 of 45
Approximate-At-Most-k Encoding
of SAT for Soft Constraints
Shunji Nishimura
National Institute of Technology, Oita College, Japan
PoS2023
1
At-most-k constraints and encodings
 the number of true values ≦ k
 problem: Boolean expressions will explode
 proposed encodings in the past:
binary, sequential counter, commander, product, etc..
2
 the number of true values ≦ k
 problem: Boolean expressions will explode
 proposed encodings in the past:
binary, sequential counter, commander, product, etc..
3
are absolutely at-most-k
here is approximately at-most-k
At-most-k constraints and encodings
 the number of true values ≦ k
 problem: Boolean expressions will explode
 proposed encodings in the past:
binary, sequential counter, commander, product, etc..
4
are absolutely at-most-k
here is approximately at-most-k
covers all solutions
only covers
a part of solutions
At-most-k constraints and encodings
Conventional vs Approximate
5
solution
coverage
purposes
conventional complete
hard and soft
constraints
approximate incomplete
only soft
constraints
 hard constraints: necessities
 solt constraints: to describe optional desires
Conventional vs Approximate
6
solution
coverage
purposes
conventional complete
hard and soft
constraints
approximate incomplete
only soft
constraints
 hard constraints: necessities
 soft constraints: to describe optional desires
but drastically reduces
Boolean expressions
Soft constraints
Not necessary but preferred
 In common with optimization problems
 Example: university timetabling
 minimize empty time slots in between
 minimize the number of teachers who have continuous classes
 it is preferable a subject is always taught in the same room
7
Fundamental idea
8
A
B
at most 2 of 4
Fundamental idea
9
2 times
at most
A
A1
B1
B
at most 2 of 4
Fundamental idea
10
2 times
at most
A
A1
B1
B
at most 2 of 4
at most 0
0 trues
Fundamental idea
11
2 times
at most
A
A1
B1
B
at most 2 of 4
at most 2
1 true
Fundamental idea
12
2 times
at most
A
A1
B1
B
at most 2 of 4
at most 4
2 trues
Fundamental idea
13
2 times
at most
A
A1
B1
B
at most 2 of 4
0 trues ⇒ at most 0
∧ 1 true ⇒ at most 2
∧ 2 true ⇒ at most 4
=
Fundamental idea
14
2 times
at most
at most 2 of 4
at most 4 of 8 (?)
2 times
at most
A
A1
B1
B
Fundamental idea
15
2 times
at most
at most 2 of 4
at most 4 of 8 (?)
2 times
at most
A
A1
B1
B
←OK(SAT)
true false
Fundamental idea
16
2 times
at most
at most 2 of 4
at most 4 of 8
(approximate)
2 times
at most
A
A1
B1
B
←UNSAT
17
• again, is not a real at-most-k
• should use for only soft constraints
2x2 models
18
x 2 x 2
x2 x2 x2 x2
 two parents and four children
 define recursively
2x2 models
19
x 2 x 2
x2 x2 x2 x2
m
at most k of 4
approximate-at-most-
(k/2 · 2m+1) of 2m+1
h x w models
20
h1
w1
h2
w2
h2
w2
hn
wn
hn・m hn・m
hn
wn
 height h and width w
h x w models
21
h1
w1
h2
w2
h2
w2
hn
wn
hn・m hn・m
hn
wn
at most k of h1·w1
approximate-at-most-
(k/(h1·w1) · Π hi·wi·m)
of Π hi·wi·m
h x w models
22
h1
w1
h2
w2
h2
w2
hn
wn
hn・m hn・m
hn
wn
at most k of h1·w1
approximate-at-most-
(k/(h1·w1) · Π hi·wi·m)
of Π hi·wi·m
notation:
approximate-at-most-(a/b·n) of n
Literal number comparison (2x2 models)
23
0
5,000
10,000
15,000
20,000
25,000
30,000
35,000
40,000
45,000
8 16 32 64 128
literals
at-most-1/2 of
approximate literals counter literals
vs sequential counter encoding
Literal number comparison (2x2 models)
24
0%
10%
20%
30%
40%
50%
60%
0
5,000
10,000
15,000
20,000
25,000
30,000
35,000
40,000
45,000
8 16 32 64 128
rate
(=approximate
/counter)
literals
at-most-1/2 of
approximate literals counter literals rate
Coverages (2x2 models)
25
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
8 16 32 64 128
coverage
/
rate
at-most-1/2 of
solution coverage
= (solutions by approximate) / (all solutions)
Coverages (2x2 models)
26
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
8 16 32 64 128
coverage
/
rate
at-most-1/2 of
solution coverage literal rate
Coverages (2x2 models)
27
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
8 16 32 64 128
coverage
/
rate
at-most-1/2 of
solution coverage literal rate
covers 44% on 15% literals
Coverages and efficiencies (2x2 models)
28
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
8 16 32 64 128
efficiency
(=
coverage
/
literal
rate)
coverage
/
rate
at-most-1/2 of
solution coverage literal rate efficiency
efficiency = coverage / literal rate
8 of 16
Target variables
29
h x w models: adjustment
want to generate arbitrary k of n
8 of 16
fix to false fix to true
30
h x w models: adjustment
8 of 16
fix to false fix to true
4 of 10
31
h x w models: adjustment
32
h x w models: example1
to generate 5 of 10
at most 2
approximate-at-most-
6 of 12
33
h x w models: example1
to generate 5 of 10
fix 1 false and 1 true
at most 2
approximate-at-most-
6 of 12
approximate-at-most-
5 of 10
34
h x w models: example2
to generate 5 of 10
fix 3 falses and 3 trues
at most 2
approximate-at-most-
8 of 16
approximate-at-most-
5 of 10
The best efficiencies
35
0
2
4
6
8
10
12
14
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
efficiency
approximate-at-most-
of 10 of 20 of 30
The best efficiencies
36
0
2
4
6
8
10
12
14
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
efficiency
approximate-at-most-
of 10 of 20 of 30
Low efficiency between highs
37
24 of 30 :
high efficiency
at-most-6
fix 2 falses and 0 trues
26 of 30 :
high efficiency
at-most-7
fix 0 falses and 2 trues
(24 of 32 → 24 of 30) (28 of 32 → 26 of 30)
25 of 30 :
low efficiency
at-most-5
fix 1 false and 5 trues
(30 of 36 → 25 of 30)
Low efficiency between highs
38
24 of 30 :
high efficiency
at-most-6
fix 2 falses and 0 trues
26 of 30 :
high efficiency
at-most-7
fix 0 falses and 2 trues
(24 of 32 → 24 of 30) (28 of 32 → 26 of 30)
25 of 30 :
low efficiency
at-most-5
fix 1 false and 5 trues
(30 of 36 → 25 of 30)
Discussion1: coverage definition
39
all solutions
∪
at-most-8
∪
at-most-7
∪
:
∪
at-most-1
∪
no trues
Discussion1: coverage definition
40
all solutions
∪
at-most-8
∪
at-most-7
∪
:
∪
at-most-1
∪
no trues
this study’s definition
Discussion1: coverage definition
41
all solutions
∪
at-most-8
∪
at-most-7
∪
:
∪
at-most-1
∪
no trues
this study’s definition
maybe important
Discussion2: probability of finding solutions
When approximate-at-most-k covers 50% of the possible
solutions, every single solution has probability 50% to be found.
42
Discussion2: probability of finding solutions
When approximate-at-most-k covers 50% of the possible
solutions, every single solution has probability 50% to be found.
43
For a real-life problem ..
• has 1 solution → 50% to find
• has 2 solutions → 75% to find (whichever)
:
• has 10 solutions → 99.9% to find (whichever)
:
Discussion2: probability of finding solutions
When approximate-at-most-k covers 50% of the possible
solutions, every single solution has probability 50% to be found.
44
For a real-life problem ..
• has 1 solution → 50% to find
• has 2 solutions → 75% to find (whichever)
:
• has 10 solutions → 99.9% to find (whichever)
:
coverage ≠ finding probability
Conclusion
 at-most-k constraints are recursively applied (with multiplying)
 less Boolean expressions needed than conventional encodings,
but does not cover all solutions
 available for searching better solutions under soft constraints
 Ex. at-most-16 of 32
 only 15% of literal number (vs sequential counter)
 covers 44% of the solution space
45

More Related Content

Similar to Approximate-At-Most-k Encoding of SAT for Soft Constraints

Unit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisUnit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisDagnaygebawGoshme
 
3.7lecture
3.7lecture3.7lecture
3.7lectureRon_Eick
 
Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logicraksharao
 
inbound5734878140507128787.ppt
inbound5734878140507128787.pptinbound5734878140507128787.ppt
inbound5734878140507128787.pptJanethDairo
 
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal'sGreedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal'sJay Patel
 
The Use of Fuzzy Optimization Methods for Radiation.ppt
The Use of Fuzzy Optimization Methods for Radiation.pptThe Use of Fuzzy Optimization Methods for Radiation.ppt
The Use of Fuzzy Optimization Methods for Radiation.ppteslameslam18
 
Chapter 4 Duality & sensitivity analysis hand out last .pdf
Chapter 4 Duality & sensitivity analysis hand out last .pdfChapter 4 Duality & sensitivity analysis hand out last .pdf
Chapter 4 Duality & sensitivity analysis hand out last .pdfTsegay Berhe
 
Ratios and Proportions.ppt
Ratios and Proportions.pptRatios and Proportions.ppt
Ratios and Proportions.pptssuser96ac0b
 
Free Ebooks Download
Free Ebooks Download Free Ebooks Download
Free Ebooks Download Edhole.com
 

Similar to Approximate-At-Most-k Encoding of SAT for Soft Constraints (20)

Unit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisUnit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisis
 
Approx
ApproxApprox
Approx
 
ilp-nlp-slides.pdf
ilp-nlp-slides.pdfilp-nlp-slides.pdf
ilp-nlp-slides.pdf
 
3.7lecture
3.7lecture3.7lecture
3.7lecture
 
Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logic
 
Ms(lpgraphicalsoln.)[1]
Ms(lpgraphicalsoln.)[1]Ms(lpgraphicalsoln.)[1]
Ms(lpgraphicalsoln.)[1]
 
inbound5734878140507128787.ppt
inbound5734878140507128787.pptinbound5734878140507128787.ppt
inbound5734878140507128787.ppt
 
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal'sGreedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
 
Graphical method
Graphical methodGraphical method
Graphical method
 
The Use of Fuzzy Optimization Methods for Radiation.ppt
The Use of Fuzzy Optimization Methods for Radiation.pptThe Use of Fuzzy Optimization Methods for Radiation.ppt
The Use of Fuzzy Optimization Methods for Radiation.ppt
 
Chapter 4 Duality & sensitivity analysis hand out last .pdf
Chapter 4 Duality & sensitivity analysis hand out last .pdfChapter 4 Duality & sensitivity analysis hand out last .pdf
Chapter 4 Duality & sensitivity analysis hand out last .pdf
 
Section 31.ppt
Section 31.pptSection 31.ppt
Section 31.ppt
 
Ratio and porpotion.ppt
Ratio and porpotion.pptRatio and porpotion.ppt
Ratio and porpotion.ppt
 
Section 31.ppt
Section 31.pptSection 31.ppt
Section 31.ppt
 
Ratios and Proportions.ppt
Ratios and Proportions.pptRatios and Proportions.ppt
Ratios and Proportions.ppt
 
Section 31.ppt
Section 31.pptSection 31.ppt
Section 31.ppt
 
Chapter11
Chapter11Chapter11
Chapter11
 
Free Ebooks Download
Free Ebooks Download Free Ebooks Download
Free Ebooks Download
 
Binomial theorem
Binomial theorem Binomial theorem
Binomial theorem
 
Chapter 5.pptx
Chapter 5.pptxChapter 5.pptx
Chapter 5.pptx
 

More from Shunji Nishimura

Classification of Sequential Circuits as Causal Functions
Classification of Sequential Circuits as Causal FunctionsClassification of Sequential Circuits as Causal Functions
Classification of Sequential Circuits as Causal FunctionsShunji Nishimura
 
Typing during Lectures as an Alternative for Blackboard Writing
Typing during Lectures as an Alternative for Blackboard WritingTyping during Lectures as an Alternative for Blackboard Writing
Typing during Lectures as an Alternative for Blackboard WritingShunji Nishimura
 
LINE Messaging APIを用いた授業中のクイズ形式問題演習
LINE Messaging APIを用いた授業中のクイズ形式問題演習LINE Messaging APIを用いた授業中のクイズ形式問題演習
LINE Messaging APIを用いた授業中のクイズ形式問題演習Shunji Nishimura
 
Stateless Circuit Model toward a Theorem-proving Hardware Description Language
Stateless Circuit Model toward a Theorem-proving Hardware Description LanguageStateless Circuit Model toward a Theorem-proving Hardware Description Language
Stateless Circuit Model toward a Theorem-proving Hardware Description LanguageShunji Nishimura
 
Broad-sense Synchronous Circuits on Partially Ordered Time
Broad-sense Synchronous Circuits on Partially Ordered TimeBroad-sense Synchronous Circuits on Partially Ordered Time
Broad-sense Synchronous Circuits on Partially Ordered TimeShunji Nishimura
 
同期回路の機能的定義による同期概念の形式化
同期回路の機能的定義による同期概念の形式化同期回路の機能的定義による同期概念の形式化
同期回路の機能的定義による同期概念の形式化Shunji Nishimura
 
Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...
Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...
Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...Shunji Nishimura
 
多重様相論理による遅延依存非同期回路の形式検証体系
多重様相論理による遅延依存非同期回路の形式検証体系多重様相論理による遅延依存非同期回路の形式検証体系
多重様相論理による遅延依存非同期回路の形式検証体系Shunji Nishimura
 
Generalized Isomorphism between Synchronous Circuits and State Machines
Generalized Isomorphism between Synchronous Circuits and State MachinesGeneralized Isomorphism between Synchronous Circuits and State Machines
Generalized Isomorphism between Synchronous Circuits and State MachinesShunji Nishimura
 
定理証明言語によるハードウェア検証
定理証明言語によるハードウェア検証定理証明言語によるハードウェア検証
定理証明言語によるハードウェア検証Shunji Nishimura
 
タイミング制約を含んだ回路記述方式とその意味論
タイミング制約を含んだ回路記述方式とその意味論タイミング制約を含んだ回路記述方式とその意味論
タイミング制約を含んだ回路記述方式とその意味論Shunji Nishimura
 
様相論理によるマルチクロック同期回路の形式検証体系
様相論理によるマルチクロック同期回路の形式検証体系様相論理によるマルチクロック同期回路の形式検証体系
様相論理によるマルチクロック同期回路の形式検証体系Shunji Nishimura
 
同期回路-ステート・マシン対応の一般化
同期回路-ステート・マシン対応の一般化同期回路-ステート・マシン対応の一般化
同期回路-ステート・マシン対応の一般化Shunji Nishimura
 
関数型言語と定理証明
関数型言語と定理証明関数型言語と定理証明
関数型言語と定理証明Shunji Nishimura
 
Agdaで回路設計(をしたい)
Agdaで回路設計(をしたい)Agdaで回路設計(をしたい)
Agdaで回路設計(をしたい)Shunji Nishimura
 

More from Shunji Nishimura (15)

Classification of Sequential Circuits as Causal Functions
Classification of Sequential Circuits as Causal FunctionsClassification of Sequential Circuits as Causal Functions
Classification of Sequential Circuits as Causal Functions
 
Typing during Lectures as an Alternative for Blackboard Writing
Typing during Lectures as an Alternative for Blackboard WritingTyping during Lectures as an Alternative for Blackboard Writing
Typing during Lectures as an Alternative for Blackboard Writing
 
LINE Messaging APIを用いた授業中のクイズ形式問題演習
LINE Messaging APIを用いた授業中のクイズ形式問題演習LINE Messaging APIを用いた授業中のクイズ形式問題演習
LINE Messaging APIを用いた授業中のクイズ形式問題演習
 
Stateless Circuit Model toward a Theorem-proving Hardware Description Language
Stateless Circuit Model toward a Theorem-proving Hardware Description LanguageStateless Circuit Model toward a Theorem-proving Hardware Description Language
Stateless Circuit Model toward a Theorem-proving Hardware Description Language
 
Broad-sense Synchronous Circuits on Partially Ordered Time
Broad-sense Synchronous Circuits on Partially Ordered TimeBroad-sense Synchronous Circuits on Partially Ordered Time
Broad-sense Synchronous Circuits on Partially Ordered Time
 
同期回路の機能的定義による同期概念の形式化
同期回路の機能的定義による同期概念の形式化同期回路の機能的定義による同期概念の形式化
同期回路の機能的定義による同期概念の形式化
 
Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...
Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...
Theorem-proving Verification of Multi-clock Synchronous Circuits on Multimoda...
 
多重様相論理による遅延依存非同期回路の形式検証体系
多重様相論理による遅延依存非同期回路の形式検証体系多重様相論理による遅延依存非同期回路の形式検証体系
多重様相論理による遅延依存非同期回路の形式検証体系
 
Generalized Isomorphism between Synchronous Circuits and State Machines
Generalized Isomorphism between Synchronous Circuits and State MachinesGeneralized Isomorphism between Synchronous Circuits and State Machines
Generalized Isomorphism between Synchronous Circuits and State Machines
 
定理証明言語によるハードウェア検証
定理証明言語によるハードウェア検証定理証明言語によるハードウェア検証
定理証明言語によるハードウェア検証
 
タイミング制約を含んだ回路記述方式とその意味論
タイミング制約を含んだ回路記述方式とその意味論タイミング制約を含んだ回路記述方式とその意味論
タイミング制約を含んだ回路記述方式とその意味論
 
様相論理によるマルチクロック同期回路の形式検証体系
様相論理によるマルチクロック同期回路の形式検証体系様相論理によるマルチクロック同期回路の形式検証体系
様相論理によるマルチクロック同期回路の形式検証体系
 
同期回路-ステート・マシン対応の一般化
同期回路-ステート・マシン対応の一般化同期回路-ステート・マシン対応の一般化
同期回路-ステート・マシン対応の一般化
 
関数型言語と定理証明
関数型言語と定理証明関数型言語と定理証明
関数型言語と定理証明
 
Agdaで回路設計(をしたい)
Agdaで回路設計(をしたい)Agdaで回路設計(をしたい)
Agdaで回路設計(をしたい)
 

Recently uploaded

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 

Recently uploaded (20)

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 

Approximate-At-Most-k Encoding of SAT for Soft Constraints

  • 1. Approximate-At-Most-k Encoding of SAT for Soft Constraints Shunji Nishimura National Institute of Technology, Oita College, Japan PoS2023 1
  • 2. At-most-k constraints and encodings  the number of true values ≦ k  problem: Boolean expressions will explode  proposed encodings in the past: binary, sequential counter, commander, product, etc.. 2
  • 3.  the number of true values ≦ k  problem: Boolean expressions will explode  proposed encodings in the past: binary, sequential counter, commander, product, etc.. 3 are absolutely at-most-k here is approximately at-most-k At-most-k constraints and encodings
  • 4.  the number of true values ≦ k  problem: Boolean expressions will explode  proposed encodings in the past: binary, sequential counter, commander, product, etc.. 4 are absolutely at-most-k here is approximately at-most-k covers all solutions only covers a part of solutions At-most-k constraints and encodings
  • 5. Conventional vs Approximate 5 solution coverage purposes conventional complete hard and soft constraints approximate incomplete only soft constraints  hard constraints: necessities  solt constraints: to describe optional desires
  • 6. Conventional vs Approximate 6 solution coverage purposes conventional complete hard and soft constraints approximate incomplete only soft constraints  hard constraints: necessities  soft constraints: to describe optional desires but drastically reduces Boolean expressions
  • 7. Soft constraints Not necessary but preferred  In common with optimization problems  Example: university timetabling  minimize empty time slots in between  minimize the number of teachers who have continuous classes  it is preferable a subject is always taught in the same room 7
  • 9. Fundamental idea 9 2 times at most A A1 B1 B at most 2 of 4
  • 10. Fundamental idea 10 2 times at most A A1 B1 B at most 2 of 4 at most 0 0 trues
  • 11. Fundamental idea 11 2 times at most A A1 B1 B at most 2 of 4 at most 2 1 true
  • 12. Fundamental idea 12 2 times at most A A1 B1 B at most 2 of 4 at most 4 2 trues
  • 13. Fundamental idea 13 2 times at most A A1 B1 B at most 2 of 4 0 trues ⇒ at most 0 ∧ 1 true ⇒ at most 2 ∧ 2 true ⇒ at most 4 =
  • 14. Fundamental idea 14 2 times at most at most 2 of 4 at most 4 of 8 (?) 2 times at most A A1 B1 B
  • 15. Fundamental idea 15 2 times at most at most 2 of 4 at most 4 of 8 (?) 2 times at most A A1 B1 B ←OK(SAT) true false
  • 16. Fundamental idea 16 2 times at most at most 2 of 4 at most 4 of 8 (approximate) 2 times at most A A1 B1 B ←UNSAT
  • 17. 17 • again, is not a real at-most-k • should use for only soft constraints
  • 18. 2x2 models 18 x 2 x 2 x2 x2 x2 x2  two parents and four children  define recursively
  • 19. 2x2 models 19 x 2 x 2 x2 x2 x2 x2 m at most k of 4 approximate-at-most- (k/2 · 2m+1) of 2m+1
  • 20. h x w models 20 h1 w1 h2 w2 h2 w2 hn wn hn・m hn・m hn wn  height h and width w
  • 21. h x w models 21 h1 w1 h2 w2 h2 w2 hn wn hn・m hn・m hn wn at most k of h1·w1 approximate-at-most- (k/(h1·w1) · Π hi·wi·m) of Π hi·wi·m
  • 22. h x w models 22 h1 w1 h2 w2 h2 w2 hn wn hn・m hn・m hn wn at most k of h1·w1 approximate-at-most- (k/(h1·w1) · Π hi·wi·m) of Π hi·wi·m notation: approximate-at-most-(a/b·n) of n
  • 23. Literal number comparison (2x2 models) 23 0 5,000 10,000 15,000 20,000 25,000 30,000 35,000 40,000 45,000 8 16 32 64 128 literals at-most-1/2 of approximate literals counter literals vs sequential counter encoding
  • 24. Literal number comparison (2x2 models) 24 0% 10% 20% 30% 40% 50% 60% 0 5,000 10,000 15,000 20,000 25,000 30,000 35,000 40,000 45,000 8 16 32 64 128 rate (=approximate /counter) literals at-most-1/2 of approximate literals counter literals rate
  • 25. Coverages (2x2 models) 25 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 8 16 32 64 128 coverage / rate at-most-1/2 of solution coverage = (solutions by approximate) / (all solutions)
  • 26. Coverages (2x2 models) 26 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 8 16 32 64 128 coverage / rate at-most-1/2 of solution coverage literal rate
  • 27. Coverages (2x2 models) 27 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 8 16 32 64 128 coverage / rate at-most-1/2 of solution coverage literal rate covers 44% on 15% literals
  • 28. Coverages and efficiencies (2x2 models) 28 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 8 16 32 64 128 efficiency (= coverage / literal rate) coverage / rate at-most-1/2 of solution coverage literal rate efficiency efficiency = coverage / literal rate
  • 29. 8 of 16 Target variables 29 h x w models: adjustment want to generate arbitrary k of n
  • 30. 8 of 16 fix to false fix to true 30 h x w models: adjustment
  • 31. 8 of 16 fix to false fix to true 4 of 10 31 h x w models: adjustment
  • 32. 32 h x w models: example1 to generate 5 of 10 at most 2 approximate-at-most- 6 of 12
  • 33. 33 h x w models: example1 to generate 5 of 10 fix 1 false and 1 true at most 2 approximate-at-most- 6 of 12 approximate-at-most- 5 of 10
  • 34. 34 h x w models: example2 to generate 5 of 10 fix 3 falses and 3 trues at most 2 approximate-at-most- 8 of 16 approximate-at-most- 5 of 10
  • 35. The best efficiencies 35 0 2 4 6 8 10 12 14 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 efficiency approximate-at-most- of 10 of 20 of 30
  • 36. The best efficiencies 36 0 2 4 6 8 10 12 14 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 efficiency approximate-at-most- of 10 of 20 of 30
  • 37. Low efficiency between highs 37 24 of 30 : high efficiency at-most-6 fix 2 falses and 0 trues 26 of 30 : high efficiency at-most-7 fix 0 falses and 2 trues (24 of 32 → 24 of 30) (28 of 32 → 26 of 30) 25 of 30 : low efficiency at-most-5 fix 1 false and 5 trues (30 of 36 → 25 of 30)
  • 38. Low efficiency between highs 38 24 of 30 : high efficiency at-most-6 fix 2 falses and 0 trues 26 of 30 : high efficiency at-most-7 fix 0 falses and 2 trues (24 of 32 → 24 of 30) (28 of 32 → 26 of 30) 25 of 30 : low efficiency at-most-5 fix 1 false and 5 trues (30 of 36 → 25 of 30)
  • 39. Discussion1: coverage definition 39 all solutions ∪ at-most-8 ∪ at-most-7 ∪ : ∪ at-most-1 ∪ no trues
  • 40. Discussion1: coverage definition 40 all solutions ∪ at-most-8 ∪ at-most-7 ∪ : ∪ at-most-1 ∪ no trues this study’s definition
  • 41. Discussion1: coverage definition 41 all solutions ∪ at-most-8 ∪ at-most-7 ∪ : ∪ at-most-1 ∪ no trues this study’s definition maybe important
  • 42. Discussion2: probability of finding solutions When approximate-at-most-k covers 50% of the possible solutions, every single solution has probability 50% to be found. 42
  • 43. Discussion2: probability of finding solutions When approximate-at-most-k covers 50% of the possible solutions, every single solution has probability 50% to be found. 43 For a real-life problem .. • has 1 solution → 50% to find • has 2 solutions → 75% to find (whichever) : • has 10 solutions → 99.9% to find (whichever) :
  • 44. Discussion2: probability of finding solutions When approximate-at-most-k covers 50% of the possible solutions, every single solution has probability 50% to be found. 44 For a real-life problem .. • has 1 solution → 50% to find • has 2 solutions → 75% to find (whichever) : • has 10 solutions → 99.9% to find (whichever) : coverage ≠ finding probability
  • 45. Conclusion  at-most-k constraints are recursively applied (with multiplying)  less Boolean expressions needed than conventional encodings, but does not cover all solutions  available for searching better solutions under soft constraints  Ex. at-most-16 of 32  only 15% of literal number (vs sequential counter)  covers 44% of the solution space 45

Editor's Notes

  1. At-most-k is a constraint of that the number of true values are less than or equal to k. About encodings of at-most-k constraint, there is a problem that, Boolean expressions will explode. To tackles this problem, several encodings had been proposed, such as, binary encoding, sequential counter encoding, commander encoding, product encoding, et cetera.
  2. Those encodings are absolutely at-most-k. In contrast, this study proposes approximate at-most-k. (wait)
  3. The difference is, conventional, absolute at-most-k covers all solutions. However, approximate-at-most-k only covers a part of solutions. (wait)
  4. Here is a comparison table. About solution coverage, conventional at-most-k completely covers solution but approximate is incomplete. So about purposes, conventional at-most-k is available for both of hard constraints and soft constraints but approximate is for only soft constraints. Where hard and soft means, as stated below, hard constraints are necessities and soft constraints are to describe optional desires.
  5. Obviously approximate-at-most-k has limitation, but I will show you that approximate-at-most-k drastically reduces Boolean expressions.
  6. Here, I would like to mention about soft constraints again. Soft constraints are not necessary but preferred constraints. This notion is in common with optimization problems. For example on university timetableing. We want to minimize empty time slots in between. or, minimize the number of teachers who have continuous classes. Also it is preferable a subject is always taught in the same room. And so on. (wait)
  7. From here, I will introduce the fundamental idea of this study. We consider four Boolean variables named A and eight variables named B. First, at-most-2 constraint is applied on set A of four variables.
  8. Then, we consider the left half of two variables, A1, and it constraint the left half of B, B1, with 2 times at-most.
  9. 2 times at-most means that, When A1 has no true values, B1 is constrained by at-most-0, so no trues allowed. (wait)
  10. When A1 has 1 true value, B1 is constrained by at-most-2. (wait)
  11. When A1 has 2 true values, B1 is constrained by at-most-4, that makes no sense as a constraint. (wait)
  12. To wrap up, B1 is constrained by 2 times at-most of he number of trues in A1. (wait)
  13. As a result, by giving at-most-2 constraint to A, we obtain at-most-4-like constraint out of 8 variables in B.
  14. With this idea, this combination of truth value, the bottom part, true true false false false true false true, is satisfiable.
  15. In contrast, this combination 3 trues in the left and 1 true in the right, is not satisfiable. (wait) So I named this idea approximate-at-most. (wait)
  16. I would like to remark about approximate-at-most-k, Again, is not a real at-most-k And should be used for only soft constraints (wait)
  17. Here are 2 times 2 models for approximate-at-most-k. They have two variables as parents and four variables as children And recursively defined
  18. on 2 times 2 models, when you give at-most-k on four variables at the top node, we obtain approximate-at-most as this formula. (wait)
  19. Next, generalized h times w models. Each node has height h and width w. (wait)
  20. on these models, when you give at-most-k on the variables at the top node, we obtain approximate-at-most as this formula. (wait)
  21. And I would like to denote with fractional form, like a divided by b. (wait)
  22. Here is a graph of literal number comparison on 2 times 2 models. Approximate is compared to sequential counter encoding. Black line is approximate and gray is counter. As the number of target variables increases, the difference between approximate and counter is enlarged.
  23. And dashed is added. It denotes literal rates of approximate par counter. As expected, approximate consumes a lower number than a conventional encoding. (wait)
  24. This graph indicates coverages. That means the number of solutions by approximate divided by the number of all solutions. Predictably, it becomes lower as target variables increase.
  25. Literal rates I mentioned before is added. You can see how much solutions are covered by how much literals.
  26. For instance, about at-most-half-of-32, approximate covers 44% solutions on 15% literals. One could say it is efficient when less literals covers large solution space.
  27. So, we can define efficiency as coverage par literal rate. The blue line describes efficiency. In this graph, at-most-half-of 32 is the most efficient
  28. Before moving on to generalized h times w models, we should check a method of adjustment. When you want to generate approximate-at-most-k of n for arbitrary k and n, first you build a h times w model, and then you have to adjust by fixing some variables. For example, when a model provides approximate-8 of 16, (there are 16 target variables)
  29. If you fix 2 variables to false and 4 variables to true,
  30. You obtain approximate-at-most 4 of 10. (wait) We use this method of adjustment
  31. Here is example 1 of h times w models. We want to generate approximate 5 of 10. Using this model and giving at-most 2 at the top, we obtain approximate-at-most 6 of 12.
  32. And we fix 1 false and 1 true, then it is transformed approximate-at-most 5 of 10.
  33. This is example2. In a similar way, another h times w models can be used to generate approximate-at-most 5 of 10. As seen above, we can implement for specific k of n by using many kind of h times w models.
  34. So I check efficiencies of each implements, and this shows the best efficiencies. Blue line is approximate-at-most-k of 10. Red is of 20. Gray is of 30 (wait)
  35. Here we notice a peculiar point. 24 of 30 is high efficiency. 25 of 30 is low efficiency. And 26 of 30 is high efficiency
  36. Each models are like these. (wait)
  37. Both high efficiency 24 and 26 are based on the same model. But 25 is not able to implement from this model. Any adjustment cannot work. So 25 cannot mark high efficiency
  38. This is discussion1. A kind of hierarchy of solutions. At-most-7 solutions are included in at-most-8 solutions, At-most-6 solutions are included in at-most-7 solutions, And so on
  39. And this study’s definition of coverage consider this range (wait)
  40. But when people seek a better solution, I think maximum solution, at-most-8 in this example, would be important. I suppose this has to be considered
  41. And discussion 2, probability of finding solutions. When approximate-at-most-k covers 50% of the possible solutions, every single solution has probability 50% to be found
  42. For a real-life problem. When it has 1 solution, 50% to find. When it has 2 solutions, 75% to find, for whichever solutions. And when 10 solutions, 99.9% to find
  43. So coverage is not finding probability. This will be also considered in future works