How do you solve a water jug problem?

Use it to fill the 3-gallon jug, leaving 2 gallons in the 5-gallon jug. Empty the 3-gallon jug, and then pour in the 2 remaining gallons from the other jug. Fill the now empty 5-gallon jug and pour 1 gallon into the 3-gallon jug.

What is the statement of water jug problem?

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.

How do you get 5 gallons from a 6 and 4 gallon jug?

Empty the three gallon jug. (4) Pour the two gallons into the three gallon jug. (5) Fill the five gallon jug and pour one gallon from it into the three gallon jug – filling the three gallon jug. (6) Four gallons remain in the five gallon jug.

What are good control strategies?

Widely used Control Strategies are Breadth-First Search, Depth-First Search, Generate and Test, Hill-Climbing, Best-first search, Problem Reduction and many more.

How do you get 4 gallons from a 3 gallon and a 5 gallon jug?

The mathematical solution. Empty the three gallon jug. Now empty the remaining two gallons from the five gallon jug. Next refill the five gallon jug and empty one gallon from it into the three gallon jug. This gives four gallons.

What are the basic requirements for a control strategy to succeed?

A control strategy must be part of process development….Typical elements (as specified in Q11 but not inclusive) of a control strategy are:

  • controls on material attributes.
  • controls implicit in the design of the manufacturing process.
  • in-process controls.
  • controls on the drug substance.

    Is there a solution to the decanting problem?

    NB: Searching the entire possible space of jug-pouring actions is clearly a solution. But it isn’t a very interesting or elegant one. Die Hard With A Vengeance: the ‘decanting problem’ scene.

    When does the water pour problem have no solution?

    Die Hard With A Vengeance: the ‘decanting problem’ scene. Udacity: When does the water pour problem have no solution? (which seems to show a necessary but IMO not sufficient condition for there to be a solution). Weisstein, Eric W. “Three Jug Problem.”

    What is the solution to the water jug problem?

    Google didn’t throw up much. Q = Gallons you need. Note: The Q must be a multiple of Gcd (A,B) else there is no solution. If Gcd (A,B) == 1, There is a solution for Any Q. 1) Method 1 : Extended Euclid’s Algorithm will solve it faster than any Graph Algorithm.

    How to fill a 3 gallon water jug?

    Refill the 3 gallon and use it to top the 4 gallon jug. You’ll have 2 gallons on the 3 gallon jug. Empty the 4 gallon and move the water in the 3 gallon to the 4 gallon. Fill J4 J4=4 J3=0 Fill J3 using J4 J4=1 J3=3 empty J3 J4=1 J3=0 pour J4 in J3 J4=0 J3=1 Fill J4 J4=4 J3=1 Fill J3 using J4 J4=2 J3=3

You Might Also Like