Quant puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 71
- Topics
- 12
- Hard
- 30
010A company's value to its current owner is equally likely to be anything from Rs 0 to Rs 100 crore, and only the owner knows the figure. In your hands the company would be worth 1.5 times that value. You may make one take-it-or-leave-it offer, which the owner accepts only if it is at least the company's value to them. What should you bid?Quant tradingQuant research
Try it first
Which bid maximises your expected profit?
Show the worked solution
Bid nothing. If a bid of b is accepted, the owner has told you the company is worth less than b to them, so its value is uniform on 0 to b and averages b/2. In your hands that is 1.5 x b/2 = 0.75b, a quarter less than you paid. Expected profit is (b/100) x (0.75b - b) = -b squared/400, negative for every positive bid. This is the winner's curse in its purest form.
Why does 75 look right and fail?
Picture buying a used car from someone who knows its history while you do not. If they agree to your price at once, that is itself news: sellers of good cars refuse low offers. Acceptance is not random; it happens exactly in the states where the company is worth less than you offered, so the average value you actually receive is the average below your bid, not the average overall. The naive 75 uses the unconditional average of 50 and forgets that you only trade when the owner is happy to sell.
The naive line values the company at its overall average and shows profit for any bid under 75, but conditioning on the owner accepting gives expected profit of minus b squared over 400, which is below zero for every positive bid, minus 6.25 crore at a bid of 50. How do you set up the expected profit?
Split it into the chance of a deal and the profit given a deal. A bid of b is accepted with probability b/100; given acceptance the owner's value is uniform on 0 to b, averaging b/2, so your value averages 0.75b and your profit averages minus 0.25b. Multiply: minus 0.25b x b/100, which is minus b squared over 400. At a bid of 50 that is minus 6.25 crore: you win half the time and lose 12.5 crore on average when you do.
The relationshipb your bid in Rs crore b/100 the chance the owner's value is below b b/2 the owner's average value, given that they accepted What it says in wordsThe chance of winning times the loss when you win is negative for every positive bid.When would bidding make sense, and where does this show up on a desk?
The multiplier is the lever. With a multiplier m, the profit given a deal is (m/2 - 1)b, so bidding pays only if you add more than double the owner's value; at exactly 2 you break even, and above 2 you should bid the full 100. On a trading desk the same logic is called adverse selectionThe tendency for the trades you actually get to come from counterparties with better information than you, so they are worse on average than a random trade.: the orders that fill against you are disproportionately the ones from people who know more. A quote that looks profitable against the average counterparty loses against the ones who choose to trade.
Where candidates lose it
Most candidates bid somewhere between 50 and 75, reasoning from the unconditional average value. That ignores the information in the owner's acceptance, which is the entire point of the question.
The second loss is a partial fix: realising acceptance is informative but then bidding a little lower, such as 60, to leave a margin. Any positive bid loses here. Write the expected profit as a function of b and let the algebra say zero.
What the interviewer asks next
- What multiplier would make you willing to bid, and how much would you then bid?
- What if the owner's value is uniform on 50 to 100 instead?
- How does this relate to a market maker who gets filled on their quotes?
022A three-way duel: you hit your target with probability 1/3, B with 2/3, and C never misses. You shoot first, then B, then C, repeating in that order until one person is left, and everyone aims to maximise their own survival. Where should you aim your first shot?Quant tradingQuant research
Try it first
Which first shot gives you the best chance of surviving?
Show the worked solution
Fire into the air. B and C each target the other, the bigger threat, so while both live nobody shoots at you. Aiming in the air gives survival of 2/3 x 3/7 + 1/3 x 1/3 = 25/63, about 39.7%. Aiming at C gives 31.2%, because a hit leaves you in a duel with B shooting first. Aiming at B gives 26.5%, because a hit leaves C, who never misses, to shoot you.
Who does everyone else aim at?
Start with the stronger players, because their choices fix yours. B aims at C, because if B shot you instead, C would kill B next turn for certain; C aims at B, the more dangerous of the two remaining threats. So while all three are alive, nobody is shooting at you. Think of two large firms in a price war while a small competitor stays out of it: the small firm's best move is often to let the giants weaken each other.
Firing into the air gives you 39.7% survival, against 31.2% for aiming at C and 26.5% for aiming at B, because hitting either rival makes you the survivor's only target while missing on purpose lets B and C shoot at each other first. How do you work out the two-player duels?
Against B with you shooting first, you win if you hit now, or if both miss and the same duel restarts. Call your survival x: x = 1/3 + (2/3)(1/3)x, so x = 3/7; if B shoots first, you must survive B's first shot, 1/3 of the time, giving 1/7. Against C you get exactly one shot, since C never misses: 1/3 if you shoot first, 0 if C does. Now combine. In the air: B hits C two times in three, giving you the 3/7 duel; otherwise C kills B and you get your one shot at C, 1/3. Total 25/63.
The relationship3/7 your survival in a duel with B when you shoot first 1/7 your survival in a duel with B when B shoots first 25/63 your survival after a deliberate miss What it says in wordsMissing on purpose beats both targeted shots: 75/189 against 59/189 and 50/189.What is the general lesson?
In a game with several players, weakening one rival can hurt you if it frees the strongest remaining player to turn on you. Your best shot is the one that keeps the others focused on each other. Say the limitation too: the answer depends on the hit rates and the order. Change the order of shooting, or let C aim at you, and the tree changes; the interviewer will often change a number or the order to see whether you rebuild the tree or repeat the slogan.
Where candidates lose it
The instinctive answer is to shoot at C, the most dangerous player. It ignores what happens after a hit: you have just made yourself B's only target, and B shoots first.
The second loss is assuming that firing into the air is allowed but not checking it is optimal. Candidates who have heard the answer before often cannot produce 25/63, 59/189 and 50/189 when asked. The numbers are the answer; the slogan is not.
What the interviewer asks next
- What if your hit rate were 1/2 instead of 1/3?
- What if C shot first and you shot last?
- What is B's overall survival probability when you fire into the air?
033There are 21 matches on the table. Two players alternate taking 1, 2 or 3 matches, and whoever takes the last match loses. Would you rather go first or second, and what is your strategy?Quant tradingProp trading firms
Try it first
First or second?
Show the worked solution
Go second. The player facing 1, 5, 9, 13, 17 or 21 matches loses against good play, and 21 is on that list. Whatever your opponent takes, take 4 minus that, so every round removes exactly 4. They then face 17, 13, 9, 5 and finally 1, and are forced to take the last match.
How do you find the losing positions?
Start from the end of the game, the way you would plan the last few stops of a journey before the first. With 1 match in front of you, you must take it and lose. With 2, 3 or 4, you take enough to leave exactly 1 and win. With 5, every move leaves 2, 3 or 4, each a winning spot for the other player, so 5 loses. A position is losing when every move from it hands your opponent a winning position, and here that happens every 4 matches: 1, 5, 9, 13, 17, 21.
Counting down from 21, the positions 21, 17, 13, 9, 5 and 1 lose for the player about to move; moving second and answering each take of k with 4 minus k keeps the opponent on those positions until they must take the last match. Why does answering with 4 minus k always work?
Your opponent can take 1, 2 or 3; you can always take 3, 2 or 1 in reply. The pair of moves removes exactly 4 matches whatever they chose, so you control the count at the end of every round. From 21 the rounds end at 17, 13, 9 and 5, and then your opponent faces a single match. The number 4 is the maximum take plus one; that is where the period comes from.
A short check you can say aloud: the game has only 21 positions, and marking each as winning or losing from the bottom up, a position wins if any move reaches a losing one, reproduces the list 1, 5, 9, 13, 17, 21. If the pile had been 20, you would go first and take 3 to leave 17. This type of game has a backward inductionSolving a game by working out the best move at the last step first, then the step before, back to the start. solution, and the interviewer mainly wants to hear you build it from the end.
Where candidates lose it
The usual loss is playing forward: taking a few matches and hoping to spot the pattern mid-game. Under time pressure that becomes guessing. Work back from one match and the period of 4 appears in three steps.
The other slip is copying the rule for the version where taking the last match wins. There the losing spots are multiples of 4, and 21 means you should go first and take 1. Read which way the last match counts before you answer.
What the interviewer asks next
- What if taking the last match wins instead?
- What if each player may take 1 to 4 matches?
- What if there are two piles and you may take any number from one pile?
045Simplified poker with three cards, A, K and Q: each player antes 1, you are dealt one card and I am dealt another. You may bet 1 or check; if you bet, I call or fold, and if you check the higher card wins the antes. How often should you bluff with the Q, and how often should I call with the K, in equilibrium?Old Mission CapitalNew York · 2022
Try it first
How often should I call a bet when I hold the K?
Show the worked solution
Bluff with the Q one time in three, and call with the K one time in three. You always bet the A and always check the K; I always call with the A and fold the Q. A Q bluff risks 1 more to win the 2 antes, so I must defend two thirds of hands facing it: the A gives half, the K calling one time in three gives the rest. The game is worth 1/18 per hand to you.
Which hands are easy, and where is the real decision?
Clear away the obvious hands first. With the A you always bet, because you win whether I call or fold. With the K, betting only gets called by the A and folds out the Q, which you beat anyway, so you check. As the caller, I always call with the A and always fold the Q. The whole game comes down to two mixed choices: how often you bluff with the Q, and how often I call with the K.
In equilibrium the bettor always bets the A, always checks the K and bluffs the Q one time in three, while the caller always calls the A, folds the Q and calls with the K one time in three; together the A and the K calls defend two thirds of hands facing a bluff. How do the indifference conditions fix both frequencies?
A teacher who spot-checks homework faces the same logic: check every paper and time is wasted, never check and everyone copies, check at the right rate and copying stops paying. In equilibrium each player mixes at the rate that makes the other indifferent between their two options. Your Q loses 1 by checking. Bluffing loses 2 against my A, and against my K loses 2 if I call and wins 1 if I fold. The two are equal only when I call with the K one time in three. My K loses 1 by folding; calling loses 2 against your A and wins 2 against a bluff, which is worth -1 only when you bluff one time in three.
The relationshipc how often the caller calls with the K b how often the bettor bluffs with the Q -1 the payoff of the alternative: checking the Q or folding the K, losing the ante What it says in wordsEach frequency is set so the opponent's two choices are worth the same.Check against the pot-odds rule. A bluff risks 1 extra to win the 2 antes, so the caller must defend 2/(2 + 1) = 2/3 of the hands facing it; the A already covers half, and the K calling one time in three covers the other sixth. That two thirds is the number people misremember as the K's calling rate. Put the strategies together and the bettor, who acts first with more information about their own hand, earns 1/18 of a chip per hand. The limitation: with a bigger bet or more cards the ratios change, but the method, indifference on both sides, carries over.
Where candidates lose it
The common loss is setting the K's calling rate to two thirds. Two thirds is the total defence the caller needs against a bluff, and the A already provides half of it, so the K calls only one time in three.
The second is never bluffing because the Q cannot win a showdown. A player who never bluffs lets the caller fold every K to a bet, and the A's bets stop earning. The bluff is what gets the A paid.
What the interviewer asks next
- What is the value of the game to each player?
- The bet size doubles to 2. How do the bluffing and calling frequencies change?
- Now the caller may also bet after a check. What changes?
Asked at Old Mission Capital, Quantitative Research, New York, 2022 (Wall Street Oasis):
Asking to find the game theory optimal strategy in a simplified poker game
059We play a coin game. I pick a sequence of three heads or tails, you then pick a different sequence after seeing mine, and we flip a fair coin until one of the two sequences appears; whoever's comes first wins. I pick HHH. What do you pick, and how often do you win?Quant tradingProp trading firms
Try it first
Which reply to HHH is best?
Show the worked solution
Pick THH; you win 7 times in 8. HHH can only win if the first three flips are all heads, which has chance 1/8. In any other run, the first HHH is preceded by a tail, and that tail with the next two heads spells THH, which is completed one flip before HHH. So THH wins every game except the one that opens with three heads.
Why is this not a fair race between two 1/8 sequences?
Think of two runners on the same track where one always starts one step ahead of the other on the only route to the finish. Their speeds are identical but the race is not even. In a race between patterns, what matters is not how often each appears but which one tends to appear first, and that depends on how the patterns overlap. THH is built from HHH's own first two heads with a tail placed in front, so it ambushes HHH whenever HHH has not already won at the start.
HHH wins only when the first three flips are heads, a 1/8 chance; in every other run the first HHH is preceded by a tail, so THH is completed one flip earlier and wins the remaining 7/8 of games. How do you prove 7/8 without a Markov chain?
Look at the first time HHH appears. If it does not start at flip 1, the flip immediately before it must be a tail, because otherwise an earlier HHH would already have appeared. That tail plus the first two heads of the HHH is THH, finished one flip before HHH. So HHH wins only if flips 1 to 3 are heads, chance 1/8, and THH wins otherwise: 7/8. The proof is one sentence, and interviewers want to hear it rather than a transition matrix.
What is the general lesson for the second mover?
This is Penney's gameA coin sequence race in which the second player, choosing after seeing the first, can always pick a sequence that wins more than half the time., and the second player always has an edge because the winning relation among three-flip sequences is not transitive: every sequence has another that beats it. The recipe: take the opponent's first two flips, and put in front of them the opposite of the opponent's second flip. Against HHH that gives THH at 7/8; against HTH it gives HHT at 2/3. In trading terms, a strategy that looks as good as any other in isolation can still lose systematically to one designed around it.
Where candidates lose it
The trap is answering that every sequence has probability 1/8, so the game is fair, or picking TTT because it has nothing in common with HHH. Both treat the race as independent draws of three flips rather than a stream where patterns overlap.
The second trap is reaching for a four-state Markov chain and running out of time. The tail-before-the-run argument settles it in one sentence; set up the chain only if asked about a harder pair.
What the interviewer asks next
- I pick HTH. What do you pick, and how often do you win?
- What is the expected number of flips to see HHH, and to see THH?
- Why can no three-flip sequence be the best first choice?
071We play a matching game: each of us shows heads or tails at the same moment. If both show heads I pay you 3; if both show tails I pay you 1; if we mismatch you pay me 2. What mix should I use to make you indifferent, what mix should you use, and what is the game worth to you per round?Quant tradingQuant research
Try it first
What is the game worth to you per round?
Show the worked solution
I show heads 3/8 of the time; so should you; and the game is worth -1/8 to you per round. At my mix q, your heads pays 3q - 2(1 - q) and your tails pays -2q + (1 - q). Setting them equal gives q = 3/8, where both pay -1/8. By the same algebra your 3/8 mix makes my choices equal, so neither of us can improve: the table looks fair and is not.
Why do I randomise to make you indifferent, not to help myself?
Think of a penalty taker and a goalkeeper. If the taker shoots left more often than he should, the keeper dives left and gains; any pattern is exploited. In a zero-sum game, the mix that protects you is the one that leaves your opponent with nothing to exploit, which means making every one of their choices pay the same. So I do not pick my heads probability by looking at my own payoffs in isolation; I pick it so that your heads and your tails earn you equal amounts. Then it no longer matters what you do.
Your payoff from heads rises and your payoff from tails falls as my heads probability grows; they cross at 3/8, where each pays -1/8, so that is my equalising mix and the most you can secure per round. How do the two equations give 3/8 and -1/8?
Let q be my chance of heads. Your heads earns 3q - 2(1 - q) = 5q - 2 and your tails earns -2q + 1(1 - q) = 1 - 3q, and they are equal when 8q = 3, at q = 3/8. Plug back in: 5(3/8) - 2 = -1/8. For your side, let p be your chance of heads; my payoffs are the negatives of yours, and because the table is symmetric the same algebra gives p = 3/8. At those mixes, each cell's frequency is HH 9/64, TT 25/64 and the two mismatches 15/64 each: 3(9) + 1(25) - 2(30) = -8, over 64, is -1/8.
The relationshipq my probability of showing heads 5q - 2 your expected payoff from showing heads 1 - 3q your expected payoff from showing tails V the value of the game to you per round What it says in wordsMy heads probability is set where your two choices earn the same, and that common amount is what the game is worth to you.Why does a table with equal wins and losses favour me?
Because the cells are not played equally often. Your big win needs both of us on heads, and I can make that cell rare; the mismatches, where I win, happen 30 times in 64 at equilibrium. If I played heads half the time you could earn +1/2 by always showing heads, so a naive 50/50 from me would be a gift. In trading the same idea sets a market maker's quotes: they are placed so that the informed side has no choice that beats the others, not so that the market maker profits on any one trade.
Where candidates lose it
The trap is adding up the table, 3 + 1 against 2 + 2, and calling the game fair. Equilibrium frequencies are not a quarter each, so a table's totals tell you nothing about its value.
The second slip is solving for the mix that maximises your own payoff against a fixed opponent. In a mixed equilibrium each player's mix is pinned down by the other player's payoffs; say that sentence before the algebra.
What the interviewer asks next
- If I play heads half the time, what should you do and what do you earn?
- What payoff for both tails would make the game fair?
- How does the answer change if the mismatch payment is 3 instead of 2?
081A six-chamber revolver holds two bullets in adjacent chambers. The cylinder is spun, the interviewer pulls the trigger on himself and it clicks on an empty chamber. It is now your turn. Do you want him to spin the cylinder again first, or pull straight away?SchonfeldCentral · 2022
Try it first
Which gives you the better chance of surviving?
Show the worked solution
Do not spin: pulling straight away survives with probability 3/4, against 2/3 with a spin. The click tells you the hammer sat on one of the four empty chambers. Because the two bullets are adjacent, the four empties form a run, and only the last empty in that run is followed by a bullet. A spin throws that information away and resets you to 4 empties out of 6.
What does the click actually tell you?
Think of a row of six houses where two neighbours keep dogs. You knocked at a random house and no dog barked. If you now try the next house along, you are only in trouble if you had knocked on the one house sitting just before the dogs. The click narrows the hammer's position to the four empty chambers, and the question becomes how many of those four have a bullet immediately after them. With the bullets side by side, the empties run 3, 4, 5, 6 in firing order, and only chamber 6 hands over to a bullet.
With two adjacent bullets, only one of the four empty chambers is followed by a bullet, so pulling straight away after a click survives 75% of the time, while a fresh spin survives only 66.7%, four empties out of six. The relationshipempties followed by an empty chambers 3, 4 and 5 in firing order 4/6 the survival chance of a fresh, random chamber What it says in wordsWithout a spin you are conditioning on the click, which helps; a spin forgets it.Does the answer depend on the bullets being adjacent?
Completely, and that is the follow-up most interviewers ask. If the two bullets are not next to each other, the empties split into two runs, two empties now sit in front of a bullet, and pulling straight away survives only 1/2, worse than the 2/3 of a spin. The same count works for bullets one apart or directly opposite: in both cases two of the four empties are followed by a bullet. So the rule is not spin or do not spin; it is count the empties that border a bullet and compare with a fresh spin.
What is the general lesson for a trading interview?
A random reset destroys information, and information has value only if the structure of the problem lets you use it. Here the structure is clustering: the bullets sit together, so a safe chamber is likely followed by another safe one. Markets have the same feature in volatility: a calm day tends to be followed by a calm day, so conditioning on what just happened beats assuming each day is a fresh draw. Say that link in one line after the arithmetic.
Where candidates lose it
The common error is to treat both options as a fresh draw and say it makes no difference, or to say a spin is safer because it resets the odds. Both ignore the click, which is the one piece of information you were given.
The second loss is getting 3/4 without seeing that it hinges on adjacency. Say that with the bullets apart the answer flips to spin, and give the count, two bordering empties out of four.
What the interviewer asks next
- The two bullets are placed in random chambers, not necessarily adjacent. Spin or not?
- Three adjacent bullets and a click. Spin or not?
- After two clicks in a row without spins, what is your survival chance on the third pull?
Asked at Schonfeld, Quantitative Research, Central, 2022 (Wall Street Oasis):
Coding, requires to know DP and divde and conquer., Russian Roulette
093Three dice: red has faces 2, 6 and 7; green has 1, 5 and 12; blue has 3, 4 and 8, each face appearing twice. You and I each pick a die and roll once, and the higher number wins. Which die do you want, and does it matter who picks first?Belvedere TradingChicago · 2022
Try it first
Which die is best against the other two?
Show the worked solution
No die is best: red beats green, green beats blue and blue beats red, each with probability 5/9. So who picks first matters a great deal. Let me choose, then take the die that beats mine and win 5/9 of the time. If you are forced to pick first, every choice loses 5/9 of the time against an opponent who knows the cycle.
How do you work out who beats whom?
Each matchup has only nine equally likely pairs of faces, so write the 3 by 3 grid and count. Red against green: red's 2 beats only the 1, while its 6 and 7 each beat the 1 and the 5, for 1 + 2 + 2 = 5 wins out of 9. Do the same for the other two pairs and every matchup comes out 5 to 4: red over green, green over blue, blue over red. It is rock, paper, scissors built out of dice, and in rock, paper, scissors nobody asks which hand shape is best.
Counting the nine face pairs in each matchup shows red beats green, green beats blue and blue beats red, each in 5 of 9 cases, so the three dice form a cycle and the second player can always pick a die that wins 5/9 of the time. The relationshipP(R > G) the chance red's roll beats green's 1 + 2 + 2 the wins for red's faces 2, 6 and 7 in turn What it says in wordsCount, face by face, how many of the opponent's three faces each face beats, and divide by nine.Why does green lose to red when green has the higher average?
The averages are red 5, green 6 and blue 5. Winning is about how often, not by how much. Green's 12 wins every time it shows, but it shows only a third of the time, and green's other two faces, 1 and 5, lose to both of red's high faces. A higher mean and a higher chance of winning are different things, and the gap between them is the whole puzzle. Change the rules so the winner collects the difference between the two numbers, and green's expected margin against red is 6 - 5 = +1: now you want green against red, and blue against red is a dead heat at 0.
Where does a trader meet the same thing?
Head-to-head comparisons need not line up into a ranking. Strategy A can beat strategy B on more days than not, B can beat C, and C can beat A, whenever one of them earns its money in rare large wins, as green does. Before choosing between strategies, decide whether you care about how often you win or how much you make, because under the first a cycle like this one means there may be no best choice at all. The limitation of the puzzle is that it is one roll; over many rolls with the total score counted, the mean matters more and green's 12 starts to pay.
Where candidates lose it
The common slip is choosing green because its average, 6, is highest. The game pays for winning, not for margin, and green loses to red five times in nine.
The second loss is answering the first question and missing the second. Because the dice form a cycle, the real answer is strategic: insist that your opponent picks first. Saying that unprompted is what the interviewer is listening for.
What the interviewer asks next
- If each player rolls their die twice and adds the results, does the cycle still hold?
- Design three dice whose faces sum to the same total and still form a cycle.
- With three players each taking one die, can any die be favoured against both others?
Asked at Belvedere Trading, Prop Trading, Chicago, 2022 (Wall Street Oasis):
You have 3 dice: red has 2, 6, 7; green has 1, 5, 12; blue has 3, 4, 8.
