A detachment of 25 soldiers must cross a wide and deep river with no bridge in sight. They notice two 12-year-old boys playing in a rowboat by the shore. However, the boat is so tiny that it can only hold two boys or one soldier.
How can the soldiers get across the river and leave the boys in joint possession of the boat?
Yes, all 25 soldiers can cross the river using the two boys and the small boat, and the boys are left with the boat at the end.
We use the two boys to ferry the boat back and forth so the soldiers can cross one at a time:
Repeat steps 1–4 for each soldier. Each soldier requires 4 trips (two by boys together, two solo returns).
BUT we can optimize.
Let’s define it with fewer total trips by looping cleverly:
So each soldier crossing uses 4 trips, and after 25 soldiers, we have:
But after the last soldier, we don't need to return the boy—both boys can stay.
So we remove the last unnecessary return:
Ask about our courses and offerings, and we will help you choose what works best for you.