Skip to content

Commit

Permalink
Fixes aimacode#33 for Tree CSP solver.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manthan-R-Sheth committed Mar 11, 2017
1 parent edb720d commit f921c85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions md/Tree-CSP-Solver.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ __function__ TREE-CSP-SOLVER(_csp_) __returns__ a solution, or failure
 _n_ ← number of variables in _X_
 _assignment_ ← an empty assignment
 _root_ ← any variable in _X_
 _X_ ← TOPOLOGICALSORT(_X_, _root_)
 _X_ ← TOPOLOGICALSORT(_csp_, _root_)
 __for__ _j_ = _n_ __down to__ 2 __do__
&emsp;&emsp;MAKE\-ARC\-CONSISTENT(PARENT(_X<sub>j</sub>_), _X<sub>j</sub>_)
&emsp;&emsp;MAKE\-ARC\-CONSISTENT(_csp_, PARENT(_X<sub>j</sub>_), _X<sub>j</sub>_)
&emsp;&emsp;__if__ it cannot be made consistent __then return__ _failure_
&emsp;__for__ _i_ 1 __to__ _n_ __do__
&emsp;&emsp;_assignment_[_X<sub>i</sub>_] &larr; any consistent value from _D<sub>i</sub>_
Expand Down

0 comments on commit f921c85

Please sign in to comment.