Flashlight

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
rich_m

Flashlight

Post by rich_m »

Could any one help me with this puzzle:-

There are four people on one side of a river. There is
a bridge crossing the river, but outside is very dark.
While they do have a flashlight, only two people at a
time can cross the bridge and crossing can not be done
without a flashlight. Knowing that they cross the
bridge in 1,2,5 and 10 mins. respectively, can they
cross the bridge in 17 mins? (When two people cross the bridge they cross with the speed of the slowest one).
;)
CESS.tk

Re:Flashlight

Post by CESS.tk »

Let |`-?| be the bridge:

1 2 5 10 |`-?| -> 0 min.
5 10 |`-?| 1 2 -> 2 min.
1 5 10 |`-?| 2 -> 3 min.
1 |`-?| 2 5 10 -> 13 min.
1 2 |`-?| 5 10 -> 15 min.
|`-?| 1 2 5 10 -> 17 min.


The trick is in understanding that 5 and 10 have to cross the bridge simultaneously and only once.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Flashlight

Post by df »

i did this test as part of a job interview once. hahaha
-- Stu --
Post Reply