Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Constraint Programming: Bounds Consistency and Algorithms for Solving Inconsistencies, Study notes of Computer Numerical Control

The concept of bounds consistency in constraint programming and provides solutions to problems related to consistency. It covers the impact of singleton domains and empty domains on constraints, and presents counterexamples to incorrect algorithms. Additionally, it introduces an algorithm, xc-3, for revising arcs and maintaining bounds consistency.

Typology: Study notes

2010/2011

Uploaded on 09/10/2011

myohmy
myohmy ๐Ÿ‡ฌ๐Ÿ‡ง

4.8

(10)

82 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download Constraint Programming: Bounds Consistency and Algorithms for Solving Inconsistencies and more Study notes Computer Numerical Control in PDF only on Docsity! Constraint Programming Solutions to problems on consistency 1. โ€ข if Y has a singleton domain {v} and either v = min(X) or v = Max(X) then remove v from the domain of X โ€ข if Y has an empty domain, then set the domain of X to the empty set. % The constraint is now bounds consistent from X to Y โ€ข if X has a singleton domain {v} and either v = min(Y ) or v = Max(Y ) then remove v from the domain of Y โ€ข if X has an empty domain, then set the domain of Y to the empty set. % The constraint is now bounds consistent from Y to X % Bounds consistency from X to Y has not been destroyed. 2. (a) A2 is correct. Counterexample to A1: X = 1โ†’ Y = 1 where Dom(X) = {2}, Dom(Y ) = โˆ…. A1 yields Dom(X) = {2}, Dom(Y ) = โˆ…. This is wrong since the assignment of X to 2 cannot be extended to a solution. (Note: Correct algorithm should set Dom(X) = Dom(Y ) = โˆ….) Counterexample to A3: X = 1โ†’ Y = 1 where Dom(X) = {1}, Dom(Y ) = {2, 3}. A3 yields Dom(X) = {1}, Dom(Y ) = {1}. This is wrong since the assignment of X to 1 cannot be extended to a solution. (Note: Correct algorithm should set Dom(X) = Dom(Y ) = โˆ….) (b) Counterexample to A2: X = 1โ†’ X = 2, where Dom(X) = {1, 2}. A2 yields Dom(X) = {1, 2}. This is wrong since the assignment of X to 1 cannot be extended to a solution. It is also wrong because 1 has been added to the domain of Y . (Note: Correct algorithm should set Dom(X) = {2}.) (c) if c1 6= c2 then set Dom(X) to Dom(X)โˆ’ {c1}. 3. algorithm XC-3(G) Let Q be the set of (directed) arcs of G while Q not empty do select and remove any arc (x,y) from Q; if (x,y) is labelled โ€œaโ€ then REVISEac(x,y) if REVISEac(x,y) changed min(x) or max(x) then to Q add all arcs of G that go into x, except (y,x) else if this changed the domain of x then to Q add all โ€œaโ€ arcs of G that go into x, except (y,x) if (x,y) is labelled โ€œbโ€ then REVISEbc(x,y) if REVISEbc(x,y) changed the domain of x then to Q add all arcs of G that go into x The key insight is that a โ€œbโ€ arc only needs to be put on Q if the minimum or maximum elements of the domain of the constrained variable are pruned. Another point to notice is that if REVISEbc(x,y) changed the domain of x then the arc (y,x), which is a โ€œbโ€ arc, needs to be put back on Q. 1
Docsity logo



Copyright ยฉ 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved