Answers.Body: <p>To satisfy <span class="math-container">$D\ne A$</span>, for each element in the domain of <span class="math-container">$D$</span>, say <span class="math-container">$d$</span>, there must be at least one element in the domain of <span class="math-container">$A$</span>, say <span class="math-container">$a$</span>, that <span class="math-container">$d \ne a$</span>.</p>
  <p>Domain of <span class="math-container">$D$</span>: <span class="math-container">$ \{ 1, 2, 3, 4 \} $</span></p>
  <p>Domain of <span class="math-container">$A$</span>: <span class="math-container">$ \{ 2, 3, 4 \} $</span></p>
  <p>So, for example if <span class="math-container">$d=2$</span>, there is at least one element in the domain of <span class="math-container">$A$</span> like <span class="math-container">$a$</span> such that <span class="math-container">$d \ne\ a$</span>. E.g. <span class="math-container">$1, 3$</span> and <span class="math-container">$4$</span>.
  So, <span class="math-container">$2$</span> remains in the domain of <span class="math-container">$D$</span>. This is the case for other elements of <span class="math-container">$D$</span>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-26T05:08:38.987Z
Answers.LastActivityDate: 2022-05-26T05:08:38.987Z
Answers.UserDisplayName: user153245
Body: <p>I was watching the video <a href="https://www.youtube.com/watch?v=4cCS8rrYT14" rel="nofollow noreferrer">Constraint Satisfaction: the AC-3 algorithm</a>, and I tried to solve this question:</p>
  <blockquote>
  <p>Given the variables A, B, C and D, with domain {1, 2, 3, 4} in each of them and restrictions A&gt; B, B = C and D ≠ A, use the AC algorithm.</p>
  </blockquote>
  <p>But the teacher told me that my answer below is wrong!</p>
  <p>He gave me a tip: Domain D will not be changed!</p>
  <p>Below, I is my answer step by step. If someone can help me find the error, I appreciate it!</p>
  <p>To solve this exercise, it is first necessary to organize the data in order to separate what is the domain, agenda and arc.</p>
  <p><a href="https://i.sstatic.net/mHp2I.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mHp2I.png" alt="Step 1" /></a></p>
  <p>Soon after, we will analyze the first item on the agenda “A&gt; B” with domain A, in order to eliminate unnecessary elements from the domain.</p>
  <p><a href="https://i.sstatic.net/SIk5Q.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SIk5Q.png" alt="step 2." /></a></p>
  <p>Analyze domain B with the agenda item “B &lt;A”</p>
  <p><a href="https://i.sstatic.net/R5Ucq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/R5Ucq.png" alt="3 step" /></a></p>
  <p>Analyze domain B with the agenda item “B = C” and add the constraint “A&gt; B”</p>
  <p><a href="https://i.sstatic.net/ja65I.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ja65I.png" alt="4 Step" /></a></p>
  <p>Analyze domain D with the agenda item “D ≠ A” and add the constraint “B &lt;A”</p>
  <p><a href="https://i.sstatic.net/tfoXc.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tfoXc.png" alt="5 Step" /></a></p>
  <p>Analyze domain A with the agenda item “A ≠ D”</p>
  <p><a href="https://i.sstatic.net/mIpBs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mIpBs.png" alt="6 Step" /></a></p>
  <p>Analyze domain A with the agenda item “A&gt; B”</p>
  <p><a href="https://i.sstatic.net/XKi22.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XKi22.png" alt="7 Step" /></a></p>
  <p>Analyze domain B with the agenda item “B = C”</p>
  <p><a href="https://i.sstatic.net/DmTPE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DmTPE.png" alt="8 Step" /></a></p>
  <p>Analyze domain B with the agenda item “B &lt;A”</p>
  <p><a href="https://i.sstatic.net/gNuDq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gNuDq.png" alt="9 Step" /></a></p>
  <p>Result</p>
  <p><a href="https://i.sstatic.net/DzNCk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DzNCk.png" alt="10 Step" /></a></p>
  
Tags: <constraint-satisfaction-problems><homework>
Title: What's wrong with my answer to this constraint satisfaction problem, which needs to be solved the AC-3 algorithm?
UserDisplayName: Rodrigo Franco
ThreadText: # What's wrong with my answer to this constraint satisfaction problem, which needs to be solved the AC-3 algorithm?
  
  (Asked by: username_0 on 2020-09-13)
  
  I was watching the video [Constraint Satisfaction: the AC-3 algorithm](https://www.youtube.com/watch?v=4cCS8rrYT14), and I tried to solve this question:
  
  > Given the variables A, B, C and D, with domain {1, 2, 3, 4} in each of them and restrictions A> B, B = C and D ≠ A, use the AC algorithm.
  
  But the teacher told me that my answer below is wrong!
  
  He gave me a tip: Domain D will not be changed!
  
  Below, I is my answer step by step. If someone can help me find the error, I appreciate it!
  
  To solve this exercise, it is first necessary to organize the data in order to separate what is the domain, agenda and arc.
  
  [![Step 1](https://i.sstatic.net/mHp2I.png)](https://i.sstatic.net/mHp2I.png)
  
  Soon after, we will analyze the first item on the agenda “A> B” with domain A, in order to eliminate unnecessary elements from the domain.
  
  [![step 2.](https://i.sstatic.net/SIk5Q.png)](https://i.sstatic.net/SIk5Q.png)
  
  Analyze domain B with the agenda item “B <A”
  
  [![3 step](https://i.sstatic.net/R5Ucq.png)](https://i.sstatic.net/R5Ucq.png)
  
  Analyze domain B with the agenda item “B = C” and add the constraint “A> B”
  
  [![4 Step](https://i.sstatic.net/ja65I.png)](https://i.sstatic.net/ja65I.png)
  
  Analyze domain D with the agenda item “D ≠ A” and add the constraint “B <A”
  
  [![5 Step](https://i.sstatic.net/tfoXc.png)](https://i.sstatic.net/tfoXc.png)
  
  Analyze domain A with the agenda item “A ≠ D”
  
  [![6 Step](https://i.sstatic.net/mIpBs.png)](https://i.sstatic.net/mIpBs.png)
  
  Analyze domain A with the agenda item “A> B”
  
  [![7 Step](https://i.sstatic.net/XKi22.png)](https://i.sstatic.net/XKi22.png)
  
  Analyze domain B with the agenda item “B = C”
  
  [![8 Step](https://i.sstatic.net/DmTPE.png)](https://i.sstatic.net/DmTPE.png)
  
  Analyze domain B with the agenda item “B <A”
  
  [![9 Step](https://i.sstatic.net/gNuDq.png)](https://i.sstatic.net/gNuDq.png)
  
  Result
  
  [![10 Step](https://i.sstatic.net/DzNCk.png)](https://i.sstatic.net/DzNCk.png)
  
  **Tags:** constraint-satisfaction-problems, homework
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-05-26. Score: 1
  
  To satisfy $D\ne A$, for each element in the domain of $D$, say $d$, there must be at least one element in the domain of $A$, say $a$, that $d \ne a$.
  
  Domain of $D$: $ \{ 1, 2, 3, 4 \} $
  
  Domain of $A$: $ \{ 2, 3, 4 \} $
  
  So, for example if $d=2$, there is at least one element in the domain of $A$ like $a$ such that $d \ne\ a$. E.g. $1, 3$ and $4$.
  So, $2$ remains in the domain of $D$. This is the case for other elements of $D$.
  
  
  ---
  
  