#ThisWeeksFiddler, 20240329

This week the question is: Can You Pour the Water?

I have two large pitchers with known volumes: 10 liters (“pitcher A”) and 3 liters (“pitcher B”). They are both initially empty. I can do one of six things with the pitchers:

  1. I can fill pitcher A to the top with water from the sink.
  2. I can fill pitcher B to the top with water from the sink.
  3. I can empty the contents of pitcher A into the sink.
  4. I can empty the contents of pitcher B into the sink.
  5. I can transfer the contents of pitcher A to pitcher B, until pitcher A is empty or pitcher B is filled to the top—whichever comes first.
  6. I can transfer the contents of pitcher B to pitcher A, until pitcher B is empty or pitcher A is filled to the top—whichever comes first.

Every time I do any one of the above six, it counts as a step.

What is the fewest number of steps required until one of the pitchers (either A or B) contains precisely 5 liters of water?

And for extra credit:

Instead of 10 liters and 3 liters, suppose the volumes of the pitchers A and B are now 100 liters and 93 liters, respectively.

Further suppose that the fewest number of steps needed until one of the pitchers (either A or B) contains precisely N liters of water is f(N), where N is a whole number between 1 and 100, inclusive.

What is the maximum value of f(N), and for which value of N does this occur?

Læs mere: #ThisWeeksFiddler, 20240329

Highlight to reveal solution:

And for extra credit:

Skriv en kommentar