Advertisement
asif2k13

Untitled

Jul 22nd, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 2.28 KB | None | 0 0
  1.  Give the initial state, goal test, successor function, and cost function for each of the following. Choose a
  2. formulation that is precise enough to be implemented.
  3. ƒ You have to color a planar map using only 4 colors, in such a way that no two adjacent regions have
  4. the same color.
  5. Initial state: No regions colored.
  6. Goal test: All regions colored, and no two adjacent regions have the same color.
  7. Successor function: Assign a color to a region.
  8. Cost function: Number of assignments.
  9. ƒ A 3-foot-tall monkey is in a room where some bananas are suspended from the 8-foot ceiling. He
  10. would like to get the bananas. The room contains 2 stackable, movable, climbable 3-foot-high crates.
  11. Initial state: Same as problem definition.
  12. Goal test: Monkey has bananas.
  13. Successor function: Hop on crate; Hop off crate; Push crate from one spot to another; Walk from one spot
  14. to another; Grab bananas (if standing on crate).
  15. Cost function: Number of actions.
  16. ƒ You have a program that outputs the message “illegal input record” when fed a certain file of input
  17. records. You know that processing of each record is independent of the other records. You want to
  18. discover what record is illegal.
  19. Initial state: Considering all input records.
  20. Page 3 of 5
  21. Goal test: Considering a single record, and it gives “illegal input” message.
  22. Successor function: Run again on the first half of the records; run again on the second half of the records.
  23. Cost function: Number of runs.
  24. Note: This is a contingency problem; you need to see whether a run gives an error message or not to decide
  25. what to do next.
  26. ƒ You have 3 jugs, measuring 12 gallons, 8 gallons, and 3 gallons, and a water faucet. You can fill the
  27. jugs up or empty them out from one to another or onto the ground. You need to measure out exactly
  28. one gallon.
  29. Initial state: jugs have values [0, 0, 0]
  30. Goal test: jugs have values [i, j, k], where one of i, j, k is 1.
  31. Successor function: given values [x, y, z], generate [12, y, z], [x, 8, z], [x, y, 3] (by filling); [0, y, z], [x, 0, z],
  32. [x, y, 0] (by emptying); or for any two jugs with current values x and y, pour y into x; this changes the jug
  33. with x to the minimum of x+y and the capacity of the jug, and decrements the jug with y by the amount
  34. gained by the first jug.
  35. Cost function: Number of actions.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement