Question

In: Computer Science

If you have 4-liter bottle beer A, and 6 another liter of bottle beer B, and...

If you have 4-liter bottle beer A, and 6 another liter of bottle beer B, and you need to measure exactly 2 liters of beer. The only actions you can do is to empty the bottle on the floor and to empty one bottle into the other.

What are the initial state, state space, actions, goal test, path cost and the transition model (not to draw!!!)? The answer should be explained as a text only, without any drawing.

Solutions

Expert Solution

You have 4-liter bottle beer A, and 6 another liter of bottle beer B, and you need to measure exactly 2 liters of beer.

Then what we can do is just through the 4 liter beer from bottle A on the floor and then from bottle B tansfer the beer into bottle A uptill it is filled, the remaining beer left in bottle B is exactly 2 litres of beer.

State Representation and Initial State –
we will represent a state of the problem as a tuple (x, y) where x represents the 4 litre of beer in bottle A and y represents the 6 litre of beer in bottle B.
Note 0 ≤ x ≤ 4, and 0 ≤ y ≤ 6.

Our initial state: (0,0)

Goal Predicate – state = (x,2) where 0 ≤ x ≤ 4.

Operators – we must define a set of operators that will take us from one state to another:
1. Empty both the bottles (x,y) -> (0,0)
2. Fill bottle B with 6 litres of beer (x,y) -> (x,6)
3. Fill bottle A with 4 litres of beer from bottle B (x,y) -> (4,2)
4. New state is (x,y) -> (4,2)
5. Empty 4 litre of beer on ground (x,y) -> (0,2)
6. beer left in bottle B is 2 litres ->ans


Gals in 4-gal jug Gals in 6-gal jug Rule Applied
0 0
                       1. Fill 6
0            6
                       2. Pour 6 into 4 to fill
4           2
                       3. Remaining amount left in bottle A is 4 litre


Related Solutions

Cola. You can get a quart bottle of cola for $1.50 or a liter bottle for...
Cola. You can get a quart bottle of cola for $1.50 or a liter bottle for $1.55. A. What is the price per volume of each? B. Which is the better buy in terms of price per volume? Round answers to 3 decimal places. ( Use a conversion factor to change liters to quarts, then quarts to ounces). List your work here.
Australian bottle shops often sell beer in a pack of 6 or individually. Suppose an individual...
Australian bottle shops often sell beer in a pack of 6 or individually. Suppose an individual beer costs $6, but a six pack costs $30. Your friend has $210. a) Graphically illustrate how this pricing affects the your friend's budget set if the other good is $1. b) Assuming your friend has standard indifference curves, how many beers would you expect them to purchase?
The price of a bottle of beer is $1 and the price of a pizza is...
The price of a bottle of beer is $1 and the price of a pizza is $10. The MRS of bottles of beer for pizza expressed by Karl is 5. Has Karl chosen the optimal amount of beer? How do you know? If Karl is not maximizing, what should he do to improve his situation? (Hint: what is the MRS at the consumer optimum point?)
Sudz Beer buys the necessary ingredients to brew and bottle one batch of beer for a...
Sudz Beer buys the necessary ingredients to brew and bottle one batch of beer for a total of $24,300. Each batch yields 75,960 bottles of beer. The cost per bottle is $0.32. They sell their beer to a distributor with a 35% markup, and then the distributor sells it to the retailer for a 41% markup. Because the retailer has a virtual monopoly on consumer sales, they get away with selling the beer at a 62% margin. What is the...
The label on a “two liter” bottle of soft drink indicates that it is supposed to...
The label on a “two liter” bottle of soft drink indicates that it is supposed to contain 2000 milliliters (ml). However, there is some variation due to the production process; this process is known to be normally distributed with a standard deviation of 20 ml. A government inspector wants to ensure that the public is not cheated by purchasing underfilled containers. A random sample of nine containers was selected; the measurement results were: 1995, 1960, 2005, 2008, 1997, 1992, 1986,...
Currency appreciation: Consider price of beer. Let's pretend that last year a bottle of beer used to cost one dollar, but this year it costs two dollars per bottle.
1)         Currency appreciation: Consider price of beer. Let's pretend that last year a bottle of beer used to cost one dollar, but this year it costs two dollars per bottle.                        a)         This means beer costs twice as much as last year; or beer price has gone up by ___________%                        b)         One dollar buys half as much beer as last year; or dollar has fallen in value by ___________%            Note: The same idea works for relative values of currencies, i.e. appreciation...
The world produces two goods: pizza & beer. In Brazil the price of a bottle of...
The world produces two goods: pizza & beer. In Brazil the price of a bottle of beer is $4 and the price of pizza is $15. In the rest of the world, a bottle of beer is $3.25 and a pizza is $12. What is one conclusion we can make? a.) The rest of the world has a comparative advantage in the in the production of pizza and beer b.) Brazil has an absolute advantage in the production of pizza...
The amount of beer in a bottle from the Dominion filling plant is normally distributed with...
The amount of beer in a bottle from the Dominion filling plant is normally distributed with at mean od 330 ml and a standard deviation of 4 ml. a. What is the probability that a single randomly selected bottle will have less than 325 ml? If the Quality Control manager at Dominion took many 12-packs of the beer (ie samples of 12): b. What would be the approximate shape of the distribution of the sample means? c. What would be...
An average of 12 ounces of beer is used to fill each bottle in a local...
An average of 12 ounces of beer is used to fill each bottle in a local brewery as recorded. The manager now believes that, in general, beer bottles are overfilled. He takes a random sample of 30 bottles to test. The sample mean weight of the bottles is 12.8 ounces with a standard deviation of 1.5 ounces. Conduct a one-sample t-test to test whether the beer bottles are overfilled. Use 5% level of significance. (Round your steps to 4 decimal...
The normal variance for filling a liter Coke bottle is 0.5 ounces. In a recent measurement,...
The normal variance for filling a liter Coke bottle is 0.5 ounces. In a recent measurement, variance was found to be 0.8 ounces. Should Coca-Cola's management be concerned? Discuss why or why not. In replies to peers, provide an example to support your position.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT