Hedge Funds puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 38
- Topics
- 14
- Hard
- 30
007You have two ropes. Each burns completely in exactly 60 minutes, but unevenly, so half a rope need not take 30 minutes. With a lighter and nothing else, how do you measure exactly 45 minutes?Prop and quant trading firmsLong-short equity funds
Try it first
What is the first move?
Show the worked solution
Light rope one at both ends and rope two at one end at the same moment; when rope one burns out, light rope two's other end, and it burns out at 45 minutes. Two flames always meet after burning 60 minutes of rope between them, so rope one takes 30 minutes however uneven it is. Rope two then has 30 minutes left, which two flames finish in 15.
Why does lighting both ends halve the time on an uneven rope?
Picture two people eating a long, uneven sandwich from opposite ends, each chewing through whatever is at their end. However the filling is spread, they meet once the whole sandwich has been eaten between them, and together they finish in half the time one would take. Two flames consume the rope's total burn time twice as fast, so a 60 minute rope lit at both ends is gone in 30 minutes, wherever the flames happen to meet. Length tells you nothing here; burn time is the only quantity you can trust.
Rope one, lit at both ends, is gone at 30 minutes; rope two, lit at one end at the start, has 30 minutes of burn left at that moment, and lighting its other end finishes it 15 minutes later, at 45 minutes. The relationship60/2 rope one, burned from both ends (60 - 30)/2 rope two's remaining burn time, burned from both ends What it says in wordsEvery step halves a known amount of burn time; nothing depends on where along the rope the time is stored.Why is this really a question about information?
The rope hides where its time is stored, much as an order book hides how much size is waiting behind a price. The solution uses only what is known, the total burn time, and never what is not, how it is spread along the rope. Anyone who cuts a rope in half is assuming evenness that the first sentence ruled out. Say that out loud before you give the method: naming what you may not assume is half of a good answer.
Expect the follow-up. The same trick measures 15 minutes as an interval, the gap between rope one going out and rope two going out. Each rope lit from its second end at a known moment halves whatever burn time it has left, and chaining those halvings is how you reach times such as 52.5 minutes with a third rope. Walk through the chain in order, one lighting at a time.
Where candidates lose it
The instinctive answer cuts or folds a rope, which quietly assumes it burns evenly. The question rules that out in its first sentence, and an interviewer will stop you there.
The subtler slip is lighting rope two late. It has to be lit at the very start, alongside rope one, so that exactly 30 minutes of its burn time are gone when rope one finishes. Say that both lightings happen together.
What the interviewer asks next
- How would you measure 15 minutes?
- With one rope, which times can you measure?
- With three such ropes, how do you measure 52.5 minutes?
018One hundred lockers start closed. Person 1 toggles every locker, person 2 toggles every second locker, person 3 every third, and so on up to person 100. Which lockers end open?Prop and quant trading firmsLong-short equity funds
Try it first
Which lockers end open?
Show the worked solution
The ten perfect squares: 1, 4, 9, 16, 25, 36, 49, 64, 81 and 100. Locker n is toggled once by each person whose number divides n, so its final state depends on how many divisors n has. Divisors come in pairs, d and n/d, which cancel out. Only a perfect square has an unpaired divisor, its square root, so only squares are toggled an odd number of times and end open.
What decides whether one locker ends open?
A light switch flipped an even number of times ends where it started; flipped an odd number of times, it ends the other way. Each locker is a switch, flipped once for every divisor of its number, so the question is which numbers from 1 to 100 have an odd number of divisors. Locker 12 is touched by persons 1, 2, 3, 4, 6 and 12, six times, and ends closed.
Of the 100 lockers only the ten perfect squares end open, because locker 12 and every non-square has its divisors in pairs, an even number of toggles, while locker 36 and every square has one unpaired divisor, its square root. Why do only perfect squares have an odd number of divisors?
Pair every divisor d with n divided by d. For 12 the pairs are 1 and 12, 2 and 6, 3 and 4: six divisors, even. The pairing breaks only when a divisor is paired with itself, d = n/d, which happens exactly when n is a perfect square. For 36 the pairs are 1 and 36, 2 and 18, 3 and 12, 4 and 9, with 6 left over: nine divisors, odd, so locker 36 ends open. There are ten squares up to 100, so ten lockers.
The relationshipd a divisor of the locker number n n/d its partner divisor What it says in wordsDivisors cancel in pairs, and only a perfect square leaves one divisor without a partner.Why does a fund ask a puzzle like this?
It tests whether you look for structure before you simulate. Walking through a hundred people toggling lockers is hopeless in an interview; turning it into a question about divisors takes one sentence and makes the answer obvious. The move, recasting a process as a property you can count, is the one that turns a messy trading rule into a quantity you can compute. Check it on a small case out loud: with 10 lockers, 1, 4 and 9 end open.
Where candidates lose it
Candidates start simulating: person 1 opens everything, person 2 closes the evens, person 3 toggles multiples of 3, and they lose track by person 5. The interviewer wants you to stop and ask what decides one locker's final state.
The other miss is answering the primes. A prime is touched exactly twice, by person 1 and by the person with its own number, so every prime ends closed.
What the interviewer asks next
- Which lockers are toggled exactly three times?
- With 1,000 lockers, how many end open?
- Which locker under 100 is toggled the most, and how many times?
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?
032Two ice cream sellers each choose a spot on a straight 1 km beach. Sunbathers are spread evenly along it and each walks to the nearer seller. Where do the sellers end up, and is that the best outcome for the customers?Prop and quant trading firmsLong-short equity funds
Try it first
Where do two self-interested sellers settle?
Show the worked solution
Both end up side by side in the middle, and customers are worse off. From the quarter points, a seller who steps inward keeps everyone behind them and wins beach from the rival, so both drift to the centre. There they still split customers half and half, but the average walk doubles from 125 m to 250 m. Competition moves the sellers to the spot that maximises share, not the one that serves customers best.
Why can neither seller stay at the quarter points?
Picture two petrol pumps on a highway. Each wants the drivers on its own side plus as many from the middle as it can reach first. A seller keeps every customer on the far side of them wherever they stand, so moving towards the rival only ever adds customers. From 250 m, A steps to 400 m against B at 750 m: the dividing line moves to the midpoint, 575 m, and A's share rises from 50% to 57.5%. B then responds the same way, and the dance ends only when both stand at 500 m.
Sellers at the quarter points split the beach evenly with an average walk of 125 m; when A edges inward to 400 m it wins 57.5% of the beach, and the process ends with both at the middle, still splitting 50/50 but with the average walk doubled to 250 m. What does the middle cost the customers?
With both sellers in the centre, a sunbather is on average a quarter of the beach away, 250 m. With sellers at 250 m and 750 m, nobody is more than 250 m away and the average is 125 m. The shares are identical in both setups; the only thing that changed is how far customers walk, so the stable outcome is strictly worse for them and no better for the sellers. This is the {term('Hotelling model', 'A model of competition on a line, set out by Harold Hotelling in 1929, in which rivals crowd towards the centre to win the middle ground.')}, and it is why rival shops cluster and why two parties often converge on the middle voter.
Say the equilibrium idea in one line: a pair of positions is stable when neither player can do better by moving alone, and the middle is the only such pair here. Then say where the model breaks: if customers stop buying when the walk is too long, or if prices can differ, the sellers have a reason to spread out again. Interviewers ask this to see whether you can reason about another player's best response, which is most of trading.
Where candidates lose it
The common loss is answering the quarter points, because that is the sensible arrangement. The question asks where self-interested sellers end up, and the quarter points are not stable.
The second loss is getting to the middle but not saying what it costs. The interviewer wants the contrast: same shares, twice the walking. Name the stable point, then name the welfare cost.
What the interviewer asks next
- What happens with three sellers?
- If customers refuse to walk more than 300 m, where do the sellers stand?
- Where do you see the same pattern in markets or in fund positioning?
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?
093Four 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 cross at a time, a pair moves at the slower person's pace, and the torch must be carried on every crossing. What is the fastest time for all four to get across?Prop and quant trading firmsLong-short equity funds
Try it first
What is the fastest crossing?
Show the worked solution
17 minutes. 1 and 2 cross (2 minutes), 1 returns (1), 5 and 10 cross together (10), 2 returns (2), and 1 and 2 cross again (2). The total is 17. The obvious plan, with the fastest person escorting everyone, takes 19, because the 5 and the 10 each cost a separate crossing. Pairing the two slowest hides the 5 inside the 10.
Why is the obvious plan not the fastest?
The natural plan uses the quickest person as a shuttle: 1 walks each person over and comes back. That costs 2 + 1 + 5 + 1 + 10 = 19. Every slow person who crosses on a separate trip pays their own time in full, so the 5 and the 10 together cost 15 minutes of crossing. Think of sending two slow parcels in one courier van instead of two: the second rides along for free.
The shuttle plan spends 5 and 10 minutes on separate crossings and takes 19 minutes, while sending 5 and 10 together costs 10 minutes for both and brings the total to 17, even after the 2-minute person makes one extra return trip. How does the 17-minute plan pay for pairing the slow two?
Pairing 5 and 10 costs 10 instead of 15, a saving of 5. But someone fast must already be waiting on the far side to bring the torch back afterwards. That setup costs one extra return by the 2-minute person and an extra crossing of the pair 1 and 2, so the net saving is 2 minutes: 19 down to 17. The general rule: pair the two slowest when twice the second-fastest time is less than the fastest plus the second-slowest, here 4 against 6.
The relationship10 the one crossing that carries both the 5-minute and the 10-minute person 2 + 2 the extra cost of having the 2-minute person bring the torch back and cross again What it says in wordsPairing the two slowest saves 5 minutes of crossing at a cost of 3 extra minutes of torch returns and re-crossing.How do you show 17 is the minimum?
Five crossings are unavoidable: three over and two back. If the 5 and the 10 cross separately, the forward trips cost at least 10 + 5 + 2 and the two returns at least 1 each, which is 19; if they cross together, the person who returns next must already be across, which forces the returns to be the 1 and the 2, and the best total is 17. Talking through that bound is what separates a remembered answer from a reasoned one, and it is what lets you handle the follow-up with different times.
Where candidates lose it
19 minutes is the answer most people reach, and it comes so quickly that they stop there. The interviewer is waiting to see whether you ask what the 5-minute person costs and whether that cost can be hidden.
The second loss is finding 17 by trial and error without the reason. Name the saving, 5 minutes from pairing, and its price, the extra return and re-crossing; that is what makes the answer hold when the interviewer changes the times.
What the interviewer asks next
- The times are 1, 5, 6 and 10. Does pairing the two slowest still help?
- Add a fifth person who takes 20 minutes. What is the fastest crossing now?
- State the general rule for when to pair the two slowest walkers.
