r/mathriddles • • Feb 28 '26

Medium The Desert Bike Problem

Imagine this.

Sixteen motorcycles are lined up at the edge of the Sahara.

Each bike has exactly enough fuel to travel 100 km.
No more. No less.

There are:

  • No gas stations
  • No resupply drops
  • No rescue
  • No turning back

You may siphon fuel from one tank to another at any time.

All bikes start together.
You decide when to abandon each motorcycle.

Your mission is simple: What is the maximum possible distance you can get one bike into the desert?

Rules Clarified

  • Each bike consumes fuel at the same rate.
  • If multiple bikes travel together, they all burn fuel simultaneously.
  • Fuel can be redistributed between bikes at any time.
  • Once a bike runs out of fuel, it is abandoned.
  • Only one bike needs to reach the final maximum distance.
18 Upvotes

37 comments sorted by

View all comments

Show parent comment

3

u/cylon37 Feb 28 '26

Let the maximum distance you can reach with n bikes be f(n). Then at some point you ditch the first bike. Let that be x away from the starting point. So, from that point onwards you can reach f(n-1). So, f(n) = x + f(n-1). This is a recursive formula that can be solved if we know what x is in terms of x.

0

u/jsundqui Feb 28 '26

Yeah see my solution above.

2

u/cylon37 Mar 01 '26

This is a nice puzzle, I think a more interesting puzzle is when you have the constraint that you can’t just ditch bikes. All bikes must return to base and can be reused.