Interview Riddle - 16 Bikes || Logic and Optimization Puzzle
ฝัง
- เผยแพร่เมื่อ 7 ก.พ. 2025
- Interview puzzle :
There are 16 motorbikes with a tank that has the capacity to go 100 km (when the tank is full).
Using these 16 motorbikes, what is the maximum distance that you can go?
-All the motorbikes are initially fully fuelled.
-They all start from the same point.
-and Each bike has a rider on it.
Pls Note: We just have to find out the maximum distance that we can go, We don't want all the bikes to reach at that final point.
It's not a hard riddle, however, it requires a brain twisting trick to solve this problem correctly.
So, Pause the video and think logically.
It's an amazing Google interview riddle to challenge your intelligence.
So if you are looking for a job at Google, please study optimization based puzzles in detail.
You can share puzzles and riddles with me on these links:
Gmail : logicreloaded@gmail.com
Facebook(message) : / mohammmedammar
Also try these brilliant mind blowing puzzles:
5 Pirates PUZZLE (Version 2) | 100 Gold Coins 5 Pirates
• 5 Pirates PUZZLE (Vers...
Trains & Bird Puzzle || Challenge for Math and Aptitude lovers
• Trains & Bird Puzzle |...
Very Tricky Race Puzzle
• Very Tricky Race Puzzle
Is it only me who thought attaching bikes with the ropes, a perfect indian solution
There are no ropes in the problem.
@@literallylegendary 😂there are no pipes and funnels too in the problem to transfer fuel.
Exactly! And even assuming each bike can only tow one other, you still get 500km!
@@literallylegendary there may not have been rope, but each bike has it's own rider.. just make it their responsibility to hold on to the bike in front of them ;)
Me too
The maximum distance that can be covered is 1600 km. The riddle does not say 'what is the furthest you can get from the start'. It says 'what's the maximum distance? '
*alll bikes start from the same point, is part of the conditions
@@OscarLT321 on a 100km circular track a bike will run out of fuel back at the start, at which point I get off my empty bike and get on a full one and continue. After I've used all the bikes I have traveled 1600 km and not broken any of the conditions.
@@pintokitkat With that logic you could also say it's way beyond 1600 km if you can refuel after each lap. There are millions of loopholes to get out of solving an equation
@@OscarLT321 what he says is perfectly logical and you come around the corner and compare it to refueling? where does this come from xD
Yeah not displacement
Interesting problem, clever solution. I figured out the concept, but had Excel do the math. Unfortunately, you miscalculated one number - Milestone #9 is 12.5 km, and the correct answer is 338.07 km
@Ethan Goldberger just shows how many people lie about stupid shit like this
I was wondering why my phone calculator wasn't giving the same result, thanks a lot.
I used excel too. Arrived at the same answer as you - 338.0728993 kms
@@mrgyani LOL, it is only us excel users that caught this...
@@dividebyzero1000 Approach is obvious and so is the formula.
([1 to 16]∑ (1/n)) × 100
Wolfram Alpha user here, caught it immediately with less work than Excel.
PS - H[16]*100 if you can remember to use the function for that. I never do lol.
Mathematically optimal, but possibly not practically so:
You gain just over 12% distance over the unoptimised solution, but have to stop 4× as many times, and the siphoning operation at each stop is much more complex because instead of each donor bike donating to one other bike it's donating to x other bikes.
You'll gain a little ground, but at a considerable cost in time.
Now, I realise the bike scenario is an abstract & that you are demonstrating a mathematical concept.
But this does also demonstrate that the best solution is sometimes the one that is "good enough".
You wouldn't call your solution "good enough" when stranded in the desert and your only hope is to reach help.
I think you miss the point of my comment
Didn't see the question as practical, it just asked for a maximum. The practicality of it increases with the distance a bike could cover. If a bike could cover only 1 foot with a tank, then it's more practical to just walk. So practicality is something of an opinion. 38km for the cost of the change in time it takes to distribute the fuel in the tanks. How long does it take to push a bike that far? Longer than that change in time cost, I imagine.
Practical engineering never approaches theoretical efficiencies.
You guys! I was able to solve this with the optimal solution and code it in python before seeing his solution. It's significant to me because it's the first time I've solved something from scratch. As already mentioned the end total distance traveled is actually 338.07km. Thank you for the challenge!
Great
If possible can u share the code?
I did the same thing in C++ and got 338.073 as well. Here's the code:
int main()
{
float TotalMiles = 0;
float NumberOfBikes = 16;
while(NumberOfBikes > 0)
{
TotalMiles = TotalMiles + (100/NumberOfBikes);
NumberOfBikes--;
}
std::cout
There is an error in video where 100/8 = 12.25 is shown, which should be 12.5 hence your answer is most accurate
@@ClearAlera thank you
start 1 bike, ride it for half tank in one direction, reverse until you're back at the starting point. Repeat process to any bike that you haven't rode yet until there's none left.
Distance travelled: 1 600 km
I also solved in the same wY 0:35
My brain just assumed a circular track and calculated 1600 km distance 😅
My thinking exactly..much simpler solution
Then starting point and ending point will be same so the distance will be 0 🙄
@@happygoyal594 displacement*
Assuming one bike is used for 100 km to pull the remaining bikes…
We can cover 1600 km ig😂
@@harishmr5426 🔥🔥🔥🔥😂😂
the correct answer is 338.07 km (and that's what i got) and not 337.818 and that's because you miscalculated 100/8=12.5 and not 12.25 as you showed at 5:15
thank you
Thanks for bringing this to my notice... you are absolutely correct bro.
partial harmonic series, H16*100km = ~338.073km!
Hooray one I got strait away, I'm usually slapping my head for not getting it. Thanks for the ego boost and keep the great puzzles coming.
If anyone has played Kerbal Space Program and done asparagus staging, this is essentially the same principal. The exceptions being that the fuel transfer is constant as distance is covered, and that you have to drop 2 vehicles at a time rather than one to keep your mass centered.
exactly what in my mind
What a strange place to find a RuneScape legend
Basically: eliminate as many bikes driving as soon as you can (this eliminates the number of bikes consuming fuel)
This riddle doubles as a great explanation of asparagus staging in rocketry
This guy: *let's use optimization*
My Indian brain: *use one leg to push the other bike*
1st 100 km 8 bikes rem
2nd 100 4bikes remaining
3rd 100 2 bikes rem
4th 100 1 bike remaining
5th 100 run out of fuel.
500 km travelled.
This is called DJ or Desi Jugaad 🤣
Interviewer after listening to this approach : salary kitna loge??
@@ashwaniagrawal3570 😂
What if I rode 50 km and came back to same point 16 times. I would have covered a distance of 1600 kms without going anywhere though but I would have covered the distance.
The task is how far can u go not the maximum distance you can cover.
@@kamild685 The thumbnail literally says, "What is the maximum distance you can go?" The maximum distance you can go is 1600, the furthest you can go is ~338.073, so I'd accept both answers if it was up to me.
Agree with Anand. We need to find max distance not displacement.
That is a valid solution for the INCREDIBLY BADLY WORDED puzzle.
@@kamild685 "The task is how far can u go not the maximum distance you can cover." BULLSHIT!
That is *****************EXACTLY***************** what the question asks for.
Look at 0:37 QUOTE "what is the maximum distance you can go"
The question is asked in such fuzzy language, that the interpretation is up to the reader.
Every mile a motorcycle needs to drive, is fuel used out of the 1600 total fuel(km). So we want to drive bikes as little as possible. This is done by dropping out a bike as soon as its remaining fuel is just enough to top everyone else off.
At the start, that's after 100/16=6.25km. The remaining 15/16th of his fuel is divided among the other 15 bikes, which ride on. After 100/15 = 6.666 km the second bike divides its remaining 14/15th of fuel among the oter 14, and so forth.
This gets 100/16+100/15+ ... +100/2+100/1= just over 338 km.
And here I thought the optimal solution yielded 1600 km traveled. The first fifteen bikes hold on to each other and the sixteenth tows them 100 km. He drops off and the second bike tows the next 100 km. Repeat for all 16 bikes and you (the sixteenth) have gone 1600 km. Well, probably closer to 1550 because of extra fuel usage for towing, but you get the point. Anyway, that is the actual optimum solution - don't run motors when you don't have to. "The best part is no part" - Elon Musk.
I would (before listening to the solution) say 338.0729km. It is given by the sum from 16 to 1 of 100/n where n is the number of bikes riding simultaneously.
The basic idea behind the formula is that the bike start all togheter and then, after 100/n km 1 of the bikes stops and share its fuel to the others bikes until 1 only bike remains.
You are more accurate!
partial harmonic series, H16*100km = ~338.073km.
Yes, I got the same result! I don't know why the answer in the video is not accurate.
Although the problem could have been worded better, the solution was very interesting! Thank you!
What's up logical people this is Ammar😀😂
I always recite this line when I opened the VDO 😅
Now it's my habit 🤣
😄😄thanks bro :)
I'm eagerly waiting for Ur reply too good content didn't find anywhere keep working 🙏🏻❤️❤️
@@LOGICALLYYOURS I got better answer
Follow the same logic but half of the bike goes to opposite side to other half bike then we get maximum distance 543.58 km
@@aniketnikam4977 wouldnt work...asked maximum distance you can go..not the others...answer is 1600km...nowhere did it say max distance from starting point.
@@darklightwhatever6970
But you always can tow. 😁😋😋
The phrasing of the question is wrong. As it is, I can transfer all the fuel to an external container carry it on one bike, refuel as necessary and go 1600km…
No container, they had to take a rope and go together. It would be real- good for phrasing - and close to 1600 km, now it's a question about friction force. My guess it's 1598 )
That was also presume that the additional weight of the extra fuel didn't affect the fuel economy of the motorbike to begin with.
Found someone who had a similar idea😅
Take the tanks off of the 15 other bikes and swap them out every 100km for a total of 1600km
Are you could try using math. I'm guessing it took you a looooong time for you to learn how to color within the lines, am I right?
Awesome video …. I made the similar mistake and got 300 KM …. Thank you very much for the better approach to the solution.
Most underrated channel in you tube
I just give my best for you guys :)
@@LOGICALLYYOURS Please correct me if I'm wrong
16 bikes 100 kms
After 10 km (0+10 km=10 km traveled)
16 bikes have 90 kms remaining
remove 1 bike and refuel remaining 15
90/15= 6 km and 90+6=96
15 bikes remaining with 96 km each
after 12 km (10+12=22km traveled)
All 15 bikes have 84 km remaining
Remove 1 bike & refuel remaining 14
84/14= 6 km and 84+6=90
14 bikes remaining with 90 km each
Again after 12 km (22+12=34 km)
All 14 bikes have 78 km left
Remove 1 bike and refuel others
= 78+6 = 84 km remain in 13 bikes
Again after 12 km (34+12=46)
13 bikes have 72 km left
Remove 1 bike and refuel remaining 12
72+6=78 in 12 bikes
After 1 km (46+1=47)
12 bikes have 77 km left
Remove 1 bike and refuel 11
77+7=84
11 bikes with 84 km each
After 4 km 47+4= 51
11 bikes with 80 km left
Remove 1 refuel 10
= 88 km 10 bikes
After 7 km (51+7= 58)
10 bikes with 81 km left
Remove 1 bike and refuel 9 with
9 ltr = 81+9=90 km
9 bikes 90 ltr
After 2 km (58+2=60)
9 bikes with 88 km left
Remove 1 bike & refuel remaining 8
With 11 ltr = 88+11=99
8 bikes 99 ltr
After 15 km (60+15=75)
8 bikes with 84 km left
Remove 1 & refuel other 7
= 84+12= 96 km
7 bikes 96 km left
After 12 km (75+12=87 km)
7 bikes with 84 km left
Remove 1 & refuel remaining 6
=84+14= 98 km
6 bikes with 98 km left
After 18 km (87+18=105 km)
6 bikes with 80 km left
Remove 1 bike and refuel remaining 5
= 80+16= 96 km
5 bikes with 96 km left
After 16 km (105+16=121 km)
5 bikes with 80 km left
Remove 1 bike and refuel remaining 4
= 80+20= 100
4 bikes with 100 km left
After 25 km (121+25= 146 km)
4 bikes with 75 km left
Remove 1 bike and refuel remaining 3
75 +25= 100 km left
3 bikes with 100 km left
After 50 km (146+50= 196 km)
3 bikes with 50 km left
Remove 1 bike and refuel remaining 2
= 50+50= 100 km left
2 bikes with 100 km left
After 50 km (196+50= 246 km)
2 bikes with 50 km left
Remove 1 bike and refuel remaining 1 50+50= 100
1 bike with 100 km left
After 100 km (246+100= 346 km)
1 bike with 0 km left
Total 346 possible
@@achalbhoir1359 You got a little mistake in there. When 3 bikes with 50 km are left then a single bike with 50 km cannot completely fill the tanks of two bikes. It will go like this :
When you're left with 3 bikes with 100 km,Total Distance:146 km
After 33.3 km (146+33.3=179.3)
3 bikes with 66.6 km left
Remove 1 bike and refuel remaining two
= 66.6+33.3= 100 km left
2 bikes with 100 km left
And you will finally get the answer : 329.3 km
NIce try though.
@@samarthgiri7158 thanks bro🔥🙏😀
Nice puzzle, but what if all the 16 bikes are in line and from rider 2 to rider 16, each rider places his foot on the bike in front of him. Then the last bike which is 16th bike is turned on and toes the next bike keeping the rest 15 bikes' ignition off. After 100km, the 15th bike is turned on and so on.
This way you dont have to transfer the fuel everytime and also you can travel 16×100=1600 km 😎😎😎
That's what I thought. But bit difficult to balance the bike i feel
@@shreyasj6437 when they dont have money to buy fuel and when they are ready to transfer fuel from one bike to other with lot of calculations, I think they can take a bit of pain to travel long distance this way🤣🤣
Just kidding 😂
@@sandeepa4116 Haha Yeah
If balancing can be an issue then what about losing some fuel by vaporization and spilling while transferring to other bikes and burning more fuel by stopping/starting on small intervals.
So you may ignore balance issue (you may tow with rope also) or you must have acknowledged above factors for given solution.
So, if you are ignoring other factors, you can tow other bikes with one bike like a train.
Towing like this will definitely not cover total distance of 1600kms but again we're ignoring other factors here also like burning more fuel by towing other bikes on neutral, balancing etc. So the answer will be 1600kms. 😁😋😋
KSP and asparagus staging taught me this. Gotta love interchangable knowlege
I solved it. YAYYYYY
Bro I love your videos. Please upload as more as videos if possible.
But I got 338.07 kms
Due to these uncertain conditions i was a bit occupied... but I'll increase the frequency to make it atleast one video per week.
You seem to be perfectly on track, might be a little fractional deviation.
@@LOGICALLYYOURS ok no problem bro. Btw your ENGLISH is awsm.
@@LOGICALLYYOURS 100/8 = 12.5, not 12.25
@@LOGICALLYYOURS I got 338.07 as well. Not just a fractional deviation. The difference of .25 is too much for just a fractional deviation.
The sum in your video is wrong.
@@voetbal1231 they made a mistake at 100/8 calling it 12.25 when it is 12.5
You have to put the possibility of transfering fuel in the presumtions... otherwise the answer is 100km.
It did infer that when it said not all the bikes had to reach the maximum point
@@craftycraftybird6932 no, he is right, it's also not stated that you've got a siphoning hose or other equipment.
Dump half the drivers from the get go and have the other half tow bikes. Lose some fuel efficiency, probably around 10% based on google, but now the distance of one bike is 180 not 100.
If you can infer being able to transfer fuel, surely having the towing equipment isn't out of the question either.
Great puzzle!
But, believe me each and every Stop/transfer will come with some losses like vaporization, spillage, stoping/starting =% fuel usage which is generally more than rated!
Firstly i didn't get the solution, because i thought one bike on single run can go upto max 100km😉😉😉! And that my first answer.
Btw, this was good one!👍🏽
😀 thanks buddy
we always do the problems ideally even in mechanics,electrical,chemical,etc.
Ans: 338.0728993
If R is the range, and x is the number of bikes, then the answer is R/x + R/x-1 + R/x-2.. + R/ 1
Glad to get this one right, totally missed the other similar bike problem - if 3 ppl, 2 on bike and 1 walking - what is the most optimized solution in which they can travel to a destination. I couldn't even think beyond - 2 people on bike and 1 walking all the distance, no exchange 😂..
If we can ignore other factors like losing some fuel by vaporization and spilling while transferring to other bikes and burning more fuel by stopping/starting on small intervals.
Then you simply can tow other bikes with one bike and cover total distance of 1600kms (ignoring other factors like balancing, burning more fuel by towing other bikes on neutral, etc). 😁😋😋
Btw nice puzzle and video 👍🏻👍🏻
Hehe. I also thought the same.
Maximum distance traveled was not specified as from the starting position, so total is 100o kilometers. Driver one goes 50K turns around and returns for 50K, they then refuel the original bike s and they repeats the 100K loop until all fuel is gone. Ten loops is 1000K on Ye Ole Odometer...
Insufficient information for a meaningful answer.
There are some clear data at 0:37 , but not all actions are covered.
Example:
There is NO indication that fuel can be transferred between vehicles.
There is NO indication that one vehicle cannot carry another. (i've seen a guy on a bike, with a bike on the seat behind him!)
There is NO indication that a bike cannot be pushed.
There is even NO limit that the riders must ride their bikes, which turn this into a "how far can a man walk" question.
When stating a problem space, you **MUST** map out the entirety of the problem space in detail, otherwise the question is ambiguous, or worse, requires the subjective interpretation of the reader.
Try rephrasing the rules as:
* There are 16 motorbikes, that start AT THE SAME POINT! (this prevents them from starting at 100km intervals, making a mockery of the question)
* Each had a tank capacity of 100 km. A motorbike may only move by using capacity from its own fuel tank. (this prevents cheats like "load up the tanks from15 other bikes", and "put the fuel of all motorbikes in one's tank, and prevents motorbikes from moving by being carried or pushed or loaded in a rental truck)
* Fuel may be transferred between motorbikes at any time, if the motorbikes are at the same location. (this prevents teleporting fuel)
* Fuel can ONLY be moved and stored in motorbike fuel tank, it cannot be stored or moved in any other way. (this prevents making fuel depots int he sand, away from bikes)
* What is the maximum distance that *A BIKE* can go AWAY from the starting point? (do not use the word YOU. YOU could get in a plane and fly away, because none of the rules state that YOU are one of the riders!!!!!!!) that word "away" also prevents the circular track sillyness, which THE ORIGINAL rules would allow. "distance" is a scalar, not a vector, and driving 100 times around a 1km circular track does count as covering 100km distance. But not 100 km AWAY from the start
Strap all of the bikes to one in pairs(like a cart) for balance and have a trio among them if the total number of bikes is even until the last 2. Strap this to the one you’re riding. Then, strap the second last one to the side of the first one(or the back if you’re skilled). Use motorbike parts if needed as the straps. This approach gets 1600 km.
I definitely fell into the first optimization trap when I was first figuring it out. Misleading power of two!
travel until the remaining fuel in one motorcycle can fill up the other motorcycles to 100%, discard empty motorcycle, rinse and repeat = (100km/16)+(100km/15)+(100km/14)+....+(100km/2)+(100km/1)= 338km
partial harmonic series, H16*100km = ~338.073km!
The Strategy mentions "A milestone is reached AS SOON AS the doner bike has enough fuel which can be transferred to the other bike to fully load its tank". That could happen after 1 inch of travel, 2 feet of travel, 8 yards, 3 kilometers, 8 miles, 17 or 44 miles. Needed is a clause such as "while fully emptying its own tank". The formula clears this up some calculating this as 50. Working with 0s and 1s for many years I'm very sticky about good definitions of problems since an unclear one can cause lots of issues and rewrites.
even though i dont work with 0 and 1, i also said that you could refill ever km.
You could do the feeding continuously and the answer would be the same. Imagine the bikes somehow connected with fuel hoses. One bike feeds all the others to keep them topped up, as well as supplying its own engine, then drops out when it gets empty. With 2 bikes connected this way, one bike basically supplies both engines until it goes empty at 50km then drops out while the remaining bike has been getting topped up so still has a full tank. It’s functionally the same as his solution but with continuous transferring.
I too noticed that. I like this definition for "milestone": for N bikes riding together, a milestone is reached when the N-1 recipient bikes have enough empty space in their tanks to hold the fuel remaining in the 1 donor bike. This drives home the essential nature of a milestone: it is a point at which we can shed a bike without shedding any of the fuel remaining in the bike. Shedding a bike whenever possible minimizes the cohort's total fuel consumption per kilometer.
Definitely jumped to the unoptimized solution and was too lazy to figure out the optimized solution.
nearly got there. 100 / 16 .. but I thought the stop will be always 6.25.. but it should be 100 / 15 , 100 / 14 so on.. good one !
Thank you Ammar for this beautiful problem, and, as always, great clear explanation.
Just don't understand why I got the anwer of 338.073 km and not 337.818 km...
He made a small mistake 100/8=12,5, but in his solution 100/8=12,25
@@crazy4hitman755
Yes you right.
Probably this is the mistake.
Forgiven type error.
In hebrew we say:
Only those who don't do anything, never mistake...
I was looking for your comment and I found it :)
Yes, I just realized that fractional mistake i made with 100/8.
Your answer is perfect.
I must take a screenshot of this. Tamir, your words are very precious.
@@LOGICALLYYOURS
Great problem with a beautiful logical principle.
Love your clear explanation and graphic!! 😃
Logically the maximum total distance you can cover is 1600 km - the simplest way is for them all to start out together, perhaps on different roads.
Or if on 1 bike, the bike circles back to the starting point when empty to refuel.
Of course, you can go thru your calcs if you want to find the location furthest from the starting point a rider can get to. But that was not the problem statement.
@@TomTravelling just strap all the other 15 bikes onto one, and switch to another bike every 100km
@@richardklepper3299 but then one bike has to carry all the other 15 bikes so it will take lot of power on them too, but not considering that then its correct
@@gorg212 well, varying weight of the riders, wind drag, road conditions etc were all ignored as well. but it's a great thought challenge.
@@TomTravelling the problem statement was not well stated tbh...i didn't understand who the "you" was in the set-up
1600 KM. The question was distance traveled, not how far. But, if you use Euler's number, logarithms, divide by infinity, add 3 in the 27th step of your equation. 10KM. Unless you want 11.
The maximum distance that can be covered is 1600 km. I had a tool set and took all the tanks off the other motorcycles (While they were sleeping). Strapped them to mine and refilled every 100 km. Total traveled 1600km
i sold the bikes for a round the world plane ticket. he said i had to use the bikes not ride them.
Believe me or not I figure it out myself after several hours working on it
Okay. Not believing you🤣
@Ethan Goldberger 😂😂 absolutely
That's cool solution to optimize but only in one dimension. Just imagine time needed to transfer the fuel every few km...
When I solved this I got 500 km....16 bikes will be grouped into 8 pairs.....In each pair one bike will be running and other will be switched off, basically one bike tolls the other, by placing the leg on the running bike....after 100 km, 8 bikes will be grouped into 4 pairs....after 200 km 4 bikes will be grouped into 2 pairs and after 300 km we have 2 bikes, one tolls the other....after 400 km the last bike will go another 100km so we will get as 500 km in total
The most awaited video , thanks sir for uploading this video and I have already watch your all videos please upload more videos as early as possible.
🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Yes buddy.. I'll make the videos frequently
Really one of the most useful channels to learn how to use different approaches to solutions .
Just wished 3 puzzles could be uploaded per month .
The riddle does not preclude leaving the bike behind and walking, which means one could cover significantly more ground.
I was thinking of coasting downhill
The explanation is really good. Keep up the quality content
I think the solution is 338,072 km but anyways great problem.
partial harmonic series, H16*100km = ~338.073km!
I calculated 500km by just towing the every other bike for 100km by the rider. So on the first 100km 8 bikes fuel will be empty and on the second 100km 4 bikes fuel will be empty and on the third 100km 2 bikes fuel will be empty and on the 4th 100km 1 bike fuel will be empty and the remaining bike will cover another 100 km which adds up to 500 km. This is much more optimal as long as there was no clause that the ignition of all bikes has to be turned on at start
Excellent solution without doubt, but often most of your riddles seems reverse solved. The analogy of bike with fuel is ridiculous, because, if I were to beat someones record by a mile I would rather push the bike for the extra mile. Without time constraint, this solution may not make any sense. Further, consider the spillage every time you have to refuel. Is the road flat?. Then there is "maximum distance that YOU can go", is there a space for ME to sit behind the rider. If the bike has reasonable torque then daisy chain them would be the best solution.
The optimal are 16 X 100 km. You go get a screw driver, unscrew the other gaz tank, find a chariot, put the gaz tanks on it, you attach the chariot on the "first" bike, and go 1600km!
Another thing to take in account is the speed at which you "travel", more fast you go, less distance you travel!
So, saying a tank has a range of "100km" is wrong/false/imcomplete! (or at least, you need to specified a speed, which will be mandatory! 100km range.)
So if the speed is, i don't know, 100km/h (in the video is 100km/h?) (which is not the "best" speed
@@literallylegendary And it is why (i will quote myself | maybe you need to learn to read) i said :
«You go get a screw driver»
and not
You use the screw driver given! (or providen)
Very nice
I am amazed by your solution but want to know that do you solve them by yourself
And where do you take such riddles from? Please answer me
1/1 + 1/2 + 1/3 + ... + 1/16 = multiple of 100 km distance
Bro I have Desi approach with which
We can go upto 500 km theoretically and approximately 400 km practically.
We have 16 bikes first of all put 8 bikes another 8 bikes they can go upto 100 km after that only 8 bikes have fuel now put 4 bikes on another 4 now we can travell another 100 km
Now we have only 4 fueled bikes
So put 2 bikes on another 2 so we will be able to travel another 100 km
Now we have 2 fueled bikes put 1 one on another we will travel further 100km now we have only bike which travell upto 100 km
Total distance traveled=500km
But this solution has one problem that is milage of bikes will be decreased due to increase in weight
But I don't think that milage will be half .
Actually it can be 1600 km as you have asked maximum distance.. if it is maximum displacement, then it is 337 as you mentioned.😉
As many people in the comment section are finding out loopholes and giving different solutions, I tried myself too😉
As a mathematical problem, this solution does work. In practicality, time is another resource that you would need to consider. Imagine a similar scenario but with boats travelling upstream.
For 8 bikes, the value should be 12.5, not 12.25, I believe.
I ended up with a combined distance of 338.0729 kilometers.
With all the extra stopping, starting and accelerating after so many stops, not to mention the inefficiency of the fuel transfers and additional nonproductive distance during the transfer stops, you're going to waste more than the 37km you supposedly gain.
It's a nice problem, but you have made a rounding error by truncating the decimals. You quoted your answer to 3 decimal places but the correct answer to 3 decimal places is 338,073km, which is 0.250km further than your answer...
partial harmonic series, H16*100km = ~338.073km.
Well we can use 1 motorcycle to push the other 15 for first 100km and the 2nd can push the rest 14 after 100km and so on and so forth. So the maximum distance you can travel, logically is 1500+ km. This can be done in reality. If done to with 100% accuracy 1600km is possible
This can be done in reality? No, in reality a bike's fuel economy is affected quite severely by pulling 15 other bikes behind it.
Nonsense. If you pushed, or more likely pulled, 15 bikes do you really think you would be able to travel 100km. With all that weight, the friction and wind resistance, impossible to pull at “100% efficiency” as you put it. You would literally be pulling 15 times your own weight. Only a massive truck with a huge engine and torque could do that. I don’t know the efficiency, but I’d estimate you’d at best get 20km of distance, if you could even pull the 15 bikes at all.
We can go 1600 km.. By attaching other 15 bike behind 1 bike and leave 15 bike neutral... After 1st bike fule over then start 14th bike and leave other 13 bike neutral... And so on... At last we go 1600 km 😂😂
Same thing first I think 😁😁😁😁😁😂😂😂😂
You might have optimised the maximum possible distance that one of the riders can cover theoretically, but practically, riding for 50 kms before taking a break to cannibalize petrol of one of the fellow riders is not only simpler, but a consistently predictable riding break after every 50 kms helps avoid unnecessary confusion and chaos. As an experienced group rider, I can attest to the fact that as a group of 16 riders with a target distance of 300-350 kms for the final rider, 15 riding breaks is definitely not optimal compared to 4. I can easily coordinate and organise a group of 16 riders by giving them a simple directive: ride in groups of two, and after 50 kms, those of you who are riding ahead, take a 15 minutes break to prepare the next phase of the ride, during which time refill your tank from your ride partner who is staying behind, and pair up with your assigned ride partner for the next 50 kms. Can you imagine the logistic nightmare of coordinating a group of riders who will become increasingly tired and have to stop at non-uniform interval of distances, most of which are not rounded figures, but have up to 3 decimal places, which does not show up on odometer/ trip meter information display panel of any bike?! And I have not yet broached the topic of reduced fuel efficiency when you cover 338 kms with 15 breaks when compared to covering 300 kms with only 4 riding breaks. And don't even get me started on how you plan to distribute fuel in precisely equal amounts to 15 bikes in the first instance, a calculation which is not going to get easier with subsequent riding breaks, especially with some difficult prime numbers waiting in line to test your calculation skills. So you tell me: which alternative is more optimised?!😝
Just add each bike with another with rope, while using one, keep other bikes neutral, BOOM friends you can go 1600 KM and no one will be left behind, true friendship will be created..... Trust me😁
Definitely (by ignoring other factors). 👍🏻👍🏻
Had it the same way!!
No, the burden to pull all bikes (15 bikes for the most front bike) will consume more fuel. It won't reach 1600 km but still greater than 300 km for sure
@@azizimohdnoor3604
Yes, but If we are ignoring factors like losing some fuel by vaporization and spilling while transferring to other bikes and burning more fuel by stopping/starting on small intervals etc...
Then we also can ignore some factors like balancing, burning more fuel by towing 15 bikes on neutral, etc.. and go for 1600kms. 😁😋😋
I may be thinking about this incorrectly but I'm coming up with a different answer. Here is my logic... even though there are 16 bikes at the first refuel point there will be only 15. This means the initial distance traveled to fuel up 15 bikes is 6.666 km. You would then follow the logic for 14, 13, 12, etc. to arrive at a maximum distance of 331.823 km. With exception of Milestone 9 I agree with your table. When I calculated Milestone 9 it came up to 12.5 km vs the 12.25 km shown. Great Problem! Please let me know what you think about my approach.
All 16 bikes will be 15/16 full of fuel at the first stop, including the donor bike. The donor bike has to fill up each of the other 15 bikes with 1/16 of a tank of fuel in order to top off the tanks. Since it has 15/16 of a tank the math works out perfectly. 15 bikes each need 1/16 of a tank filled and the donor has 15/16 in its own tank. Therefore the correct answer for the first stop is 100/16 which equals 6.25km. Do the math for 4 bikes and it is easier to conceptualize.
Actually, the answer should be 1600 km. I would hop on the first bike, ride 50 km away, turn around, and ride back. Distance traveled = 100 km. Repeat this 15 more times with all of the other bikes. Total distance traveled = 1600 km.
The riddle asks for the "maximum distance that we can go." It didn't ask for the furthest distance away from the starting point.
There is a big loophole in the framing of the question which gives me the right to misinterpret it.. there is nowhere u mentioned that the bikes have to start at the same time neither did u say that the max distance covered is unidirectional..i could use each bike to town and back then take another bike to town and back and so on...I will have covered a distance of 1600km..
One more thing is that you are not forbidden to push à bike that has no fuel and there isnt à limited time period soo i guess you can go on for quite à while even though it might not be easy to push a motorbike like that
The fact that we had a fuel siphon device that could perfectly transfer all of the fuel from one bike to another would have been very useful information to know. If I was supposed to assume I had a device like that, what is to stop me from assuming I have a passport and an international plane ticket?
I was trying to figure out this puzzle by having bikes tow each other but then I didn't know how much more fuel it would take to tow and how many bikes one bike could tow.
My initial approach was one guy towing the rest 15 guys until his tank empties and one among the rwst 15 takes his turn totalling to 1600kms
🤪
It would take more fuel to carry 16 bikes a certain distance than just one. Towing is not an energy-free process.
@@oenrn If you assume the fuel required is proportional to the weight, you would still get the same result: (1/16 + 1/15 + ... + 1)*100. You also improve on the time complexity (no fuel transfer) and context switching overhead (stopping and starting will reduce fuel efficiency) with zero cost for distance.
Intuitively, it makes sense that the distance comes out the same, because when rider n transfers 1/(16-n) fuel, it's as if rider n is reimbursing the fuel per rider for the distance just covered.
Thanks for the fun problem.
Slight note: your calculation at @5:18 of 100/8 = 12.25 should be 12.50, leaving an error in the total. The summation of 100/n for n=1 through n=16 is 338.073 km.
Another solution, 1600 km. One bike will move towards any direction and will return to same starting point, so travel by 1 vehicle is 100 km and can repeat 16 times. So, total distance travelled 1600 km. Just thinking out of box as this is a riddle. 😁🙏🙏
There is a difference between distance and displacement. Your displacement is 0,so max distance covered 0km.
The question was written so that it would have allowed one driver to drive a 100 km "loop" just to came back and swap the bike to another with fully loaded tank. Eventually travelling 1600 km (though coming back at the same point eventually)
wrong. The question is 'what is the maximum "DISTANCE" that U can go?'
@@rushankuma en.wikipedia.org/wiki/Distance#/media/File:Distancedisplacement.svg
@@rushankuma en.wikipedia.org/wiki/Distance#Distance_versus_directed_distance_and_displacement
So, you in fact travel zero distance!
@@tn_onyoutube8436 Based on your answer I have to conclude that you did not explore the two links which would have described the terminology.
Maximum distance is1600 km. Take the tanks off 15 bikes and strap them to the back of one bike. Swap empty tank with a full one every 100 km. From my time spent living in many third world countries, that is exactly what the more enterprising members of society would do.
If you split the bikes into two teams traveling in opposite directions, they can each travel a total of 271¹¹⁄₁₄km and end up a total distance of 543⁴⁄₇km away from each other.
That's fantastic thinking. That should be the answer.
MINDBLOWN!
EXCEPTIONAL!
PROBLEM SOLVING @ THE PRIME TIME HERE IN THIS CHANEL
KEEP GOIN!!>>>>
Good one, but milestone 9 will be 12.5, not 12.25km from milestone 8. That gets you another 250m. You also left another 4.899m+ out by rounding everything down to the integer meter.
Always fun to crack down your puzzles brother ! Although I manage a correct approach, but incorrect answer 😁
15guys hold the front motorbike , (15 motorbikes at km 100, with 15 full tanks) do it again , and again, and you have 1.600km done
Considering that when the fuel is gone, the motorbike will ride more 1 km at least, we will have 1616km
Well, no one said that you can't take the fuel of the 15 other bikes in a large container with you. Every 100km you fill up your tank and drive almost 1600km (a bit less due to higher weight)
You are not given a large container in the problem.
Wrong, 15 riders will empty their bikes and donate it to the last one so the rider will have enough fuel to drive 1 600 km. Average motorcycle fuel consumption is 4.4 l / 100 k, which is 66 liters from 15 drivers. That is a large bag or suitcase which is possible to have on bike.
Sir u should make a video on ur personal life , how u started the you tube channel
And plz share ur experience with us on this journey
I got the most easiest logic myself, just didn't calculated by calculator or excel.
It can be by most simplest way,
1+(1/2)+(1/3)+(1/4)+...+(1/16) and then *100
Hope google/FB/Amazon interview accept this instead of sum number 😁
Nice puzzle! I initially fell into the 300km trap.
I wrote this recursive solution in Python and I get a slightly different result:
def bikes(n):
if n == 1:
return 100
return 100 / n + bikes(n - 1)
print(bikes(16))
I get 338.0728993228993 for 16 bikes, which is slightly higher than your result. For 4 bikes, however, I get the same result as you.
Could this be an artifact of rounding? I doubt it could be _that_ big.
EDIT: Using Python's decimal library I still get 338.0728...
Hi Christian,
Good to see you code snippet. I'm yet to learn Python syntax, but the code looks very logical and straight forward.
In fact, your answer is correct. I made a little fractional mistake for 100/8.
Bro can you plse explain your code currently I'm learning python
@@sabarishravishankar9158 Yes, sure.
The `bikes` function will return the solution for a positive number of bikes n.
The base case is n=1 (one bike), where you can simply travel 100km.
For any n > 1, all bikes travel 100km/n, as Ammar explained in the video. Then, one of the bikes fuels the others and stops. From that point, you are left with n-1 bikes.
This explains the `100/n + bikes(n-1)` formula.
Basically, when calling bikes with a value for n, it will then call itself recursively with n-1, then n-2, and so on, when the value reaches one and then the recursion stops (return 100).
@ thanks bro really appreciate your efforts finally I understood the solution
Man. U are genius.... Are u from iit or any prestigious college?
Thanks Aritra for the appreciation. Glad to see your comment.
@@LOGICALLYYOURS my pleasure
Solved this absolutely stunning but easy problem
The goal is to discard as many bikes as soon as possible, so that you don't waste fuel on concurrent bikes when you can avoid it.
So at 6.25 (=100/16) km all bikes have burned 1/16 tank, so they have 15/16 fuel tank. You can use up one bike to fill up the others.
So at 6.25 you have 15 bikes full.
Similarly at another 100/15 = 6.66 km you will have 14 bikes full.
Etc etc
So the total distance is 100/16 + 100/15 + 100/14 + 100/13 ....... = 338 km. This is easy to calculcate with a spreadsheet like Excel.
Legends know that this is advanced version of camel and 3000 apples 👍
Because I have done that before, I was able to solve it easily. 😎
I ended up with 338,072899 km. That's if if you take into account all de imals and you don't round anything.
You are more accurate!
partial harmonic series, H16*100km = ~338.073km.
There is a mistake in his milestone #9. 100/8 = 12.5 not 12.25. You are correct.
so the optimized result is 13% better than a no think first glance solution? Kind of underwhelming when my initial answer was 1,600km. Why are all 16 bikes on and running? You've got 15 extra divers. Siphon the gas out and carry it on one bike (since transfers are a possibility). Or if you're not going to allow storage, turn 15 bikes off and have their riders push them 100km at a time to transfer to the first bike.
Always love your content❤️
I can travel 1600km distance, because I know the difference between distance and displacement. u got it......!!!??????
What if we take one bike at a time... Move in a circular motion and return at the starting point (circumference=100km)... Then we can do this 16 times... Then the maximum distance travelled would be 1600 km
Because we are asked for distance
Not watched the video yet so…
Either a) 100 km, going out in a straight line (can’t carry the other 15 motorbikes with you) or b) zero, 100 km circuit where you travel 1600 km but end up in the same place you started.
I haven't figured out that milestone part. It ignores the inefficiencies from step one. First, dump half of the drivers and have the other half of the motorbikes tow the empty ones. There is a mild loss of fuel efficacy from extra weight but you did dump the other riders so as to minimize the loss.
I think this is engineering initiative in spacecrafts. Carrying more fuel would increase its weight and therefore not always lengthens the travel distance. It's like a troop of bikes dropping down empty ones to continue journey.
Rather than transfering the fuel, why don't you tow the bikes by attaching the rope and keep on doing the same till the fuel of the towing bike gets empty. This will cover way far more distance than what you calculated...
Use Indian jugads, always more worthwhile. 😃
Can this solution be possibly used by NASA?
U never fail to amaze us with ur puzzles.
Oh I highly doubt that, me on the bike with the rider, the bike would only cover 10 km before it breaks down.
My answer is 1,600km. One motor bike should pull all 15 bikes from behind using a rope or what. When the first bike emptied is fuel, the second bike should do the same to pull remaining 14 bikes. Then the third one pulls other 13 bikes, and so on... Until only one left and finish the ride.