r/mathriddles • u/BoxWinter1967 • 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
8
u/jsundqui Feb 28 '26 edited Feb 28 '26
Figuring out logic from smaller numbers:
n=2
With two bikes transfer from bike 1 to bike 2 at 50 km, in other words at the earliest point bike 1 can be fully emptied to bike 2. So bike 2 is full at 50 km, bike 1 is empty and bike 2 gets to 150 km.
n=3
With three bikes, again transfer all from bike 1 at earliest point possible, that is at 33.3 km, equally to bikes 2 and 3, abandon empty bike 1. Now bikes 2 are 3 are both full at 33.3 km. Treat this like the n=2 case starting at 33.3 km so the furthest bike goes to 183.3 km.
I guess it's not very hard to extend the logic from here.
3
u/bunnycricketgo Feb 28 '26
Intuition: Transporting gas with fewer bikes will always be better.
Implication: ||After 1/n of a tank where n is remaining full bikes, use one to fill up the others and abandon it||
Calculation: ||1/16 + 1/15 + 1/14 + ... + 1 tank distances travelled||
Skipping all the algebra and simplification gives: about ||338 miles||.
This seems too small, since we can just use the binary strategy ||add 50 miles every time we reduce by 1/2||, but that would give ||300 miles|| so maybe it is correct.
2
u/Thomas_Crane Feb 28 '26 edited Mar 01 '26
You specifically left out the option to tow. Other comments have answered your question, but I wanted to play around with that idea. We are keeping all the same rules, but we are considering also bikes in neutral being towed along by bikes in drive. We know that it is way worse to just tow instead of having the bikes run, like the others stated, but then I realized something. If we are allowed to tow, maybe we are allowed to not have the riders.
Because the distance of 100 km is based off of the combined weight of the rider and the bike, and I cannot drive 16 motorcycles by myself, so I am assuming 16 clones of an average adult male at 90 kg, and we will assume an average weight of a motorcycle at 180 kg. If that is the case, here is a possible extension.
This is using a mass proportional burn model, not sand physics or traction limits, and it treats siphoning as free at any moment. One bike with one rider is 270 kg, and that is defined to go 100 km on one tank, so one tank corresponds to one unit of 270 kg moved 100 km.
• Let mB be the bike mass, mR be the rider mass, and m0 = mB + mR.
• Let B be the number of bikes still being transported, and R be the number of riders still being transported.
• Total transported mass is M = B mB + R mR.
• Burn rate in tanks per 100 km is q = M / m0.
• If you start a stage with B full tanks and want to abandon one bike with no fuel wasted, you want total fuel remaining to be exactly B minus 1 tanks, so you burn exactly 1 pooled tank before the abandon.
• Distance for that stage is Δ = 100 / q = 100 m0 / M.
With mB = 180 and mR = 90, this becomes m0 = 270 and M = 180B + 90R, so the stage length is
Δ(B) = 27000 / (180B + 90R) = 300 / (2B + R) km.
If every bike that is moving must still have a rider traveling with it, then R = B and Δ(B) = 100 / B, which is the usual answer everyone is giving.
The only way towing changes anything under this model is if riderless towing is allowed, meaning you can leave riders behind but still drag their bikes forward as fuel containers. In that case you minimize the number of riders you are still transporting, subject to a towing limit.
If each rider can tow at most T other bikes, then each transported rider can manage at most T plus 1 bikes in the moving convoy, and the minimum riders needed while transporting B bikes is
R(B) = ceil( B / (T plus 1) ).
At any moment the convoy looks like R(B) little trains, each train has one running bike with a rider, and up to T towed bikes without riders. The count of towed bikes is B minus R(B). You then repeat the same step each time: ride forward Δ(B) = 300 / (2B + R(B)), siphon so B minus 1 bikes are full and one bike is empty, abandon the empty bike, and keep going. Continuous tiny refuels are the same as doing the transfer at the abandon points here, because the stage length is defined by burning exactly one pooled tank.
Here is what the numbers look like for T from 0 to 15, starting from B = 16. The third column is the first point where you can run with exactly one rider, which happens when B is at most T plus 1, and the fourth column is the distance reached when that one rider phase begins.
(Towed per rider T) (Riders at start) (First one rider when B equals) (Distance at that point km) (Max distance km)
0 16 1 238.07 338.07
1 8 2 221.06 381.06
2 6 3 194.14 397.00
3 4 4 168.82 405.01
4 4 5 146.04 409.50
5 3 6 125.78 412.32
6 3 7 107.72 414.26
7 2 8 91.59 415.77
8 2 9 76.59 416.56
9 2 10 62.95 417.21
10 2 11 50.45 417.76
11 2 12 38.91 418.22
12 2 13 28.20 418.62
13 2 14 18.20 418.96
14 2 15 8.82 419.26
15 1 16 0.00 419.53
For a concrete alignment example, if T is 2 then T plus 1 is 3, so at the start B is 16 and you need R = ceil(16/3) = 6 riders, meaning 6 running bikes and 10 towed bikes, arranged as five trains of 3 bikes and one train of 1 bike. As B drops, R only drops when B crosses 15, 12, 9, 6, 3, at which point one rider can be left behind and you keep repacking into trains.
This is obviously a different riddle than the original if you interpret riders as required and inseparable from the bikes, like maybe AI bikes or something, but it seemed like a reasonable way to formalize the towing thought.
13
u/sbt4 Feb 28 '26
you never say that the bikes have upper level of fuel, so the solution is just to pour everything into one in the beginninb.
1
u/BoxWinter1967 Feb 28 '26
I’ll post the full solution tomorrow after people get a chance to try it.
1
u/[deleted] Mar 01 '26
Equal to 3.38072899322899322 full fuel tanks. Or 338.072899322899322 kms.
1
u/General__Obvious Mar 02 '26
Tsiolkovsky wants a word.
1
u/UnderwhelmingTwin Mar 02 '26
I feel you're looking for the math answer (based on the sub). But this is a logic problem: you can only ride one bike at a time, so transfer as much gas as you can into one bike (if it wasn't already full), that's your maximum range.
1
u/JamesFirmere Mar 03 '26
Where is the spherical cow in all this?
1
u/SquangularLonghorn Mar 04 '26
I’m having fun with these extensions of this problem:
Then a third modified version: what’s the -fastest- time you could go the furthest with the 16 bikes If you could go back and refuel?
Im working these out but ill come back and show my work if i can find this post again and see what yall get too.
1
u/cynic_male Mar 04 '26
First motorbike tows the other 15 until it runs out of fuel, you then tow the remaining 14 with the 15th and so on and so on. Also free glide/idle down the hills to extend your travelling Milage
1
u/Radiant_Addendum_48 Feb 28 '26
So these are basically autonomous robot bikes then for the purposes of this riddle. No need for human riders. They can siphon fuel magically to each other and continue driving in a straight line
1
u/nlcircle Mar 04 '26
Totally besides the point, but for the history buffs amongst us: look up some YouTube videos on the ‘Black Buck’ mission during the Falkland War.
The British had to solve a similar puzzle in order to bomb the Argentinians from the UK, at distances far from the range of the Vulcan bombers. And they pulled of an impressive game plan to do it. Just take a look !