# 6 Pints from 7 Pints and 5 Pints

## Classic Problem

You have $12$ pints of wine in a barrel and you wish to divide it into $6$ pints for a friend and $6$ pints for yourself,
but you only have containers holding $7$ pints and $5$ pints.
How can you succeed?

## Solution

Fill the $5$ pint jug from the barrel, and empty its contents into the $7$ pint jug.

Fill the $5$ pint jug from the barrel again, and fill the $7$ pint jug from it.

There will then be $3$ pints in the $5$ pint jug.

Empty the $7$ pint jug into the barrel.

Pour the $3$ pints from the $5$ pint jug into the $7$ pint jug, which now contains just those $3$ pints.

Fill the $5$ pint jug from the barrel, and fill the $7$ pint jug from it.

This takes $4$ pints, so the $5$ pint jug now contains $1$ pint.

Empty the $7$ pint jug into the barrel, and pour the $1$ pint from the $5$ pint jug into the $7$ pint jug.

Fill the $5$ pint jug from the barrel, and pour the contents into the $7$ pint jug.

The $7$ pint jug now contains $6$ pints, and there are $6$ pints remaining in the barrel.

$\blacksquare$