Question:
Given 25 horses and 5 horses in a race, find the minimum number of races needed to find top 3 horses.
Answer:
7
Step 1: divide 25 horses into 5 groups, each group a race;
Step 2: pick the horses in 3rd place from each group above, then race and suppose get A > B > C > D > E (here '>' means faster);
Step 3: pick the first 3 horses from the group containing A and first 2 horses from group containing B, run a final race.
Below is an illustration.
Showing posts with label Brainteaser. Show all posts
Showing posts with label Brainteaser. Show all posts
Thursday, October 13, 2011
Wednesday, October 12, 2011
Use 2 Fuses to Measure Time
Given 2 fuses, each can be burned in exactly 1 hour. However, both fuses are not uniform and we have no clue which part burns faster and which slower.
Question: how to measure 45 minutes using these 2 fuses?
Answer:
First measure 30 min, and then measure 15 min.
How to measure 30 min? Light a fuse from both ends at the time.
How to measure 15 min? That's half of 30 min. So light a fuse from both ends after it has burned 30 min.
Final answer is:
1. First light 2 ends of one fuse and 1 end of the other fuse at the same time (time 0 now);
2. At the time one fuse is burned up, light the other end of the remaining fuse (30 min now);
3. When the second fuse is burned up, it's 45 min.
Question: how to measure 45 minutes using these 2 fuses?
Answer:
First measure 30 min, and then measure 15 min.
How to measure 30 min? Light a fuse from both ends at the time.
How to measure 15 min? That's half of 30 min. So light a fuse from both ends after it has burned 30 min.
Final answer is:
1. First light 2 ends of one fuse and 1 end of the other fuse at the same time (time 0 now);
2. At the time one fuse is burned up, light the other end of the remaining fuse (30 min now);
3. When the second fuse is burned up, it's 45 min.
Subscribe to:
Posts (Atom)
