Hedge Funds puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 38
- Topics
- 14
- Hard
- 30
024Five rational pirates, ranked A to E by seniority, must split 100 gold coins. The most senior proposes a split and all vote; it passes if at least half vote in favour, the proposer included. Otherwise the proposer is thrown overboard and the next most senior proposes. Each pirate wants first to survive, then to maximise coins, and votes against when indifferent. What does A propose?Prop and quant trading firmsLong-short equity funds
Try it first
What does A propose?
Show the worked solution
A proposes 98 for himself, 0 for B, 1 for C, 0 for D and 1 for E. Work backwards. With two pirates, D's own vote is half, so he keeps all 100. With three, C buys E with 1 coin. With four, B buys D with 1 coin. With five, A needs two votes beyond his own and buys the two pirates who get nothing in the four-pirate split, C and E, for one coin each.
Why start from the end?
Planning a train journey, you work back from when you must arrive, not forward from when you wake up. Each pirate votes by comparing the offer with what he would get if the proposal failed, so you can only price a vote once you know the next round's outcome, which means solving the smallest game first and working upwards. That method, backward induction, is the whole puzzle.
Solving from two pirates upwards gives splits of 100, 0 for two; 99, 0, 1 for three; 99, 0, 1, 0 for four; and 98, 0, 1, 0, 1 for five, because each proposer buys the pirates left with nothing in the next smaller game. How does each round play out?
Two pirates, D and E: D proposes 100 for himself, and his own vote is half, so it passes. Three pirates: C needs one more vote and buys E, who gets nothing in the two-pirate game, for 1 coin: 99, 0, 1. Four pirates: B needs one more vote and buys D, who gets nothing in the three-pirate game: 99, 0, 1, 0. Five pirates: A needs two more votes and buys C and E, both empty-handed in the four-pirate game: 98, 0, 1, 0, 1.
The relationshipn the number of pirates still aboard fallback coins what the voter gets if this proposal fails What it says in wordsA proposer needs half the votes and buys each one for a coin more than that pirate's next-round payoff.What is the interviewer really testing?
Whether you reason about the alternative each party faces rather than about fairness. A vote costs exactly one coin more than what the voter gets if the deal fails, so the cheapest supporters are the ones with the worst fallback. The same logic runs through any negotiation: a creditor backs a restructuring plan when it beats their recovery in liquidation, and support is cheapest from those whose alternative is worst. State the assumptions: perfect rationality, and a pirate who is indifferent votes against, which is why one coin, not zero, is needed.
Where candidates lose it
Candidates reach for a fair split, or reason forwards about who might be angry, and drown. Without the backward chain there is no way to know what any vote costs.
The second slip is offering coins to the wrong pirates: to B, or to D, who already does well in the four-pirate game. Buy the cheapest votes, from the pirates with nothing to lose, and say why.
What the interviewer asks next
- What happens with six pirates?
- What changes if a proposal needs a strict majority to pass?
- What if pirates vote yes when an offer merely equals their fallback?
044You have two identical eggs and a 100-storey building. An egg breaks if dropped from some floor or higher and survives from any floor below it. What is the minimum number of drops that guarantees you find that floor?Prop and quant trading firmsLong-short equity funds
Try it first
Minimum guaranteed number of drops:
Show the worked solution
14 drops. With k drops available, the first egg should go from floor k: if it breaks, the second egg checks the k minus 1 floors below one at a time. If it survives, you have k minus 1 drops left, so the next gap is one smaller. k drops therefore cover k + (k minus 1) + ... + 1 = k(k + 1)/2 floors. 13 drops cover 91 floors, 14 cover 105, so 14 is the minimum: drop from 14, 27, 39, 50 and so on.
Why does binary search fail here?
Binary search assumes you can keep testing after a failure. With two eggs, the first break leaves you one egg, and one egg can only be used safely by walking up one floor at a time. Once the first egg breaks, every floor below it that has not been ruled out costs one drop of the second egg, so large jumps with the first egg are expensive. Dropping the first egg at floor 50 and seeing it break could cost 49 more drops. It is like searching for a leak with one spare pipe: once the first one bursts, you test the rest slowly.
How do you balance the worst cases?
Make every worst case take the same number of drops. If you allow k drops in total, the first drop should be from floor k, the next k minus 1 floors higher, the next k minus 2 higher, because each first-egg drop used leaves one fewer drop for the second egg's walk. With k = 14 the first egg goes from 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99 and 100. If it breaks at 27, the second egg tests 15 to 26: 2 plus 12 is 14 drops. The same count holds at every step.
Dropping the first egg from floors 14, 27, 39, 50 and onward, with each gap one floor smaller, makes every worst case exactly 14 drops, because 14 drops can cover up to 14 x 15 / 2 = 105 floors while 13 drops cover only 91. The relationshipk the number of drops you allow in the worst case k(k+1)/2 the most floors k drops with two eggs can cover What it says in wordsThe smallest k whose triangle number reaches 100 is the answer.Say what an interviewer wants beyond the number. The move is to fix the budget of drops and ask how many floors it can cover, rather than fixing the building and searching for a strategy. That reversal is what makes the problem easy, and it generalises: with three eggs and k drops, the floors covered are the two-egg coverage for each smaller budget, plus one per drop, added up, which is why three eggs need only 9 drops for 100 floors.
Where candidates lose it
The common loss is answering 7 from binary search, which forgets that the second break ends the experiment. The next is 19 from fixed steps of ten, which is safe but not the minimum.
The other loss is reaching 14 by trial and error and not being able to say why 13 fails. Give the k(k + 1)/2 argument: 13 drops cover at most 91 floors.
What the interviewer asks next
- What if you have three eggs?
- With two eggs, how many floors can you handle with 20 drops?
- What is the expected number of drops with your strategy if the breaking floor is uniformly random?
069You have 12 coins that look identical. One is either heavier or lighter than the others, and you do not know which. Using a two-pan balance only three times, find the odd coin and say whether it is heavy or light.Prop and quant trading firmsLong-short equity funds
Try it first
Why is three weighings enough, in principle?
Show the worked solution
Weigh four against four first, then mix suspects with coins you already know are genuine so every later weighing splits the cases three ways. There are 24 possibilities, 12 coins each heavy or light, and three weighings have 27 outcomes. If 1 to 4 balances 5 to 8, weigh 9, 10, 11 against three good coins; if not, weigh 1, 2, 5 against 3, 6, 9. The third weighing settles what is left.
How do you know three weighings can be enough?
A game of twenty questions works because each yes or no halves what is left. A balance is better than a yes or no: it answers left heavy, right heavy or balanced. Three weighings give 3 x 3 x 3 = 27 outcomes, and there are 24 cases to tell apart, 12 coins each possibly heavy or light, so a procedure can exist only if every weighing splits the remaining cases into three near-equal groups. That counting sets the design: the first weighing must leave at most 9 cases on every branch.
Weighing four against four splits the 24 cases into three groups of 8; the second weighing mixes suspects with known good coins to split each 8 into 3, 2 and 3; the third weighing then separates what is left, so all 24 cases fit inside the 27 outcomes. What do you do after the first weighing tips?
Say the left pan was heavy: the odd coin is 1, 2, 3 or 4 and heavy, or 5, 6, 7 or 8 and light. Weigh 1, 2 and 5 against 3, 6 and 9, moving some suspects across and bringing in a known good coin, so each outcome points to a different small group. Left heavy again means 1 heavy, 2 heavy or 6 light: weigh 1 against 2, and a balance means 6. Right heavy means 3 heavy or 5 light: weigh 3 against a good coin. A balance means 4 heavy, 7 light or 8 light: weigh 7 against 8.
What if the first weighing balances?
Then coins 1 to 8 are genuine and the odd coin is among 9 to 12, still heavy or light. Weigh 9, 10 and 11 against three good coins: a tip tells you both that the odd coin is among the three and whether it is heavy or light, and a balance points to coin 12. After a tip, weigh 9 against 10: if the odd coin is heavy the heavier of the two is it, if light the lighter, and a balance means 11. After a balance, weigh 12 against a good coin to learn heavy or light.
Where candidates lose it
The usual loss is weighing six against six first. It wastes the balance outcome, because the odd coin is always in one of the pans, and it leaves 12 cases on a branch that only two weighings, 9 outcomes, must resolve.
The second is forgetting that heavy or light is part of the answer. Candidates find the coin and stop; the counting argument, 24 cases in 27 outcomes, is the proof that you have not left anything to luck.
What the interviewer asks next
- What is the largest number of coins you can handle with three weighings if you must also say heavy or light?
- How does the problem change if you have one extra coin known to be genuine?
- Can you design all three weighings in advance, without looking at the earlier results?
100You have n cars, each with enough fuel to drive 1,000 miles, and cars can transfer fuel to each other on the road. How far can one car get? What happens as n grows?Millennium ManagementLondon · 2024
Try it first
With 4 cars, how far can one car get?
Show the worked solution
1,000 x (1 + 1/2 + 1/3 + ... + 1/n) miles, which grows without limit but only like 1,000 x ln n. Drive all n cars together for 1,000/n miles: together they have burned one tankful, so one car tops up the others and stops. Then n - 1 cars drive 1,000/(n - 1), and so on, until the last car drives a full 1,000. With 4 cars that is about 2,083 miles; with 100, about 5,187.
Why can the fuel not simply be pooled into one car?
Each tank holds exactly 1,000 miles of fuel, so one car can never carry more than that at once. Think of porters carrying water across a desert: the helpers walk part of the way, hand over what they can spare, and drop back. The helper cars exist to keep the lead car's tank full for as long as possible, and they can only do that by travelling with it and burning fuel themselves.
Four cars drive 250 miles together before one refills the other three and stops, three drive 333 more, two drive 500 more and the last drives a full 1,000, reaching 2,083 miles; ten cars reach 2,929 and a hundred reach 5,187. How long is each leg?
With k cars travelling together on full tanks, drive until the group has burned exactly one tankful, which takes 1,000/k miles. Each tank is then 1/k empty, so the k - 1 cars that continue have (k - 1)/k of a tank of space between them, and the car that stops has exactly (k - 1)/k of a tank left to fill it. The legs are 1,000/n, then 1,000/(n - 1), and so on to 1,000 for the last car alone. With four cars: 250 + 333.3 + 500 + 1,000 = 2,083.3 miles. Dropping each helper the moment its fuel can refill the rest keeps as few cars as possible burning fuel at every mile.
The relationshipH_n the harmonic number, 1 + 1/2 + ... + 1/n 1000/k the leg driven while k cars are still moving 0.577 Euler's constant, the gap between H_n and ln n for large n What it says in wordsThe distance is 1,000 miles times the sum of one over each number of cars still driving, which grows like the natural logarithm of the number of cars.What happens as n grows?
The harmonic series never stops growing, so with enough cars there is no ceiling on the distance. But it grows only like the logarithm of n: 10 cars reach about 2,929 miles, 100 cars about 5,187, and each further tenfold increase in cars adds only about 2,303 miles. Reaching 5,000 miles takes 83 cars. That is the pattern worth naming in the room: unlimited in principle, very expensive in practice, the same diminishing return you meet whenever each extra unit of effort adds less than the one before.
Where candidates lose it
The quick wrong answer is n x 1,000 miles, pooling all the fuel, which ignores that no tank holds more than 1,000 and that helpers burn fuel just keeping up. The opposite slip is 1,000 miles, forgetting that fuel can be passed forward at all.
The second loss is reaching the harmonic series and then saying the distance levels off, or that it grows in proportion to n. Name the growth rate: like ln n, unbounded but slow.
What the interviewer asks next
- With 3 cars, exactly how far can one car get?
- Cars may now turn back and refuel at the start. Can the lead car get further?
- Roughly how many cars do you need for one car to travel 5,000 miles?
Asked at Millennium Management, Investments, London, 2024 (Wall Street Oasis):
Suppose you have n cars, each fueled so that they can drive for 1000 miles.
