foundations of computational agents
A finite CSP could be solved by an exhaustive generate-and-test algorithm. The assignment space, , is the set of total assignments. The algorithm returns one model or all models.
The generate-and-test algorithm to find one model is as follows: check each total assignment in turn; if an assignment is found that satisfies all of the constraints, return that assignment. A generate-and-test algorithm to find all models is the same except, instead of returning the first model found, it saves all of the models found.
In Example 4.9 the assignment space is
In this case there are different assignments to be tested. If there were 15 variables instead of 5, there would be , which is about a billion, assignments to test. This method could not work for 30 variables.
If each of the variable domains has size , then has elements. If there are constraints, the total number of constraints tested is . As becomes large, this very quickly becomes intractable, and so we must find alternative solution methods.