Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1: Jugs Problem You have three jugs capable of holding exactly 3 litres

ID: 3880887 • Letter: Q

Question

Question 1: Jugs Problem You have three jugs capable of holding exactly 3 litres, 8 litres and 12 litres, respectively, and a tap. You can fill the jugs from the tap, or empty them from one to another or onto the ground. You need to measure exactly 1 litre of water; that is, at the end of your sequence of actions, one of the jugs must contain exactly one litre of water. a) Find a solution using all 3 jugs b) Now find a solution using only 2 of the jugs. c) Now formulate the problem as a search problem by specifying the initial state, a general state, the operators (describe how they change the state), the goal test and the path cost. d) What search strategy would you use to solve the problem in general (i.e. if the jug sizes were changed)?

Explanation / Answer

Here is the solution, do comment if you have any doubt. I have answered with respect to the Chegg Policy and guidelines, do ask the remanining of your questions again, in case you need help.

a) For using all 3 jugs, we basically need to have 1 litre left. We can see that 12-(3+8)=1. Thus, we can fill the 12 litre jug from the tap and empty it into the 3 and 8 litre jugs. This way, there's only 1 litre left in the 12 litre jug.

b) Using the 3 litre and 8 litre jugs, we know that 3+3+3-8=1. Thus, we fill the 3 litre jug from the tap, empty it into the 8 litre jug and repeat this. Now, we have 6 litre in the 8 litre jug. Fill the 3 litre jug again from the tap and empty it into the 8 litre jug, we have 1 litre remaining in the 3 litre jug.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote