Home »

Computer Science: Search Formulation

Paper , Order, or Assignment Requirements

Situation: You are in charge of delivering water to families who are currently being affected by a drought. Unfortunately, on your way to the first family, the truck’s water meter breaks, so you cannot easily measure out specific amounts of water. After some searching, you manage to find three different sized containers that hold 7, 11, and 20 gallons.
Problem: A family is entitled to x gallons of water, where 0 < x < 20. Your job is to provide each family with water by filling one of the containers with exactly x gallons of water and then transferring the water to the family’s storage tank. When transferring water, the following restrictions must be obeyed:
• When pouring from one container into another, you can only stop when the source container is empty, or when the destination container is full.
• When pouring from the truck into a container, you can only stop when the container you’re pouring into is full.
Since the families are currently experiencing a drought, wasting water is frowned upon (not allowed). Also adding water to the truck takes a great deal of time and effort, so once water is removed from the truck, it cannot be put back until the current family has been given their water (having extra water in the containers when you’ve finished measuring is acceptable, but you cannot pour water back into the truck, or worse yet dump it on the ground, during the measuring process). Formulate the problem as a well-defined search problem, providing a detailed description of the following:
1. A specific state representation.
2. The total number of possible states in the state space.
3. A list of possible actions. Explicitly say, for each action, what state(s) (in your representation) the action can be taken in, and give a specification of the state (in your representation) before the action, and the specification of the state (in your representation) after the action.
4. The initial state expressed in your state representation.
5. The goal test (you can assume x is known) expressed in your state representation (you may represent this algebraically if it’s more convenient for you).
6. A reasonable path cost function. Be sure to justify your choice, specify your inputs and outputs, and make sure that your function is actually a function.



Select currency

Type of Service
Type of Paper
Academic Level
Select Urgency
Price per page: USD 10.99

Total Price: USD 10.99