sample midterm 2 - key

sample midterm 2 - key - Sample Midterm 2 100 points Closed...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sample Midterm 2 100 points Closed book, notes, laptop, cell phone, calculator. 1 page of notes Use SHORT answers unless told to do otherwise. G A C B F D E 1. Conflict Sets a. What is the conflict set for G? {F=G, B=R, E=B} The conflict set is every variable involved in a constraint with G and has a value assigned to it. In our example, the constraint graph shows that G has constraints on F, D, B and E and that F, B and E have been assigned values at this point in the search so the variables in the conflict set are{F, B and E}. By themselves, they aren’t causing problems for G, it’s the values they have, as a group, that are causing G problems, so the conflict set needs to include those. The conflict set is therefore {F=G, B=R, E=B}. b. Suppose we have made the following assignments in the following order: B=R Æ E=B Æ F=G Æ A=B Æ C=R Æ G=R We have already tried G=B and G=G and rejected them. If we are using conflict-directed back jumping, what is the next node depth-first search will evaluate? F It won’t be G because it has no legal assignments left (we already tried B and G). Backtracking takes us to C but that’s not in the conflict set we found above. Going back from there is A, also not in the conflict set. Next up is F, which is in the conflict set, so the node we’ll re-evaluate is F. 2. CSP Heuristics a. When choosing which variable to assign, what heuristics are available? How do they work? MRV – choose the variable that has the smallest domain / fewest remaining values Degree – choose the variable that is involved the most constraints
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
b. When choosing which value to assign, what heuristics are available? How do they work? LCV – choose the value that leaves the largest domain / most options for variables MinConflicts – choose the value that results in the fewest broken constraints. Only makes sense when there are broken constraints which only happens when using a complete state formulation 3. Bounds Checking We have decided to invade a country that looked at us funny. We wish to crush them with our full might but do not wish to spend more than 100 billion dollars. We have the following troops available: Unit Power Cost Soldier 1 1,000 per billion Tank 50 20 per billion Battleship 100 2 per billion Jet Fighter 100 1 per billion Units must be bought in bundles (e.g., you cannot buy 15 tanks). We need to use at least one of each unit or else the army, navy or air force will be sad. For safety reasons, union rules require us to have at least one tank for every 1,000 soldiers (i.e., one set of tanks for every 20 sets of soldiers) and one fighter jet for every 60 tanks. Use bounds checking to reduce the domain of the following variables: Unit Available New Domain Soldier 6,000,000 [25,000-96,000] Tank 400 [40-400] Battleship 10 [2-10] Jet Fighter 50 [1-50] For domains where variables can take on a whole bunch of values and where those values fall in a range, bounds checking is used to decide the upper and lower boundaries of the ranges. For example, in the above example, we have six million
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 13

sample midterm 2 - key - Sample Midterm 2 100 points Closed...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online