Problem 29.5 Easy Free

Fox, Chicken and Grain

A farmer must ferry a fox, a chicken, and a sack of grain across a river using a boat that holds the farmer plus only one of the three items at a time. If left together without the farmer present, the fox will eat the chicken, and the chicken will eat the grain (the fox will not eat the grain). Describe a sequence of crossings that gets all three safely to the other side.

Work it out, then compare with the answer.

SolutionShow the worked solution

Key idea. The chicken is the only item that conflicts with both of the others. It must therefore never be left on either bank with the fox or with the grain. The fox and the grain, however, may safely be left together.

Write F, C, G for the fox, chicken and grain. The farmer always rows.

  1. Take C across. The fox and the grain stay behind together, which is safe.
  2. Return alone.
  3. Take F across. Now F and C are together on the far bank.
  4. Bring C back. The fox is left alone on the far bank.
  5. Leave C on the near bank and take G across. The fox and the grain are now together on the far bank, which is safe.
  6. Return alone.
  7. Take C across.

Check each stage. After every crossing, the farmer’s absent bank holds only one of the following:

  • nothing,
  • a single item,
  • the pair {F,G}\{F,G\}.

Hence nothing is eaten, and all three items end on the far bank.

Minimality. Seven crossings are needed.

  • The first trip must carry C. Taking F would leave C with G. Taking G or going alone would leave C with F.
  • The second item taken over, F or G, then sits with C on the far bank.
  • So the farmer cannot simply return alone. He must carry C back.
  • This forces one extra round trip beyond the naive five crossings.
C over; return; F over; C back; G over; return; C over (7 crossings)\boxed{\text{C over; return; F over; C back; G over; return; C over (7 crossings)}}

Alternative. The roles of the fox and the grain may be swapped: take G over third and F over fifth. Both solutions use seven crossings.