Click to See Complete Forum and Search --> : A question from an interview at Microsoft.
Tomexx
Oct 4th, 2000, 02:54 PM
Hi,
There are 4 people that want to cross the bridge. They have 1 flash light.
Person A takes 10 minuts to cross the bridge,
Person B - 5 min,
Person C - 2 min,
Person D - 1 min
The bridge can only hold 2 people at a time at most.
They can only cross with a flash light.
How can they ALL cross the bridge in 17 minutes?
barrk
Oct 4th, 2000, 03:07 PM
A and B cross = 2 minutes
A returns = 1 minute
C and D cross = 10 minutes
B returns = 2 minutes
A and B cross = 2 minutes
= 17 minutes
Tomexx
Oct 4th, 2000, 03:53 PM
No. A and B would take 10 minutes to go and another 5 minutes for B to come back.
Try again.
barrk
Oct 4th, 2000, 04:36 PM
Sorry I copied this from a thread from two weeks ago and this was the question...my answer was right for this question but you swapped the times.
There are four people who need to cross a bridge at night. The bridge is only wide enough for two people to cross at once. There is only one flashlight for the entire group. When two people cross, they must cross at the slower member's speed. All four people must cross the bridge in 17 minutes, since the bridge will collapse in exactly that amount of time. Here are the times each member takes to cross the bridge:
Person A: 1 minute
Person B: 2 minutes
Person C: 5 minutes
Person D: 10 minutes
A & D cross in 1 minute. D=1, A=1
A returns in 1 minute. D=1, A=2
A & C cross in 2 minutes. D=1, C=2, A=4
A returns in 1 minute. D=1, C=2, A=5
A & B cross in 5 minutes. D=1, C=2, B=5, A=10
They all have crossed the bridge in under 17 minutes. It took 10 total minutes and they have 7 minutes left to get clear of the exploding bridge (which was going to explode in 17 minutes).
Or maybe you meant that all their times together add to 18 minutes.
Either way, I have the final configuration of times:
Person A takes 10 minuts to cross the bridge,
Person B - 5 min,
Person C - 2 min,
Person D - 1 min
Or I'm just plain wrong. ;)
[Edited by VirtuallyVB on 10-04-2000 at 06:05 PM]
KWell
Oct 5th, 2000, 01:15 AM
A and D :
D follow A until 8'45.
D go to the end the brigde (15'')
D return (while A go to the end) (1'00)
(A and D was on the brigde all the 10'00 with the flash light)
A the end of the 4' D is at the begining and A at the end)
Time 10'
B and D :
D follow B until 3'
D go to the end of the bridge (less then 1' (waiting until 4'))
D return (while B go to the end) (1')
(B and D was on the brigde all the 5' with the flash light)
Time 5 min
C and D
D follow C until the end of the bridge
Time 2 min
Total 17 min
(sorry for my explanation, my english is bad)
Arbiter
Oct 5th, 2000, 04:20 AM
D (who is obviously the thinnest of the bunch) slaughters the rest.
He then eats the remains (taking about 15mins) and then strolls across the bridge in 2 mins.
Easy.
PS This was also a question used in a staff team building exercise at Motorola (where a friend of mine works).
Ianpbaker
Oct 5th, 2000, 07:53 AM
C who is dying for a pint, grabs the flash light and run's over the bridge, goes to the nearest pub, get's absolutley wasted, crawls back to the bridge, destroys it and pull's a mooney at his mates.
Arbiter
Oct 5th, 2000, 09:24 AM
B, with a burst of inspiration, swallows the torch and uses himself as beacon to guide in the rescue helicopter.
Tomexx and All
I really want to know if I am correct. I did end with the times that Tomexx said they took. Those times add to 18 not 17.
Kzin
Dec 6th, 2000, 01:52 PM
Person D escorts each one - this works fine if you do the calculations with an original issue Pentium processor
Originally posted by Tomexx
Hi,
There are 4 people that want to cross the bridge. They have 1 flash light.
Person A takes 10 minuts to cross the bridge,
Person B - 5 min,
Person C - 2 min,
Person D - 1 min
The bridge can only hold 2 people at a time at most.
They can only cross with a flash light.
How can they ALL cross the bridge in 17 minutes?
Originally posted by Ianpbaker
C who is dying for a pint, grabs the flash light and run's over the bridge, goes to the nearest pub, get's absolutley wasted, crawls back to the bridge, destroys it and pull's a mooney at his mates.
I think this is the best answer thus far. :)
Sherm
Juan Carlos Rey
Dec 6th, 2000, 08:09 PM
Cheating or chitting?
A = 10 min
B = 5 min
C = 2 min
D = 1 min
The only combination that fits is: 10 + 5 + 2 = 17 minutes. So far so good. Now the poor D, who is the fastest, has to work triple than fatty A. (Go, come, go) Unfair. Just as in real life!
OK:
A + D cross the bridge - 10 min.
D returns, BUT C begins to cross at the same time: 2 persons, 1 flash light. Conditions are met. Time = 2 min
When C has finished crossing, B and D start to cross. Time = 5 minutes.
10 + 2 + 5 = 17.
It works also if A and C cross first: A + C = 10 minutes. C returs, D crosses at same time: 2 minutes. Then B and C cross, time 5 minutes. Total 10 + 2 + 5 = 17.-
Also B + C = 5 min. Then C returs, D crosses. Time = 2 min. Then A + C, time 10 min: 5 + 2 + 10 = 17.
Also... STOP! ENOUGH!!
I´m genius!
[Edited by Juan Carlos Rey on 12-06-2000 at 09:21 PM]
aaudette
Dec 6th, 2000, 08:31 PM
boys, boys, boys...
Look for the loophole. All 4 people have to cross the bridge. They do not have to end up on the same side...
A&B cross the bridge (17-10=7 lminutes left.) Person b brings back the flashlight (7-5=2 minutes left.) C & D cross the bridge, time expires. All 4 people have crossed the bridge.
HarryW
Dec 6th, 2000, 09:24 PM
I can tell you that I have seen this problem before and the solution has already been given here:
C&D go - 2 mins
D back - 3 mins
A&B go - 13 mins
C back - 15 mins
C&D go - 17 mins
That's the solution. There's no catch.
I thought he meant those are the total times taken for each guy. I see that HarryW is correct, but the total time crossing for each person is:
A 10
B 10
C 6
D 5
Good Job HarryW!
paulw
Dec 7th, 2000, 04:33 AM
The bridge can only hold 2 people at one time. They omitted to mention A's car. This gets them across in 32.4 seconds with the bridge collapsing under the strain behind them.
Well, they wanted lateral thinking!
Cheers,
P.
smh
Dec 7th, 2000, 01:59 PM
No, they all died, because 'A' took so long to get across the bridge that the flashlight batteries died and they all fell to a bloody death on the cliffs below.
He He
(Sorry, I don't get to be sarcastic very often)
spetnik
Dec 2nd, 2001, 08:53 AM
Wow, is this Katies 1st????????
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.