Investment Banking puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 36
- Topics
- 12
- Hard
- 29
014You have 25 horses and a track that races 5 at a time, with no stopwatch. What is the minimum number of races needed to find the three fastest?Consulting style brainteasersSales and trading
Try it first
How many races?
Show the worked solution
7 races. Race five heats of five, then race the five heat winners: the winner of race 6 is the fastest overall. Now strike out every horse that has three horses known to be faster. Only five can still be second or third: the second and third from the winner's heat, the first two from the runner-up's heat and the winner of the third-placed heat. Race them; the top two are second and third overall.
What does each race actually tell you?
Without a stopwatch, a race tells you the order only among the horses in it. Think of five classrooms each running their own sprint: you know the fastest in each room, but nothing about how one room's second best compares with another room's winner. Every horse must race at least once, so five heats are unavoidable, and they give five separate rankings that a sixth race between the heat winners stitches together. Name the heats A to E in the order their winners finished race 6, so A1 is the fastest horse of all.
Once race 6 orders the heat winners, every horse with three known horses ahead of it is ruled out, which leaves exactly five candidates for second and third, A2, A3, B1, B2 and C1, and they fill race 7. Which horses can you strike out after race 6?
Any horse with three horses known to be faster cannot finish in the top three. Heats D and E go entirely, because D1 and E1 already finished behind A1, B1 and C1, and everything in those heats is slower still. In heat C only C1 survives: C2 trails C1, B1 and A1. In heat B, B1 and B2 survive, but B3 trails B1, B2 and A1. In heat A, A2 and A3 survive and A4 trails A1, A2 and A3. That leaves exactly five: A2, A3, B1, B2 and C1.
Race 7 puts those five on the track, and its first two finishers are second and third overall. A1 sits out, because it is already known to be the fastest. Could six races ever be enough? No: the five heats alone cannot name the fastest horse, and the race that does name it leaves five horses still unranked for second and third. That is the reasoning to say out loud, because it shows the 7 is a minimum rather than just a method that works.
Where candidates lose it
The common answer is 11 or more: race the heats, then keep racing groups of winners and runners-up until something falls out. It can reach the right horses, but it shows no elimination logic, which is the whole point of the question.
The other slip is stopping at 6 because the winners' race finds the champion. The question asks for three horses; draw the grid, strike out the impossible ones, and the five that remain fit one race.
What the interviewer asks next
- How many races do you need to find only the fastest horse?
- With 49 horses and a track that takes 7 at a time, how many races find the fastest three?
- If the heats were drawn at random each time, would the minimum change?
048You have 1,000 bottles of wine and exactly one is poisoned. A single sip makes a taster ill after exactly 24 hours. With 10 testers and one day, how do you find the poisoned bottle?Consulting style brainteasersSales and trading
Try it first
How can 10 testers cover 1,000 bottles in one round?
Show the worked solution
Number the bottles 1 to 1,000, write each number in 10-digit binary, and have tester k sip from every bottle whose kth digit is a 1. After 24 hours, write a 1 for each tester who is ill and a 0 for each who is not. That 10-digit binary number is the poisoned bottle. It works because 10 yes-or-no results can tell apart 2 to the 10th, 1,024 cases, which is more than 1,000.
Why does giving each tester a separate batch fail?
Picture 10 friends each tasting their own 100 bottles. One friend falls ill and you know the poison is among their 100, but not which one, and the day is over. When testers taste separate batches, each result answers one question about one batch, so 10 testers can single out at most 10 groups, not 1,000 bottles. The fix is to let testers overlap, so that every bottle is sipped by its own unique combination of testers.
Writing each bottle number in 10-digit binary assigns one digit to each tester, so bottle 357, which is 0101100101, is sipped by testers 2, 4, 5, 8 and 10, and if exactly those five fall ill their place values add back to 357. How does the binary code name the bottle?
Give each tester a place value: tester 1 is worth 512, tester 2 is worth 256, and so on down to tester 10, worth 1. Bottle 357 equals 256 + 64 + 32 + 4 + 1, so testers 2, 4, 5, 8 and 10 sip from it. If exactly those five fall ill, adding their place values gives back 357, and no other bottle has the same set of tasters. Every bottle number is a different set of testers, so the pattern of illness points to one bottle only.
The relationship2^10 the number of different ill-or-well patterns 10 testers can show 0101100101 bottle 357 in binary, one digit per tester What it says in wordsTen yes-or-no results give enough patterns to label every bottle uniquely.What is the general lesson?
Each tester is one yes-or-no question asked of every bottle at once. Ten yes-or-no answers can tell apart 1,024 possibilities, so the right design makes each answer carry one binary digit of the bottle's number. The same idea finds one faulty item among many with very few tests, and it is why 2,000 bottles need only one more tester. With two days, each tester has three outcomes, ill on day one, ill on day two, or never, and 7 testers would be enough.
Where candidates lose it
Most candidates split the bottles into 10 batches of 100, find the right batch, and run out of time. Separate batches waste the testers, because each one answers only a single question about a single batch.
The second loss is saying binary without showing the decoding. Work one bottle through, such as 357, so the interviewer sees the pattern of illness turn back into a number.
What the interviewer asks next
- How many testers would you need for 2,000 bottles?
- With two poisoned bottles, why does this scheme break down?
- You have two days instead of one. How few testers can you manage with?
084Four people must cross a narrow bridge at night with one torch. They take 1, 2, 5 and 10 minutes to cross. At most two can be on the bridge at once, a pair walks at the slower person's pace, and the torch must be carried on every crossing. What is the fastest total time?Consulting style brainteasersSales and trading
Try it first
What is the fastest time you can get everyone across?
Show the worked solution
17 minutes. The 1 and 2 cross (2), the 1 returns (1), the 5 and 10 cross together (10), the 2 returns (2), and the 1 and 2 cross again (2). The obvious plan, the fastest person escorting each of the others, takes 19. The saving comes from pairing the two slowest so the 5 minute walk overlaps the 10 minute one.
Why does the escort plan feel right but lose two minutes?
Picture sharing taxis to the airport. Putting the two people with the latest flights in the same cab costs nothing extra for either; putting each in a cab with someone in a hurry makes every ride as slow as its slowest passenger. A pair always moves at the slower pace, so the 5 minute walker is free if he travels with the 10, and costs a full five minutes if he travels with anyone else. The escort plan pays for the 10, the 5 and the 2 separately.
Escorting everyone with the fastest walker takes 19 minutes because the 10 and the 5 each pay for their own crossing, while sending the 10 and the 5 together takes 17, since the 5 minute walk is absorbed inside the 10. How do you know 17 cannot be beaten?
Count what every plan must pay. Five crossings are needed: three trips over and two back with the torch. The 10 must cross at least once, costing 10. If the 5 crosses separately from the 10, that is another 5 on top. Pairing them leaves two forward trips and two returns to do with the 1 and the 2, and the cheapest way to do that is 2 + 1 + 2 + 2. The trade is paying the 2 minute walker an extra return in order to save the 5 minute walker's crossing, and 2 is less than 5 minus 1.
The relationshipa the fastest walker, 1 minute b the second fastest, 2 minutes c the second slowest, 5 minutes What it says in wordsSending the two slowest together wins when two trips by the second fastest cost less than the fastest walker plus the second slowest.The rule is worth stating because it is not always pairing. If the walkers took 1, 4, 5 and 10 minutes, twice 4 is 8, more than 1 plus 5, so escorting wins: 21 minutes against 23 for pairing. Showing the interviewer you know when your trick stops working is better than the trick.
Where candidates lose it
Most candidates find 19 with the escort plan, test one or two variations and declare it optimal, because using the fastest walker for every return looks obviously efficient. The interviewer is waiting to see whether you notice the slow walkers can share a crossing.
The second loss is reaching 17 by trial and error and being unable to say why. Have the one-line reason ready: the 5 hides inside the 10, at the price of one extra 2 minute return.
What the interviewer asks next
- What if the times are 1, 4, 5 and 10?
- Add a fifth person who takes 12 minutes. What is the fastest time now?
- Where does the same logic of batching slow jobs together show up on a deal team?
