Computer Science, asked by Anonymous, 10 months ago

50 points

Explain 3-4 gallon jug problem by Elaeine rich ​

Answers

Answered by Anonymous
1

Answer:

\huge{\fbox{\fbox{\bigstar{\mathfrak{\red{Answer}}}}}}

The water jug problem is defined as follows: The water jug problem is defined as follows: Assume that you have two jugs, Jug-A and Jug-B each of which holds a certain number of gallons. Initially, both gallons are full, but we have an infinite supply of water.

A Water Jug Problem: You are given two jugs, a 4-gallon one and a 3-gallon one, a pump which has unlimited water which you can use to fill the jug, and the ground on which water may be poured. Neither jug has any measuring markings on it.

Solution:-

  1. Fill the 3-jug completely with water. ...
  2. Transfer this water into the 5-jug. ...
  3. Re-fill the 3-jug with water. ...
  4. Fill the 5-jug with water from your 3-jug. ...
  5. Pour out the 5-jug and refill it with your 1 gallon. ...
  6. Fill up the 3-jug. ...
  7. Transfer the 3 gallons (11.4 L) of water into the 5-jug to end up with 4 gallons (15.1 L).

Answered by Anonymous
2

Answer:

The water jug problem is defined as follows: The water jug problem is defined as follows: Assume that you have two jugs, Jug-A and Jug-B each of which holds a certain number of gallons. Initially, both gallons are full, but we have an infinite supply of water.

Hope it will be helpful :)

Similar questions