An Improved Algorithm forMaintaining
Arc Consistency in DynamicConstraint Satisfaction Problems
Pavel SurynekCzech Technical UniversityPrague
Roman BartákCharles UniversityPrague
Problem area Real world = dynamic world
practical problems change continuously difficult to capture by static formulation solution must reflect that changes
Dynamic CSP A CSP from which constraints can be retracted
or to which constraints can be added in arbitrary order.
Existing approaches to DCSPs
Search for robust solution the solution is still valid for the problem after
a small change Reconstruction of the solution
the solution is locally repaired after a change Minimal perturbation problems
solutions minimizing that local repair Reusing the reasoning process
our approach: maintaining arc consistency
Why dynamic arc consistency ?
Arc consistency simplifies the problem Interactive problems
Interactive preparation of consistent a problem peptide synthesis determination of RNA structures timetabling
Search algorithms Decision = addition of a constraint Undoing decision = retraction of a constraint
Current situation
DnAC-4 (filtration based on AC-4) quite fast large memory consumption
DnAC-6 (filtration based on AC-6) so far fastest algorithm for maintaining AC large memory consumption complicated data structures
AC|DC (filtration based on AC-3) simple low memory consumption slow
AC3.1|DC (filtration based on AC-3.1) fast larger memory consumption
uses additionaldata structures
no additionaldata structures
3 phases of constraint retraction
Initialization phase restores values deleted by the retracted constraint from
domains of its variables when propagating through it for the first time
Propagation phase restores values that can be added due to previous domain
extensions (like reverted AC) Filtration phase removes
inconsistent values (standard AC)
A new algorithm AC|DC-2i
Record information during addition of constraints via AC-3 justifications (like DnACs, neighbor in which lost
all supports) and value removal time Restore only most promising values
use removal times and justifications to identify values to restore
new support in justification variable that was deleted before restored value
Optionally use AC-3.1 AC3.1|DC-2i
B: 2 3 42/D6 3/D9
Constraint addition by AC|DC-2i
E:
B=D (1)
C=D (3)
A<C (2)C≠E (4)
order number when the constraint is added
A: 2 3 4 3
justification for value removal VariableTime
4/C2
Justifications and removal times are recorded during addition of constraints by AC-3
C: 1 2 3 41/A3 2/A4 3/E7
D: 1 2 3 41/B1 2/C5 3/C8
B: 2 42/D6 3/D9
Constraint retraction by AC|DC-2i
E:
B=D (1)
C=D (3)
A<C (2)C≠E (4)
D: 2 41/B1
C: 1 2 4
A: 2 3 4 34/C2
1/A3 2/A4
2/C5
3/E7
3/C8
Constraint A<C is removed from the problem
Initialization: restore values deleted when propagating A<CInitialization: restore values deleted when propagating A<C
Constraint A<C is removed from the problem
Propagation: domain extensions are propagatedPropagation: domain extensions are propagated
Filtration: remove inconsistent values (re-establish AC)Filtration: remove inconsistent values (re-establish AC)
1/D10
Experimental resultsRuntime comparison of retraction from a consistent state
0
10
20
30
40
50
60
87 87.2 87.4 87.6 87.8 88 88.2 88.4 88.6 88.8 89Tightness in percents (100*p2)
Tim
e in
sec
onds
AC|DC
AC3.1|DCDnAC-6
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
87 87.2 87.4 87.6 87.8 88 88.2 88.4 88.6 88.8 89Tightness in percents (100*p2)
Tim
e in
sec
onds
DnAC-6AC|DC-2iAC3.1|DC-2i
RCSP(100,50,0.5,p2)
Experimental resultsRuntime of constraint addition
0
2
4
6
8
10
12
14
16
18
20
87 87.2 87.4 87.6 87.8 88 88.2 88.4 88.6 88.8 89Tightness in percents (100*p2)
Tim
e in
sec
onds
AC|DC AC|DC-2iDnAC-6 AC3.1|DCAC3.1|DC-2i
RCSP(100,50,0.5,p2)
Experimental resultsMemory consumption
Domain size (d) 20 30 40 50 60 70 80 90
Tightness of constraints
(100*p2)71% 79% 84% 87% 89% 90% 91% 92%
DnAC-6 2MB 4MB 6MB 7MB 9MB 10MB 12MB 13MB
AC|DC <1MB <1MB <1MB <1MB <1MB <1MB <1MB <1MB
AC3.1|DC 2MB 3MB 5MB 5MB 7MB 7MB 9MB 10MB
AC|DC-2i <1MB <1MB <1MB <1MB <1MB <1MB <1MB <1MB
AC3.1|DC-2i 2MB 3MB 5MB 5MB 7MB 7MB 9MB 10MB
RCSP(100,d,0.5,p2)