SlideShare a Scribd company logo
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

PPTX
primal and dual problem
PPT
CH II Operation Research Duality and SA (2).ppt
PDF
Linearprog, Reading Materials for Operational Research
PPT
Simplex Method for Linear Programming - Operations Research
 
PPTX
Duality in Linear Programming
PPTX
PPT
aaoczc2252
PDF
LPP, Duality and Game Theory
primal and dual problem
CH II Operation Research Duality and SA (2).ppt
Linearprog, Reading Materials for Operational Research
Simplex Method for Linear Programming - Operations Research
 
Duality in Linear Programming
aaoczc2252
LPP, Duality and Game Theory

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

PDF
Optimization Techniques.pdf
PPT
Management Science
PDF
Unit.3. duality and sensetivity analisis
PPT
Approx
PDF
ilp-nlp-slides.pdf
PPTX
3.7lecture
PPTX
Unit 1-logic
PPT
RATIONAL EQUATIONS SUCH AS EXAMPLES OF RATIONAL .ppt
PPT
RATIONAL EQUATIONS TRANSFORMABLE INTO QUADRATIC EQUATION
PPT
10_6 solving rational equations Trout 09.ppt
PPT
Ms(lpgraphicalsoln.)[1]
PPT
inbound5734878140507128787.ppt
PDF
presentation on Duality theory in operations research
PPTX
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
PDF
10-probability-distribution-sta102.pdfhh
PPT
Bionomial and Poisson Distribution chapter.ppt
PPSX
Graphical method
PPT
The Use of Fuzzy Optimization Methods for Radiation.ppt
PDF
Chapter 4 Duality & sensitivity analysis hand out last .pdf
PPT
Ratios and Proportions.ppt
Optimization Techniques.pdf
Management Science
Unit.3. duality and sensetivity analisis
Approx
ilp-nlp-slides.pdf
3.7lecture
Unit 1-logic
RATIONAL EQUATIONS SUCH AS EXAMPLES OF RATIONAL .ppt
RATIONAL EQUATIONS TRANSFORMABLE INTO QUADRATIC EQUATION
10_6 solving rational equations Trout 09.ppt
Ms(lpgraphicalsoln.)[1]
inbound5734878140507128787.ppt
presentation on Duality theory in operations research
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
10-probability-distribution-sta102.pdfhh
Bionomial and Poisson Distribution chapter.ppt
Graphical method
The Use of Fuzzy Optimization Methods for Radiation.ppt
Chapter 4 Duality & sensitivity analysis hand out last .pdf
Ratios and Proportions.ppt
Ad

More from Shunji Nishimura (16)

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

Recently uploaded (20)

PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
web development for engineering and engineering
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
Geodesy 1.pptx...............................................
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
composite construction of structures.pdf
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Welding lecture in detail for understanding
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CH1 Production IntroductoryConcepts.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
web development for engineering and engineering
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Embodied AI: Ushering in the Next Era of Intelligent Systems
R24 SURVEYING LAB MANUAL for civil enggi
Geodesy 1.pptx...............................................
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
composite construction of structures.pdf
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Welding lecture in detail for understanding
UNIT 4 Total Quality Management .pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx

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

  • #3: 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.
  • #4: Those encodings are absolutely at-most-k. In contrast, this study proposes approximate at-most-k. (wait)
  • #5: The difference is, conventional, absolute at-most-k covers all solutions. However, approximate-at-most-k only covers a part of solutions. (wait)
  • #6: 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.
  • #7: Obviously approximate-at-most-k has limitation, but I will show you that approximate-at-most-k drastically reduces Boolean expressions.
  • #8: 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)
  • #9: 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.
  • #10: Then, we consider the left half of two variables, A1, and it constraint the left half of B, B1, with 2 times at-most.
  • #11: 2 times at-most means that, When A1 has no true values, B1 is constrained by at-most-0, so no trues allowed. (wait)
  • #12: When A1 has 1 true value, B1 is constrained by at-most-2. (wait)
  • #13: When A1 has 2 true values, B1 is constrained by at-most-4, that makes no sense as a constraint. (wait)
  • #14: To wrap up, B1 is constrained by 2 times at-most of he number of trues in A1. (wait)
  • #15: As a result, by giving at-most-2 constraint to A, we obtain at-most-4-like constraint out of 8 variables in B.
  • #16: With this idea, this combination of truth value, the bottom part, true true false false false true false true, is satisfiable.
  • #17: 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)
  • #18: 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)
  • #19: 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
  • #20: 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)
  • #21: Next, generalized h times w models. Each node has height h and width w. (wait)
  • #22: 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)
  • #23: And I would like to denote with fractional form, like a divided by b. (wait)
  • #24: 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.
  • #25: And dashed is added. It denotes literal rates of approximate par counter. As expected, approximate consumes a lower number than a conventional encoding. (wait)
  • #26: 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.
  • #27: Literal rates I mentioned before is added. You can see how much solutions are covered by how much literals.
  • #28: 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.
  • #29: 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
  • #30: 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)
  • #31: If you fix 2 variables to false and 4 variables to true,
  • #32: You obtain approximate-at-most 4 of 10. (wait) We use this method of adjustment
  • #33: 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.
  • #34: And we fix 1 false and 1 true, then it is transformed approximate-at-most 5 of 10.
  • #35: 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.
  • #36: 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)
  • #37: 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
  • #38: Each models are like these. (wait)
  • #39: 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
  • #40: 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
  • #41: And this study’s definition of coverage consider this range (wait)
  • #42: 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
  • #43: 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
  • #44: 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
  • #45: So coverage is not finding probability. This will be also considered in future works