Formulate the following problem as a CSP using the AISpace CSP tool:
Virginia, West Virginia, North Carolina, and Maryland have seceded
from the Union to create a new country: Midadlantia. According to the new constitution all four states must have between 1 and 3
representatives. No two neighboring states may have the same number
of representatives. Both West Virginia and North Carolina must have more representatives than Virginia. (Here is a map of the United States if you need a geography refresher.)
Use the AISpace tool to run the arc-consistency algorithm on the
resulting graph, then run a depth-first search (by-hand) on the arc consistent version of the problem to find at least one satisfying assignment.
Going further: Create a CSP for
the 4x4
sudoku problem. This will involve 16 variables, and quite a
few constraints. I would recommend that you create a small part
of the CSP, save it as an XML file, then edit the XML file to
create the rest. You will want to create a custom constraint that
encodes the requirement that all of the variables in scope have
different values.