[su_quote style=”default” cite=”” url=”” class=””]You are given two fuses and a lighter. Each fuse will burn for exactly 60 minutes. However the rate of burning is irregular, so cutting a fuse in half does not mean a burn time of 30 minutes. You need to time 45 minutes. How do you do it?[/su_quote]

[su_spoiler title=”Click for solution” style=”fancy” open=”no”]

The key to solving this, is realizing that you need to use both fuses at the same time. The solution is to light both ends of one fuse and one end of the other fuse at the same time. When the fuse with both ends lit burns out, 30 minutes will have passed. At that point, light the other end of the other fuse. It will have burned for 30 minutes and will have 30 minutes left on it. But when you light the other end of it, that time gets cut in half, so it will burn for 15 minutes more. The original 30 plus 15 equals 45 minutes.

For a more detailed explanation, this site explains it well in my opinion:

http://www.programmerinterview.com/index.php/puzzles/2-fuses-problem-measure-45-minutes/.

[/su_spoiler]

]]>[su_quote style=”default” cite=”” url=”” class=””]Four people come to a river in the night. There is a narrow bridge, but it can only hold two people at a time. They have one torch and, because it’s night, the torch has to be used when crossing the bridge. Person A can cross the bridge in one minute, B in two minutes, C in five minutes, and D in eight minutes. When two people cross the bridge together, they must move at the slower person’s pace. The question is, what is the fastest they can all get across?[/su_quote]

[su_spoiler title=”Click for solution” style=”fancy” open=”no”]

An obvious first idea is that the cost of returning the torch to the people waiting to cross is an unavoidable price which should be minimized. This strategy makes A the torch bearer, shuttling each person across the bridge:

Elapsed Time | Starting Side | Action | Ending Side |
---|---|---|---|

0 minutes | A B C D | ||

2 minutes | C D | A and B cross forward, taking 2 minutes | A B |

3 minutes | A C D | A returns, taking 1 minute | B |

8 minutes | D | A and C cross forward, taking 5 minutes | A B C |

9 minutes | A D | A returns, taking 1 minute | B C |

17 minutes | A and D cross forward, taking 8 minutes | A B C D |

This strategy makes it possible to do a crossing in 17 minutes. To find the correct solution, one must realize that forcing the two slowest people to cross individually wastes time which can be saved if they both cross together:^{}

Elapsed Time | Starting Side | Action | Ending Side |
---|---|---|---|

0 minutes | A B C D | ||

2 minutes | C D | A and B cross forward, taking 2 minutes | A B |

3 minutes | A C D | A returns, taking 1 minute | B |

11 minutes | A | C and D cross forward, taking 8 minutes | B C D |

13 minutes | A B | B returns, taking 2 minutes | C D |

15 minutes | A and B cross forward, taking 2 minutes | A B C D |

A second equivalent solution swaps the return trips. Basically, the two fastest people cross together on the 1st and 5th trips, the two slowest people cross together on the 3rd trip, and EITHER of the fastest people returns on the 2nd trip, and the other fastest person returns on the 4th trip.

This problem (and the above solution) were taken from: https://en.wikipedia.org/wiki/Bridge_and_torch_problem. Check it out for more information about this problem and similar one’s.

[/su_spoiler]

]]>[su_quote style=”default” cite=”” url=”” class=””]Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?[/su_quote]

[su_spoiler title=”Click for solution” style=”fancy” open=”no”]

A player who stays with the initial choice wins in only one out of three of these equally likely possibilities, while a player who switches wins in two out of three.

An intuitive explanation is that if the contestant picks a goat (2 of 3 doors) the contestant will win the car by switching as the other goat can no longer be picked, while if the contestant picks the car (1 of 3 doors) the contestant will not win the car by switching. The fact that the host subsequently reveals a goat in one of the unchosen doors changes nothing about the initial probability.

Another way to understand the solution is to consider the two original unchosen doors together. “Monty is saying in effect: you can keep your one door or you can have the other two doors”. The 2/3 chance of finding the car has not been changed by the opening of one of these doors because Monty, knowing the location of the car, is certain to reveal a goat. So the player’s choice after the host opens a door is no different than if the host offered the player the option to switch from their original chosen door to the set of both remaining doors. The switch in this case clearly gives the player a 2/3 probability of choosing the car.

In other words: “By opening his door, Monty is saying to the contestant ‘There are two doors you did not choose, and the probability that the prize is behind one of them is 2/3. I’ll help you by using my knowledge of where the prize is to open one of those two doors to show you that it does not hide the prize. You can now take advantage of this additional information. Your choice of door A has a chance of 1 in 3 of being the winner. I have not changed that. But by eliminating door C, I have shown you that the probability that door B hides the prize is 2 in 3.'”

The solution will probably be more intuitive with 1,000,000 doors rather than 3. In this case there are 999,999 doors with goats behind them and one door with a prize. After the player picks a door the host opens all but 1 of the remaining doors. On average, in 999,999 times out of 1,000,000, the remaining door will contain the prize. Intuitively, the player should ask how likely is it, that given a million doors, he or she managed to pick the right one initially.

This problem (and the above solution) were taken from: https://en.wikipedia.org/wiki/Monty_Hall_problem. Check it out for more information about this problem and similar one’s.

[/su_spoiler]

]]>