06.03.2013 Views

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Suppose there exist 3 colors {red, green, yellow} by which we have to<br />

color the map satisfying the constraint that no two adjacent states have the<br />

same color. We start with an arbitrary state <strong>and</strong> arbitrary color assignment for<br />

it. Let us choose r, g, <strong>and</strong> y for red, green <strong>and</strong> yellow respectively in our<br />

subsequent discussions. The constraints we get after assigning r to A1 are<br />

also recorded in the list. Thus we find step 1. In our nomenclature Ai ≠ r<br />

denotes color of Ai is different from red.<br />

Step 1: {A1 ← r, A2 ≠ r}<br />

Step 2: {A1 ← r, (A2 ←g , A3≠g , A4 ≠ g)}<br />

Step 3: { A1 ← r, A2 ←g , (A3←y , A4 ≠y, A6 ≠y),A4≠ g}<br />

Step 4: { A1 ← r, A2 ←g ,A3←y , (A4 ←r, A5 ≠ r,A6≠ r),A6≠y}<br />

Step 5: { A1 ← r,A2 ←g ,A3←y , A4 ←r, (A5 ←g, A6≠g),A6≠r }<br />

Step 6: { A1 ← r,A2 ←g ,A3←y , A4 ←r, A5 ←g ,A6←y}<br />

In step 2, we replaced A2 ≠r of step 1 by A2 ←g <strong>and</strong> added the<br />

constraints with it in the parenthesis. From fig. 19.8, the constraints imposed<br />

on A3 <strong>and</strong> A4 are A3≠ g, A4 ≠ g .<br />

In step 3, we replaced A3 ≠ g of step 2 by A3 ←y <strong>and</strong> added the<br />

constraints A4≠y <strong>and</strong> A6≠ y <strong>and</strong> lastly copied the remaining entries from the<br />

last step. The process continues until an inconsistency occurs at a step, when<br />

one has to backtrack to the last step for alternate solutions. Fortunately, in our<br />

proposed solutions we did not observe inconsistency.<br />

If at least one solution is obtained we say that CSP is satisfiable. Here<br />

step 6 yields one of the possible solutions for the problem.<br />

Example 19. 2: In this example we consider a problem with a constraint set<br />

which exhibits a partial satisfaction w.r.t primitive constraints but total<br />

satisfiability is not feasible. The problem is: given the constraint<br />

C=(x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!