Measuring two pints

You have a 77-pint and an 1111-pint vessel and an unlimited water source. You must end with exactly 22 pints in a vessel. A single "transaction" is filling a vessel to the top, emptying a vessel completely, or pouring one vessel into the other until the source is empty or the destination is full. What is the minimum number of transactions needed?

Show hints (2)+
  1. Model states (a,b)(a,b) and do a breadth-first search; each fill/empty/pour is one transaction.
  2. The shortest path to a vessel holding 22 takes 1414 moves.

Answer

Reveal answer →

14

Create a free account to see the full worked solution and track your progress.

Interview format: Market Maker, Numerical Reasoning Tests

Related questions