- Learn
- Computer Science & IT
- Computer Science
- Artificial Intelligence
- Constraint Satisfaction Problems
Constraint Satisfaction Problems
IntermediateLesson 3 of 10 in Artificial Intelligence Course
What you will learn
- Describe a problem by its variables, domains and constraints, recognize the kinds of constraints, and turn real scheduling and assignment tasks into well-formed constraint satisfaction problems.
- Describe the parts of a constraint satisfaction problemName the variables, domains and constraints of a problem, tell partial, consistent and complete assignments apart, and draw the constraint graph.
- Distinguish the kinds of constraintsClassify constraints as unary, binary, higher-order or global, rewrite higher-order constraints as binary ones, and separate hard constraints from preferences.
- Model scheduling and assignment problems as CSPsTurn timetabling, job-shop scheduling, assignment tasks and puzzles into CSPs, choosing variables and domains so the constraints stay simple.
- Describe the parts of a constraint satisfaction problem
- Search for a solution one variable at a time, back up at dead ends, and choose the order of variables and values so the search finds a solution, or proves there is none, with far less work.
- Run backtracking search step by stepExplain why backtracking assigns one variable per level, carry out the algorithm by hand and state its completeness and cost.
- Choose variables and values with ordering heuristicsApply minimum remaining values, the degree heuristic and least constraining value, explain why they point in opposite directions, and measure their effect on a search.
- Back up intelligently after a dead endUse conflict sets to backjump past variables that did not cause a failure, and record nogoods so the same failure is not repeated.
- Run backtracking search step by step
- Use inference to delete values that cannot be part of any solution, before and during search, and judge what forward checking, arc consistency and stronger consistency each guarantee.
- Apply forward checking during searchPrune the domains of a newly assigned variable’s neighbors, detect empty domains, restore values on backtracking and recognize what forward checking misses.
- Enforce arc consistency with AC-3Apply node and arc consistency, run AC-3 by hand, know its cost and limits, and maintain arc consistency during search.
- Use stronger consistency and global constraintsExplain path and k-consistency, propagate Alldiff and bounds constraints, and weigh the extra pruning against its cost.
- Apply forward checking during search
- Start from a complete assignment and repair it with the min-conflicts heuristic, escape plateaus and local minima, and judge when local search or backtracking is the better tool.
- Repair assignments with the min-conflicts heuristicRun min-conflicts by hand on a complete-state formulation, explain why it works well on large problems and use it to repair a schedule after a change.
- Escape plateaus and local minima, and choose between local search and backtrackingUse sideways moves, tabu search, constraint weighting and restarts, and decide which method fits a given problem.
- Repair assignments with the min-conflicts heuristic
- Read the constraint graph to split a problem into independent parts, solve tree-shaped problems in linear time, and turn nearly tree-shaped problems into trees.
- Split independent subproblems and solve tree-structured CSPsFind independent subproblems in the constraint graph and solve a tree-structured CSP with the backward and forward passes of the tree algorithm.
- Reduce nearly tree-structured problems to treesApply cutset conditioning and tree decomposition, relate their cost to cutset size and tree width, and break value symmetry.
- Split independent subproblems and solve tree-structured CSPs
Constraint Satisfaction Problems study guide
1Formulate problems as constraint satisfaction problems
Choosing a timetable or assigning reviewers starts with a model: what needs a value, which values are possible, and which combinations are allowed. A clear model lets the same solving methods work across very different tasks. You will build that model, distinguish requirements from preferences, and see how the choice of variables changes the work a solver faces. Small scheduling and puzzle examples make each part concrete.
1.1 Describe the parts of a constraint satisfaction problem
A constraint satisfaction problem, or CSP, describes a set of choices and the rules that connect them. Its state is a factored representation: you can inspect individual variables and their values, then reuse general methods for pruning and search.
Variables, domains, and constraints
A variable names something to choose. Its domain lists its allowed values. A constraint specifies which combinations may occur together. For workshops A and B, let each value be a time slot from . The rule “A comes before B” has scope and relation . Writing expresses the same relation compactly.
The scope names the variables involved; the relation gives the allowed tuples of values. Mixing these up leads to a model in which “red” becomes a variable. In map coloring, regions are variables and colors are values.
What counts as a solution?
An assignment gives values to variables. Three checks describe its status:
- It is partial if some variables have no value.
- It is complete if every variable has a value.
- It is consistent if it violates no constraint among the assigned variables.
A solution must be complete and consistent. With alone, the assignment is consistent but partial. Extending it with makes it complete and inconsistent. Choosing gives a solution to this two-variable example. A consistent partial assignment may still have no possible completion: unassigned variables can run out of compatible choices.
Read a constraint graph
For a binary CSP, draw one node per variable and one edge for each constrained pair. In a simplified Australia map, the variables are WA, NT, SA, Q, NSW, V, and T, each with domain {red, green, blue}. The neighboring pairs are WA–NT, WA–SA, NT–SA, NT–Q, SA–Q, SA–NSW, SA–V, Q–NSW, and NSW–V. Each edge requires different colors.
One solution is WA red, NT green, SA blue, Q red, NSW green, V red, and T red. Check every edge, including SA–V. T has no edge, so its color is independent of the mainland. There are 6 mainland colorings and 3 choices for T, giving 18 solutions. A constraint involving several variables needs a hypergraph representation; an extra constraint node can connect to every variable in its scope.
Domains and search size
A finite discrete domain is a fixed list, such as three colors. An infinite discrete domain might contain every nonnegative integer start time. A continuous domain might contain real-valued times. The latter two need representations and methods suited to those domains; linear programming handles continuous linear constraints.
For variables with values each, there are complete assignments. The map has candidates before constraints remove any. Finite CSPs include NP-complete problems, so a general polynomial-time solution method is not known. Their internal structure still makes pruning possible: the solver can rule out a choice without listing every full assignment containing it. Only the final values determine whether the answer is valid; the path used to find them is irrelevant.
Key Takeaways
- A CSP specifies variables, their domains, and constraints over combinations of values.
- A solution is both complete and consistent.
- A binary constraint graph exposes which variables directly affect one another.
- With equal domain size, the number of complete assignments is .
1.2 Distinguish the kinds of constraints
Constraints differ in how many variables they connect and in whether they state requirements or preferences. Recognizing that structure helps you write a faithful model and choose useful propagation methods.
Classify the scope
A unary constraint restricts one variable. If workshop E cannot use slot 1, apply by shrinking its domain from to before search. A binary constraint relates two variables, such as or . A binary CSP contains unary and binary constraints only.
A higher-order constraint involves at least three variables. If task durations X, Y, and Z must fill 10 hours, write . With each duration in , the tuple fails, while works. Checking a higher-order rule requires the values to work together.
Keep useful global constraints
A global constraint gives a named rule over a variable-sized group. requires different values for every pair. Its solution set equals the set defined by pairwise inequalities. For nine Sudoku cells, that is 36 binary constraints.
The global form also gives a solver access to group reasoning. Three variables restricted to two distinct values cannot all differ, even though each pair separately has a compatible assignment. Equal solution sets do not guarantee equal pruning strength.
A capacity rule can also be global. Here means : the total number of people assigned to the three tasks cannot exceed ten. The arguments represent quantities being added, so this rule permits, for example, .
Convert a finite constraint to binary form
Introduce an auxiliary variable U whose values are the allowed triples for . One possible value is . Add three binary constraints: the first component of U equals X, the second equals Y, and the third equals Z. Selecting that value for U therefore requires , , and .
Every original valid triple corresponds to a value of U, and every consistent assignment involving U yields a valid original triple. This construction lets binary methods handle a finite higher-order constraint. Its cost is the potentially large tuple domain, which is why solvers often retain the original global or higher-order rule.
Requirements and preferences
| Kind | What it means | Scheduling example |
|---|---|---|
| Hard constraint | Every solution must satisfy it. | A trainer cannot teach two workshops at once. |
| Soft constraint | A violation adds a cost to an otherwise feasible choice. | A trainer prefers an afternoon session. |
With soft constraints, the task becomes a constraint optimization problem, or COP: satisfy all hard rules and minimize total preference cost. Branch-and-bound and local search can be used for optimization.
Test the model against a known valid assignment and a known invalid one. An invented inequality between unrelated workshops removes legitimate schedules; a missing shared-trainer constraint admits impossible ones. Preferences also need care: turning “afternoon preferred” into “afternoon required” can eliminate every feasible schedule.
Key Takeaways
- Unary constraints prune one domain; binary constraints connect two variables.
- Alldiff requires pairwise different values but can support stronger group pruning.
- Auxiliary tuple variables can convert finite higher-order constraints to binary form.
- Hard constraints define feasibility; soft constraints rank feasible choices.
- Check both a valid and an invalid case when testing a model.
1.3 Model scheduling and assignment problems as CSPs
A model should describe the decisions directly enough that the rules are easy to express. Start by identifying what must be chosen, then assign domains and translate each requirement over the variables it actually involves.
Build a workshop timetable
Five one-slot workshops share three time slots: 1 morning, 2 midday, and 3 afternoon. Let A be Python Basics, B Python Advanced, C Statistics, D Databases, and E Ethics. Each workshop is a variable with initial domain .
Shared participants require , , , , , and . Basics must precede Advanced, so . The Ethics trainer arrives at midday, so . These give seven binary edges and one unary rule; C has four neighbors.
The assignment satisfies every rule: each shared-participant pair differs, Basics precedes Advanced, and Ethics is not in slot 1. It is the only valid assignment among the candidates. Workshops B and D may both use slot 3 because no rule requires them to differ.
Choosing one variable per slot instead would make each value a subset of workshops, with up to possible subsets per slot. Rules would then have to inspect those sets and ensure every workshop occurs once. Choosing workshops as variables keeps the constraints simpler.
Express task timing and shared resources
In job-shop scheduling, use a start-time variable for each task. Prepare takes 20 minutes, Analyze 40, and Report 30. Start times are nonnegative integer minutes. The order and 120-minute deadline give
The earliest starts are 0, 20, and 60. Working backward from the deadline gives latest starts 30, 50, and 90. Thus the windows are , , and .
Two tasks sharing a machine need a disjunctive constraint: or . Either task may go first, but they cannot overlap. A simple precedence constraint would force one particular order and remove the other possibility.
Model assignments and puzzles
For three reports assigned to three reviewers, make each report a variable with reviewer values. Use Alldiff if every reviewer handles one report. A conflict of interest removes a reviewer from the relevant report's domain.
For n-queens, let be the row of the queen in column . One queen per column is built into the model. For every pair, require and to prevent row and diagonal attacks. For eight queens this reduces the candidate space from choosing 8 squares out of 64, placements, to assignments. There are 92 solutions.
For Sudoku, the 81 cell variables have domains 1–9. Given digits impose unary constraints, and 9 rows, 9 columns, and 9 boxes each impose Alldiff.
Choose the coarsest time units that still represent every permitted start. Hourly sessions need hourly choices; minute-by-minute domains would enlarge the work without adding a useful schedule. Finish by separating preferences from hard rules and checking a small case with a known answer.
Key Takeaways
- Choose variables that keep constraints simple and domains no finer than needed.
- Precedence uses finish-before-start inequalities; shared resources require non-overlap.
- One queen per column can be built into the choice of variables.
- A correct model includes implicit resource rules and preserves legitimate shared slots.
2Solve CSPs with backtracking search
A search can waste most of its effort revisiting the same choices or discovering conflicts too late. Backtracking builds an assignment one variable at a time and returns to earlier choices when a branch fails. Variable and value ordering help it find useful branches sooner, while conflict analysis identifies which choices caused a dead end. Tracing the decisions makes both the basic method and its improvements easier to judge.
2.1 Run backtracking search step by step
Backtracking builds a partial assignment using depth-first search. It chooses one variable, tries a value, and continues until it finds a solution or must undo a choice. The search retains the useful earlier choices when a later one fails.
Branch on values, one variable at a time
Assigning A then B produces the same final assignment as assigning B then A. This commutativity means a CSP solver can choose one variable at each level and branch on its values. Allowing every variable order would produce leaves for only distinct complete assignments. For five variables with three values, that is 29,160 leaves instead of 243.
The next variable may depend on the current domains. What matters is choosing a single next variable at a node; the search does not need separate branches for all possible assignment orders.
Follow the recursive steps
- If the assignment is complete and consistent, return it.
- Choose an unassigned variable.
- Try each domain value that is consistent with the current assignment.
- Recurse after adding a value. If the recursive call fails, remove that assignment and try the next value.
- If no value works, return failure to the caller.
Plain backtracking tests a constraint once all variables in its scope have values. With and B unassigned, has no completed pair to reject. Trying then fails immediately. Waiting until every variable is assigned would postpone this easy rejection.
Trace a dead end
Use the workshop rules: . Take variables in order A, B, C, D, E and try values 1, 2, 3.
- Set . Reject and choose .
- Reject because of A and because of B; choose .
- Reject because of A; choose .
- E has no legal value: 1 is forbidden, 2 clashes with D, and 3 clashes with C.
Failure at E returns control to D. Its next value, 3, clashes with C. C has no later value, so control returns to B. Trying eventually produces another dead end under . The search then tries and reaches . With this order, plain backtracking tests 32 candidate values in total, including rejected ones.
What the method guarantees
| Property | Plain backtracking on finite domains |
|---|---|
| Completeness | Finds a solution if one exists; exhausting the search establishes infeasibility. |
| Worst-case search size | Exponential, assignments in the usual bound. |
| Search-path memory | Linear in ; one active path is stored. |
Checking constraints and storing the model also have costs. The linear memory description concerns the search path, while propagation may store domains and undo records as well.
Chronological backtracking returns to the most recent choice. Faster variants improve four separate decisions: the next variable, the order of its values, the consequences inferred after a choice, and the earlier choice to revisit after failure. These improvements reduce practical work without changing what counts as a solution.
Key Takeaways
- Commutativity removes the need to search every assignment order.
- Backtracking assigns one variable per level and rejects completed constraint violations.
- A failed recursive call undoes its choice and tries another value.
- Finite-domain backtracking is complete but has exponential worst-case search.
- Linear search-path memory does not include all model and propagation storage.
2.2 Choose variables and values with ordering heuristics
Good ordering can expose failure near the top of a search tree or preserve useful choices for later. Variable ordering and value ordering serve different purposes, so the best-looking direction differs between them.
Choose the most restricted variable
Minimum remaining values (MRV) selects the unassigned variable with the fewest currently legal values. It is also called the most-constrained-variable or fail-first heuristic. A nearly exhausted domain is likely to reveal a contradiction soon. If a domain is empty, the branch fails immediately.
Count current values after pruning, not the initial domain sizes. Without stored domains, a solver must determine which original values are still consistent with the assignment before applying MRV.
The degree heuristic breaks an MRV tie by choosing the variable with the most constraints on other unassigned variables. Such a choice affects more remaining decisions. Already assigned neighbors do not count toward this remaining degree. At the start of the Australia map, equal three-color domains tie, and SA's five neighbors give it the highest degree.
Keep options open when choosing a value
Least constraining value (LCV) tries the value that removes the fewest values from neighboring unassigned domains. Evaluating candidate values adds computation, but may avoid an expensive failed branch.
With WA red and NT green, SA can only be blue, while Q can be red or blue. Choosing Q blue would empty SA's domain. Choosing Q red removes red from NSW while preserving SA's blue. LCV therefore tries Q red.
| Ordering decision | Preferred choice | Reason |
|---|---|---|
| Next variable | Fewest remaining values | Expose a likely failure early. |
| Tied variable | Most unassigned neighbors | Affect more remaining decisions. |
| Next value | Fewest deleted neighbor values | Preserve chances of completing the assignment. |
Every variable must eventually receive a value, which makes an early test of a fragile variable useful. Only one value is needed to complete a first solution, which favors a value that leaves room for other decisions.
Combine ordering with forward checking
In the workshop schedule, apply first. E has two values; A, B, C, and D each have three. MRV chooses E. Try , and forward checking removes 2 from C and D.
C and D now tie with domains . C has three unassigned neighbors, A, B, and D; D has two, A and C. Degree selects C. Choose , leaving and . MRV picks , which forces ; the precedence rule then gives . Five assignments find the solution with no backtracking. Fixed variable order with forward checking needs 12 assignments and reaches two dead ends.
Ordering preserves completeness because it changes the sequence of choices, without discarding legal branches. The worst-case search remains exponential. When enumerating every solution or proving infeasibility, all relevant values must eventually be explored, so LCV's early-success advantage is reduced. Its main use is finding a first solution sooner.
Key Takeaways
- MRV uses the current number of legal values.
- Degree breaks ties using constraints on unassigned variables.
- LCV preserves neighboring choices when trying a value.
- Ordering changes search effort while preserving completeness.
2.3 Back up intelligently after a dead end
A dead end often has a smaller cause than the whole current assignment. Backjumping uses that cause to decide where to return, and constraint learning remembers a failure so it need not be rediscovered.
Find the choices that caused failure
On the Australia map, take the assignment order Q, NSW, V, T, SA. Let Q be red, NSW green, V blue, and T red. SA touches Q, NSW, and V, so all three colors are forbidden. Its conflict set is : earlier variables whose choices exclude its values.
Chronological backtracking would try changing T. Tasmania has no edge to SA, so changing its color cannot restore any option for SA. Backjumping returns to V, the most recently assigned member of the conflict set, and skips T.
A conflict set contains variables; a nogood records particular assignments. That distinction matters: another color for V may fix the failure, even though V is still a neighbor of SA.
Carry a conflict through earlier failures
Simple backjumping uses the current failure's direct conflict set. Conflict-directed backjumping carries information through several failed levels. When a failed variable X jumps to Y, Y absorbs X's conflict set with Y removed. If Y later exhausts all its values, its combined set identifies a cause further back in the assignment.
For example, use order WA, NSW, T, NT, Q, V, SA, and start with WA red, NSW red, T red. WA and NSW are not neighbors, so this partial assignment is consistent. Their choices remove red from NT, Q, and SA. Those three regions form a triangle, which cannot be colored using only green and blue.
No choice made for T changes that triangle. Conflict information can travel backward through the failed attempts and identify WA and NSW as the underlying cause. The search returns to NSW, the later of those two decisions, instead of spending time recoloring T.
Learn the failed combination
A solver can record as a nogood. Whenever both choices recur, the same triangle contradiction follows, so the branch can be rejected immediately. It would be incorrect to forbid WA red on its own: WA can be red in valid solutions with a different NSW color.
Learning adds a constraint or a cached forbidden combination. The learned condition must follow from the original constraints; failure caused merely by reaching a time limit supplies no such logical justification. A useful nogood keeps enough assignments to explain the impossibility without including unrelated choices.
Combine looking ahead and looking back
Forward checking and arc consistency remove unsupported values before a deep failure occurs. Backjumping diagnoses a failure after it occurs. Simple direct backjumping adds no pruning beyond what forward checking already detects, but conflict-directed methods can combine explanations of deeper failures. Learning preserves those explanations across later branches.
Key Takeaways
- A conflict set identifies earlier variables responsible for a failure.
- Backjumping skips choices unrelated to that failure.
- Conflict-directed backjumping combines conflict information across failed levels.
- A nogood forbids an impossible combination of assignments, not each assignment separately.
- Look-ahead pruning and learned explanations can work together.
3Prune domains with constraint propagation
A value can be impossible even before its variable is chosen. Constraint propagation follows the consequences of current domains and assignments, deleting values that lack the support they need. The methods differ in how far they look: from the immediate neighbors of a decision to pairs, triples, and whole groups of variables. Worked domain changes show what each method detects, what it misses, and when the extra work pays off.
3.1 Apply forward checking during search
Forward checking asks what a new assignment immediately rules out for unassigned neighbors. It deletes incompatible values before search reaches those variables, making some dead ends visible several levels earlier.
Prune after an assignment
After choosing , inspect each unassigned Y sharing a constraint with X. Delete every value in that conflicts with the choice. An empty domain means the current branch has no completion, so backtrack immediately.
For , assigning removes 2 from Y. For , assigning removes every Y value at most 2. The actual relation determines what is removed; forward checking is not limited to deleting equal values.
Pruning changes the current branch's domains. Keep an undo record, often called a trail, of every deletion caused by the choice. When that choice is undone, restore its deletions while retaining restrictions that belong to earlier choices. Copies of domains at each level provide another implementation.
Follow the workshop domains
Use slots 1–3 and rules . Apply the unary rule to get , then use fixed order A, B, C, D, E.
- leaves B, C, and D with .
- leaves C with .
- leaves D and E each with .
- removes 2 from E, emptying its domain. Backtrack.
Restoring domains and trying forces C to 2. D and E both become 3, so assigning D empties E again. The search must change A. With , it can reach . This trace tries 12 values, compared with 32 candidate tests for plain backtracking in the same order.
Recognize the limit of one-step checking
After step 3, D and E both have the sole value 2 and must differ. Forward checking still has not checked that constraint: neither D nor E was newly assigned. It detects the failure only when D receives its value.
This is the central limit of forward checking. It tests the assigned variable against its unassigned neighbors, without propagating a neighbor's smaller domain onward. Arc consistency can follow those consequences between unassigned variables.
Use the maintained domains
MRV can now select the smallest remaining domain directly. A singleton domain often becomes the next choice; an empty domain signals failure without adding another assignment. Keeping domains up to date helps both inference and ordering.
For at most neighbors and at most values per neighbor, a forward-checking pass uses about binary checks, assuming a constant-time relation test. It removes only values incompatible with the current assignment, so backtracking stays complete. Forgetting to restore a deletion can make a later branch lose a valid solution; pruning an unrelated variable can do the same.
Key Takeaways
- Forward checking prunes unassigned neighbors of the new assignment.
- An empty domain rejects the current branch immediately.
- Restore branch-specific deletions when undoing a choice.
- Forward checking does not propagate between two unassigned variables.
3.2 Enforce arc consistency with AC-3
A value needs a compatible partner in every neighboring domain. Arc consistency makes that support requirement explicit and follows the effects of domain changes throughout a binary CSP.
Support has a direction
Node consistency first removes values forbidden by unary rules. For a binary constraint, the directed arc is consistent when every value in X has at least one compatible value in Y. That value in Y is a support. Revising the arc deletes unsupported values from its tail, X.
For with both domains , revising deletes 3 from A. Revising deletes 1 from B. The resulting domains are and . A surviving value may use a different support for each neighbor; the supports need not form one joint solution.
Run AC-3
AC-3 uses a queue of directed arcs:
- Initially put every arc in the queue.
- Remove and revise X using Y's domain.
- If X becomes empty, stop with failure.
- If X shrinks, add for each other neighbor Z of X, excluding Y.
- Continue until the queue is empty.
A deletion in X can remove a support for Z, so the queue must point back into the changed domain. The arc from Y needs no immediate recheck: the deleted X values supported no value in Y, since none was compatible with Y in the first place. Nonempty closure domains are independent of processing order; different orders can reach failure at different empty domains.
Propagate a workshop decision
For the workshop rules , initial AC-3 removes 3 from A and 1 from B. It leaves C and D at and E at .
Now decide . The arc removes 1 from A, leaving . Revising B against A forces . D differs from C and A, so . E differs from D and cannot be 1, so . Domain reductions have traveled beyond the original decision's immediate neighbors.
Maintaining arc consistency (MAC) applies this inference after every search decision. Starting from arc-consistent domains, restricting requires a queue of incoming arcs from its unassigned neighbors. Domain deletions must be restored when search undoes the branch.
Interpret the result and cost
| Result after node and arc consistency | Meaning |
|---|---|
| An empty domain | No solution extends the current restrictions. |
| Every domain is a singleton | The unique remaining assignment satisfies the binary CSP. |
| Some domains have multiple values | Further inference or search may be needed. |
A triangle with domains {red, blue} and inequalities on all three edges remains arc-consistent, yet has no solution. Each edge has supports separately, but the three choices cannot work together.
With binary constraints and maximum domain size , AC-3 takes time: an arc revision checks up to pairs, and each arc can require up to rounds as its head loses values. MAC spends more per search node than forward checking, often in exchange for a much smaller search tree.
Key Takeaways
- Revising removes unsupported values from X.
- After X shrinks, AC-3 rechecks arcs pointing into X.
- Nonempty arc-consistent domains can still describe an unsatisfiable CSP.
- MAC maintains arc consistency after search decisions.
- AC-3 has the standard worst-case bound .
- Singleton conclusions require unary and binary constraints to have been enforced.
3.3 Use stronger consistency and global constraints
Separate pairwise supports can hide a group contradiction. Stronger consistency and specialized global propagation examine combinations that arc consistency misses, while numeric bounds can compress large domains into useful intervals.
Extend assignments to another variable
Path consistency examines triples. Every consistent assignment to two variables must have an extension to a third that agrees with both. In a triangle colored red or blue, X red and Y blue leave no value for Z. Path consistency removes that allowed pair and ultimately exposes infeasibility. It can remove tuples from relations, so it does more than delete individual domain values.
k-consistency requires every consistent assignment to any variables to extend to any additional variable. For binary CSPs, 1-consistency corresponds to node consistency, 2 to arc consistency, and 3 to path consistency. Strong k-consistency includes every level from 1 through k. With strong n-consistency on n variables and nonempty domains, any consistent partial assignment can be extended until it is a solution, without backtracking. Establishing this property has exponential worst-case time and memory costs.
Count values in Alldiff
Alldiff requires distinct values for all variables in its scope. If a group of m variables has only n distinct possible values and , no assignment can satisfy it.
For three cells with domains , pairwise inequalities are arc-consistent: each 4 has support 7 in every neighbor, and each 7 has support 4. The global count nevertheless fails because three different values are needed and only two exist.
If two cells both have domain , they must use 4 and 7 between them. Those values can be removed from every other cell in that row. This naked pair reasoning uses a subset of the whole Alldiff scope. A simple global propagator can also process singleton variables repeatedly, remove their values elsewhere, and check whether too few distinct values remain. Stronger propagators recognize constrained subsets as well.
Tighten numeric bounds
Bounds propagation stores a domain by its minimum and maximum. Bounds consistency requires each endpoint to have a satisfying extension for each relevant constraint; it does not check every interior value.
For two buses carrying 100 people, let and , with . The second bus carries at most 70, forcing . The first carries at most 50, forcing . The tightened windows are and .
For Prepare, Analyze, and Report taking 20, 40, and 30 minutes in that order, a 120-minute deadline gives latest starts 30, 50, and 90. Nonnegative starts give earliest starts 0, 20, and 60. Propagating forward and backward obtains these windows before a start time is chosen.
Choose useful strength
Each Sudoku cell has 20 distinct peers: 8 in its row, 8 in its column, and 4 additional cells in its box. Across 81 cells that gives distinct unequal pairs. Global constraints preserve the same solutions as those pairs but can expose naked pairs and shortages sooner. Stronger inference costs more per pass; practical solvers balance that cost against the search it saves, often combining arc consistency with specialized global and bounds propagation.
Key Takeaways
- Path consistency checks whether a consistent pair extends to a third variable.
- Strong k-consistency includes every smaller consistency level.
- Alldiff detects groups with too few distinct values.
- A naked pair reserves its two values for those two variables.
- Bounds propagation tightens endpoints without enumerating a large numeric domain.
- Stronger inference trades extra work per pass for less search.
4Solve CSPs with local search
A timetable that violates a few rules can still be a useful starting point. Local search keeps a value for every variable and repairs conflicts one move at a time. The challenge is to select productive moves and escape regions where progress stops. You will follow min-conflicts on a small board, examine ways to keep repairs moving, and choose a solving method that matches the evidence a scheduling or assignment task needs.
4.1 Repair assignments with the min-conflicts heuristic
Local search starts with a value for every variable, even when some constraints fail. Min-conflicts repairs this complete assignment by moving one conflicted variable to a value with as few conflicts as possible.
Choose a repair
- Construct a complete assignment, randomly or greedily.
- If no constraint is violated, return the solution.
- Randomly choose a variable involved in a violated constraint.
- Evaluate each of its domain values against the other variables, which stay fixed.
- Choose a value with the fewest conflicts, breaking ties randomly, and repeat until success or a step limit.
A conflicted variable participates in at least one violated constraint. It is not necessarily the variable with the largest number of violations. Random choice among conflicted variables and tied values helps prevent a rigid repeated sequence.
Repair a 4-queens board
Use one queen per column, with row variables . A pair conflicts if its rows are equal or its row difference equals its column difference. Begin with . Columns 1 and 3 share row 2; columns 3 and 4 attack diagonally. The conflicted variables are Q1, Q3, and Q4.
Choose Q3 and evaluate rows while Q1, Q2, and Q4 remain fixed:
| Candidate row for Q3 | Conflicts involving Q3 |
|---|---|
| 1 | 0 |
| 2 | 2 |
| 3 | 2 |
| 4 | 3 |
Row 1 yields , a solution. If Q1 had been chosen instead, its counts for rows 1–4 would be 0, 1, 2, and 2. Moving it to row 1 gives , leaving the Q3–Q4 diagonal conflict. A locally best repair can therefore lead to another incomplete repair process.
Count constraints involving the selected variable. Counting all violations in each resulting board gives the same ordering, because unrelated constraints contribute a constant to every candidate. It simply requires more work. Use one consistent conflict definition when comparing candidates.
Repair an existing schedule
When a trainer becomes unavailable, the current timetable is already a complete assignment. Min-conflicts can start there and move sessions until the new and existing constraints hold. A small change often needs few repairs, although one move can create new conflicts elsewhere. If retaining the old plan matters, attach an explicit cost to changing an assignment; minimizing violations alone does not minimize disruption.
Experiments with a good initial assignment have required relatively few repair steps even for a million queens. Larger boards still make each step more expensive. Min-conflicts has also been used for Hubble scheduling, with a reported reduction from about three weeks to about 10 minutes to schedule a week of observations.
Interpret search behavior
Many random CSP families change from mostly solvable to mostly unsolvable as the constraint-to-variable ratio rises. Near that transition, deciding how choices interact is often hardest. Loosely constrained problems can have many easily reached solutions. Highly constrained unsatisfiable problems may be quickly rejected by complete propagation-based solvers.
Reaching a min-conflicts step limit means no solution was found in that run. The problem may still be solvable. The method's practical strength comes from efficient repairs, including equal-score moves, despite solutions being a tiny fraction of all possible assignments.
Key Takeaways
- Min-conflicts starts with a complete assignment and repairs violated constraints.
- Choose a conflicted variable, then a minimum-conflict value with random tie-breaking.
- Candidate scores can ignore constraints unrelated to the chosen variable.
- Repairing feasibility and minimizing changes are different objectives.
- A step-limit failure leaves feasibility unresolved.
4.2 Escape plateaus and local minima, and choose between local search and backtracking
Repair search can stop improving while conflicts remain. To continue, the solver needs a way to move through equal-score states or change which moves appear worthwhile. The required outcome also matters: a quick feasible repair and a proof of infeasibility demand different methods.
Move through a plateau
A local minimum has violations but no single-variable move that lowers their count. A plateau is a connected region of assignments with the same score. Downhill-only moves can become trapped; a sideways move changes the state without lowering the score.
For 4-queens, has one conflict between Q3 and Q4. With other queens fixed, Q3's counts for rows 1–4 are 1, 1, 3, and 2; Q4's are 2, 2, 1, and 2. Neither variable has an improving move.
Moving Q3 to row 1 gives , still with one conflict, now Q1–Q3 sharing a row. In this new state Q1's counts are 1, 0, 3, and 1. Moving Q1 to row 2 produces and eliminates the conflict. The sideways move changed which improving moves were available.
Keep search moving
| Method | How it changes search |
|---|---|
| Tabu search | Temporarily forbids recent states or moves to reduce cycling. |
| Constraint weighting | Raises the importance of constraints that remain violated. |
| Random restarts | Begins again from a different complete assignment after fruitless steps. |
| Simulated annealing | Sometimes accepts worse moves, with acceptance reduced as temperature falls. |
A tabu list is short-lived memory. It discourages returning immediately to a state just left. A restart explores a different region, while annealing can cross a higher-conflict region within the current run.
With constraint weighting, start each weight at 1 and score a state by the sum of the weights of its violated constraints. Choose a change that reduces this weighted score, then increase the weights of constraints that remain violated. Repeated failures become more costly, reshaping the search landscape. A zero weighted score still means that every positively weighted hard constraint is satisfied.
Choose the evidence you need
Local search is incomplete: it may miss an existing solution, and a finite unsuccessful run leaves infeasibility unresolved. Finite-domain backtracking with propagation is complete: eventually it finds a solution or exhausts every possible completion.
Use local search when a large, loosely constrained problem needs one feasible assignment or a fast repair. Backtracking with MRV and MAC is a strong choice for tight puzzles and whenever the task requires an infeasibility result. Runtime still depends on the instance; these are method choices grounded in their guarantees.
The workshop schedule has the unique solution . Adding eliminates it. Min-conflicts may try repairs until its limit, but only a complete search that exhausts the remaining cases establishes that the organizer must change a requirement, such as adding another slot.
Key Takeaways
- A sideways move can expose an improving move beyond a plateau.
- Tabu memory, weights, restarts, and annealing address different obstacles to progress.
- Local search is incomplete; exhaustive finite-domain backtracking is complete.
- Choose a complete method when infeasibility must be established.
5Exploit the structure of a problem
The shape of a constraint graph can matter as much as the size of its domains. Separate components can be solved independently, and a tree allows a backward pruning pass followed by forward assignment without backtracking. Cycles require more work, but a small cutset or a narrow tree decomposition can control it. These methods connect graph structure with the time needed to find a consistent assignment.
5.1 Split independent subproblems and solve tree-structured CSPs
A constraint graph can reveal smaller problems inside a large one. Independent components can be solved separately, and acyclic components admit a particularly efficient algorithm with a backward pruning pass and a forward assignment pass.
Split disconnected components
A connected component is independent when no constraint links its variables to another component. Solve each component, then combine one solution from each. If any component is unsatisfiable, the full CSP is unsatisfiable. In the Australia map, Tasmania is independent of the mainland.
With n variables divided into independent groups of size c, solving one full assignment takes work on the order of instead of . For 60 binary variables split into three groups of 20, separate exhaustive searches consider at most assignments instead of about . Enumerating every combined solution would still require listing the combinations; the saving describes solving the component problems.
Order a tree from its root
A binary CSP is tree-structured when its constraint graph is acyclic. A connected tree has one path between each pair of variables; a forest contains separate trees. First apply unary restrictions. Choose any root and order variables so that every parent appears before its children.
Directed arc consistency in this order requires each earlier variable to have support in every later neighbor. On a tree, those later neighbors are its children. The direction of support is parent to child, even though the algorithm processes children before parents.
Prune backward, assign forward
- Read the order backward, excluding the root. For each child, revise the arc from its parent to that child. Delete unsupported values from the parent's domain.
- If a domain empties, report no solution.
- Read the order forward. Choose any surviving root value, then give each child a value compatible with its assigned parent.
The child's descendants have already been processed when its parent is revised. A surviving parent value therefore has support in each child, and each child value already has support farther down. Different child branches have no edges connecting them, so those supports can be chosen independently. That is why the forward pass needs no backtracking.
Follow the workshop tree
Fix in the workshop schedule and remove 1 from the other workshops' domains. The remaining graph is the path B–A–D–E, with domains and constraints .
Choose root A and order A, B, D, E. The backward pass revises , then , with no changes. Finally removes 3 from A because B has no larger value. Assigning forward gives . Restoring gives the complete timetable.
For n variables with maximum domain size d, the backward pass revises arcs at up to each, yielding time. The guarantee depends on acyclicity. A cycle can connect separate child branches and invalidate the independence that made those local choices safe.
Key Takeaways
- Disconnected components can be solved independently and combined.
- The tree method first enforces unary restrictions and orders parents before children.
- The backward pass revises parent-to-child arcs and prunes parents.
- The forward pass chooses compatible values without backtracking.
- The standard tree-CSP time bound is .
5.2 Reduce nearly tree-structured problems to trees
A graph with a few cycles may still be close enough to a tree to solve efficiently. Cutset conditioning assigns selected variables first; tree decomposition groups variables into overlapping parts. Both make the remaining coordination tree-shaped.
Condition on a cycle cutset
A cycle cutset is a set of variables whose removal leaves a tree or forest. Check every remaining cycle, not just the most visible one. For the Australia map, removing SA leaves the path WA–NT–Q–NSW–V plus isolated T. For the workshop graph, removing C leaves B–A–D–E.
For each assignment to the cutset that satisfies its internal constraints:
- Remove incompatible values from the remaining domains.
- Solve each remaining tree using backward pruning and forward assignment.
- If all succeed, combine their assignments with the cutset values. Otherwise try another cutset assignment.
In the workshop problem, leaves a solvable tree. With , A and B must come from and forces . D must differ from both A and C, giving . E cannot be 1 and must differ from C and D, leaving no value. With , A and B must be 1 and 2; D must then be 2, again leaving E no value.
For cutset size c, there are at most assignments, each followed by a tree problem of cost . The total is . Small c makes this useful; it remains exponential in c. Finding a minimum cutset is NP-hard, but a valid nonminimum cutset still gives a correct procedure.
Join overlapping bags
A tree decomposition arranges sets of variables, called bags, in a tree. It must satisfy three conditions:
- Every variable appears in a bag.
- Every constraint's scope fits inside at least one bag.
- Bags containing any one variable form a connected part of the bag tree.
The third rule is the running-intersection property. If X appears at both ends of a bag path, it must appear throughout that path. Otherwise distant bags could choose inconsistent X values without any intervening agreement check.
Each bag's locally valid assignments become values of a mega-variable. Adjacent bags must agree on shared variables. The resulting tree coordinates the local solutions. For a triangle X–Y–Z–X plus edge Z–W, bags and cover every edge and agree on Z.
The decomposition's tree width is its largest bag size minus 1. A graph's tree width is the minimum across valid decompositions. For width w, the standard CSP bound is . Fixed bounded width controls the exponent.
Remove value symmetry
When color names have no special meaning, permuting red, green, and blue preserves validity. The six mainland Australia solutions are six renamings of one pattern. Fixing the order NT before SA before WA in the color order red, green, blue keeps one representative. Such a symmetry-breaking constraint is valid only when the renaming preserves the original rules. A rule requiring a particular region to be red makes that color special and changes which permutations remain symmetries.
Key Takeaways
- A cycle cutset must remove every cycle.
- Conditioning tries cutset assignments and solves the remaining forest.
- Conditioning cost is exponential in cutset size.
- Tree decompositions cover variables and constraints and satisfy running intersection.
- Tree width is maximum bag size minus one, minimized over decompositions for the graph.
- Break value symmetry only for renamings that preserve the original constraints.
Constraint Satisfaction Problems examples
1Build and check a CSP model
13 steps
- 1IntroductionTurn a task into choices
A solver needs a precise account of what can be chosen and which combinations work. That account is a set of variables with domains of values, plus constraints that each cover a scope of variables, and any error in it carries into every search. Build a small timetable, then compare it with assignment and puzzle models. The goal is to make the decisions and their dependencies visible before trying to solve them.
- 2ExplanationName each decision
Let A and B be workshop time slots, each in . A must precede B, so write . The variables are the workshops’ slot choices; the numbers are values.
The constraint’s scope is A and B. Its relation allows the pairs . A solver can use either that tuple list or the ordering rule to test a candidate.
- 3ExampleCheck a candidate assignment
With alone, the assignment is partial and consistent. Choosing completes it but violates the ordering rule. Choosing instead gives a complete, consistent assignment.
These are separate checks: every variable needs a domain value, and every constraint must hold. A partial assignment can pass the current checks yet leave no possible completion.
- 4ChallengeCan the partial choice be completed?
Three variables X, Y, and Z have domains and constraints . X is assigned 1. Is this consistent partial assignment extendable?
---reveal---
No. X alone violates no constraint. Completing it forces both Y and Z to 2, which violates their inequality. Current consistency and possible completion are different requirements.
- 5ConnectionRead dependencies from the graph
A binary constraint graph places one node at each variable and an edge at each constrained pair. The triangle from the challenge shows three interacting choices. An isolated variable has no binary dependency on another variable.
This graph supports later methods: pruning follows edges, and disconnected components can be solved independently. A higher-order constraint needs its whole scope represented, such as by a separate constraint node.
- 6ExplanationMatch the rule to its scope
A unary rule restricts one domain: removes the earliest slot from Ethics. A binary rule connects two variables: orders workshops. A higher-order rule such as connects three choices.
A global constraint gives a named rule over a variable-sized group. Alldiff requires every value in its scope to differ from every other value.
- 7ExampleWhy keep Alldiff?
Three report variables each allow reviewers 1 and 2. Every pair can be assigned different reviewers, but three reports cannot use three distinct reviewers from a set of two.
Alldiff exposes this shortage at the group level. Its pairwise inequality form has the same solutions, yet separate pair checks can miss the contradiction. Representation affects the inference a solver can perform.
- 8ChallengeRequirement or preference?
A room plan must keep meetings within capacity. One organizer prefers a room near the entrance, but an eligible room farther away is available. Should choosing the farther room make the plan infeasible?
---reveal---
No. Capacity is a hard requirement, while location is a soft preference. The farther room can carry a preference cost without invalidating the plan. Feasibility still requires every hard rule to hold.
- 9ExampleModel the workshop day
Use variables A–E for Python Basics, Python Advanced, Statistics, Databases, and Ethics. Each takes slot 1, 2, or 3.
Shared participants give . Basics precedes Advanced, so . Ethics cannot be in slot 1, so . Each rule connects exactly the decisions it governs.
- 10ExampleVerify the complete schedule
Try . The six shared-participant pairs differ. Basics is before Advanced, and Ethics is not in the morning. Every workshop has a permitted slot, so this is a solution.
B and D share slot 3, which is allowed because no constraint connects them. Adding a rule that every workshop differs would reject this legitimate schedule.
- 11ExplanationWrite non-overlap correctly
If task X lasts 20 minutes and task Y lasts 35, their shared machine allows either order:
Each alternative compares one finish time with the other start time. Using “and” would require both positive-duration tasks to precede each other. Use a single precedence rule only when the task order is actually fixed.
- 12ChallengeBuild an assignment model
Three reports need three different reviewers. Reviewer 2 has a conflict of interest with report A. What variables, domains, and constraints express the task?
---reveal---
Use one variable per report with reviewer values 1–3. Remove 2 from A’s domain and apply Alldiff to all three reports. These are a unary eligibility restriction and a global distinctness rule; the model gives each report exactly one reviewer.
- 13RecapCheck the model before searching
Identify the decisions, list their allowed values, and write the actual requirements over them. Check a valid and an invalid case. Hard rules determine feasibility; preference costs guide optimization. The variable choice should keep these rules easy to express.
2Trace and improve backtracking
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionBuild a solution one choice at a time
- 2Key InsightOne next variable is enough
- 3ExampleStart the fixed-order search
- 4ExampleRecognize the dead end
- 5ChallengeWhich call tries another value?
- 6ExplanationChoose the variable likely to fail
- 7ExampleLet domains drive the workshop order
- 8Key InsightKeep options open for the value
- 9ChallengeChoose a value after selecting the variable
- 10ExampleSkip an unrelated decision
- 11ExplanationCarry causes back through search
- 12ExampleLearn a failed combination
- 13ChallengeReconcile ordering and learning
- 14RecapSeparate the search improvements
3Trace pruning from one decision to a group conflict
17 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFollow what a domain change implies
- 2ExplanationPrune immediate neighbors
- 3ExampleWatch the missed interaction
- 4ChallengeRestore just the right values
- 5ExplanationSupport is checked from tail to head
- 6ExampleStart a chain of consequences
- 7ExampleFinish the arc-consistent closure
- 8TipQueue the arcs that may lose support
- 9ChallengeWhat does nonempty closure mean?
- 10ConnectionMaintain consistency during search
- 11ExplanationCheck a pair against a third variable
- 12Key InsightWhy strong consistency matters
- 13ExampleReserve a pair of values
- 14ExamplePush numeric bounds in both directions
- 15ChallengeDetect a group shortage
- 16ChallengeChoose the inference that explains the failure
- 17RecapRead each guarantee precisely
4Repair a board and escape a plateau
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionRepair a complete candidate
- 2ExplanationChoose a conflicted variable
- 3ExampleLocate attacks on the board
- 4ExampleScore one queen’s candidate rows
- 5ChallengeIgnore the constant background
- 6ExampleReach a state with no improving move
- 7ExampleUse a sideways move to open a repair
- 8TipMatch the escape method to the obstacle
- 9ChallengeChoose a solver for an infeasibility decision
- 10ConnectionRepair while controlling disruption
- 11RecapJudge the outcome of repair
5Solve trees and control the remaining cycles
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionUse the graph to reduce the work
- 2ExplanationSolve independent components separately
- 3ExplanationSet up the tree order
- 4ExamplePrune the workshop tree backward
- 5ExampleAssign the surviving values forward
- 6ChallengeCatch a reversed arc
- 7ExplanationBreak every cycle with a cutset
- 8ExampleTry the workshop cutset
- 9Key InsightSmall cutsets control the exponent
- 10ExplanationReplace cycles with overlapping bags
- 11ChallengeCheck the bag path
- 12ConnectionUse bag size to read the cost
- 13ConnectionRemove interchangeable color names
- 14ChallengeCombine a cutset with the tree guarantee
- 15RecapCheck the structural condition
Constraint Satisfaction Problems practice questions
Set 1: Model choices and follow the basic algorithms10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Trace propagation and diagnose failed search10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Combine decisions, inference, and repair10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Transfer the methods to new constraint patterns10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
AC-3
Alldiff
Arc consistency
Arc revision
Assignment problem
B
Backjumping
Backtracking search
Backward tree pass
Binary constraint
Bounds consistency
Bounds propagation
C
Chronological backtracking
Commutativity
Complete search
Complete-state formulation
Conflict set
Conflict-directed backjumping
Conflicted variable
Consistent assignment
Constraint graph
Constraint learning
Constraint optimization problem
Constraint relation
Constraint satisfaction problem
Constraint scope
Constraint weighting
Critical constraint ratio
Cutset conditioning
Cycle cutset
D
Degree heuristic
Directed arc consistency
Disjunctive constraint
Domain
Domain wipeout
F
Factored model
Fail-first principle
Forward checking
Forward tree pass
G
Global constraint
H
Hard constraint
Higher-order constraint
I
Independent component
J
Job-shop scheduling
K
k-consistency
L
Least constraining value
Local minimum
M
Maintaining arc consistency
Min-conflicts
Minimum remaining values
N
Naked pair
Node consistency
Nogood
O
Online repair
P
Path consistency
Plateau
Precedence constraint
R
Random restart
Running-intersection property
S
Sideways move
Simulated annealing
Soft constraint
Solution
Strong k-consistency
Support
Symmetry-breaking constraint
T
Tabu search
Tree decomposition
Tree width
Tree-structured CSP
U
Unary constraint
Undo trail
V
Value symmetry
Variable
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.