Fin Maverick
Foundations VocabularyAccounting & ReportingEconomics & MacroQuant Methods & ProgrammingBusiness & Company AnalysisCorporate Finance & ValuationBehavioural Finance
Banking & Market InfrastructureFixed Income & RatesDerivatives & Structured ProductsPublic EquitiesTransactions & DealsPortfolio ConstructionFunds & AMCs
Private Markets & AlternativesRisk, Treasury & ControlAI & Digital FinanceStochastic Calculus & PricingWealth & Personal FinanceIndian Markets & RegulationProfessional Practice
Explore NISM prep
Series-VIII · Equity DerivativesSeries-XII · Securities Markets FoundationSeries-V-A · Mutual Fund DistributorsSeries-XV · Research AnalystSeries-XIX-E · Category III AIF ManagersSeries-XIX-D · Category I & II AIF ManagersSeries-XIX-C · Alternative Investment Fund ManagersSeries-XVI · Commodity DerivativesSeries-VI · Depository OperationsSeries-II-A · Registrars & Transfer AgentsSeries-I · Currency DerivativesSeries-VII · Securities Operations & Risk Management
Explore Bootcamps
Equity ResearchPortfolio ManagementMutual Fund MasteryInvestment Banking Analyst
Private Equity AnalystQuant & Hedge Fund AnalystBreaking Into VCFinancial Analyst Program
Risk Management ProgramPrivate Wealth ManagementDebt Capital MarketsDerivatives Foundation
Explore Free Courses

Equity Research6

Writing an Investment ThesisBuilding a Discounted Cash FlowReading an Annual Report FastReading a Sector Before a CompanySpotting Quality of Earnings Red FlagsBuilding a Revenue Forecast From Drivers

Portfolio Management3

Rebalancing: When, Why and What It CostsStrategic and Tactical Asset AllocationMeasuring Risk in a Portfolio

Mutual Fund Mastery3

Comparing Funds Without Being FooledHow a NAV Is Struck and Which Day You GetReading a Fund Factsheet Properly

Derivatives Unlocked4

Hedging a Real ExposureThe Greeks, PracticallyFutures, the Basis and What Moves ItReading an Option Payoff

AI For Finance2

Retrieval and Grounding for FinanceDocument Extraction in Finance

Breaking Into Quants4

Backtesting a StrategyHypothesis TestingCleaning Financial DataRegression for Finance

Breaking Into VC3

Sizing a MarketReading a Term Sheet as a FounderHow a Venture Round Actually Works

Financial Analyst Program4

Common Size and Trend AnalysisReading a Cash Flow StatementRatio Analysis That Says SomethingBuilding a Working Capital Schedule

Risk Management Program2

Credit Exposure and How It Is ReducedValue at Risk and What It Hides

Investment Banking Analyst3

Precedent Transactions and Why They DifferReading a Term Sheet StructurallyBuilding a Comparable Companies Table

Private Wealth Management3

Tax Aware Portfolio DecisionsBuilding a Client Risk ProfileGoal Based Planning Arithmetic

Debt Capital Markets3

Analysing an Issuer's CreditDuration and What It Does Not Tell YouBond Pricing and Yield Mechanics

Private Equity Analyst2

Fund Waterfalls and CarryThe LBO in Structure

Hedge Funds Analyst2

Short Selling MechanicsLong Short Mechanics
QuarksCourses
Explore Interview Preparation
Investment BankingEquity ResearchVenture CapitalistPrivate EquityHedge Funds
QuantFinancial AnalysisPrivate Wealth ManagementDebt Capital MarketsRisk Management
Derivatives FoundationPortfolio ManagementMutual Fund Mastery
PartnershipsShowdown
Log inSign up
Interview tracksAll
1Investment Banking
Question bankPuzzlesCase studies
2Equity Research
Question bankPuzzlesCase studies
3Venture Capital
Question bankPuzzlesCase studies
4Private Equity
Question bankPuzzlesCase studies
5Hedge Funds
Question bankPuzzlesCase studies
6Quant
Question bankPuzzlesCase studies
7Financial Analysis
Question bankPuzzlesCase studies
8Private Wealth Management
Question bankPuzzlesCase studies
9Debt Capital Markets
Question bankPuzzlesCase studies
10Risk Management
Question bankPuzzlesCase studies
11Derivatives Foundation
Question bankPuzzlesCase studies
12Portfolio Management
Question bankPuzzlesCase studies
13Mutual Fund Mastery
Question bankPuzzlesCase studies

Quant puzzles, solved step by step

Puzzles
100
Traced to a firm
71
Topics
12
Hard
30
Topic
All topicsLogic and algorithmic reasoning10Conditional probability and Bayes7Counting and combinatorics8Continuous and geometric probability9Correlation, regression and linear algebra9Market making, betting and sizing9Expected value and optimal stopping9Statistics and estimation9Pricing, options and index maths7Games and strategic reasoning8Markov chains and random walks7Mental maths and number sense8
Level
AnyWarm upCoreHard
Source
AnyReported at a firmStandard
Showing 11–17 of 17 · filtered from 100Clear filters
  1. 058A bet pays 2 to 1 and wins 40% of the time. What fraction of your bankroll does the Kelly criterion stake on each bet, what long-run growth rate does that give, and what happens if you bet twice that fraction?Market making, betting and sizingCoreQuant tradingOptions market making

    Try it first

    At twice the Kelly stake, what happens to long-run growth?

    Show the worked solution

    Stake 10% of the bankroll; that grows wealth by about 0.97% a bet, and twice Kelly grows it by only about 0.07%. Kelly is edge over odds: (2 x 0.4 - 0.6)/2 = 0.1. The growth rate is 0.4 ln(1.2) + 0.6 ln(0.9). At 20% the losses compound away almost the whole edge, and above about 20.4% the bankroll shrinks in the long run despite a positive expected value.

    Why not bet as much as possible on a good bet?

    Think of a shopkeeper with a profitable weekly sale who puts the entire shop's stock on it every week. The average week is good, but one bad week ends the business. With repeated bets, wealth multiplies, so what matters is the average of the log of each outcome, not the average outcome, and a big loss costs more in log terms than an equal gain earns. This bet has a clear edge: each rupee staked returns 0.4 x 2 - 0.6 = Rs 0.20 on average. The question is how much of that edge survives compounding at each stake size.

    How do you get the Kelly fraction and the growth rate?

    Stake a fraction f. A win multiplies wealth by 1 + 2f, a loss by 1 - f, so the growth per bet is g(f) = 0.4 ln(1 + 2f) + 0.6 ln(1 - f). Set the derivative to zero: 0.8/(1 + 2f) = 0.6/(1 - f), giving f = 0.1. The Kelly stake is the edge divided by the odds, (bp - q)/b = 0.2/2 = 10%. Plugging in, g = 0.4 x 0.1823 - 0.6 x 0.1054, about 0.97% a bet, so the typical path doubles its wealth roughly every 71 bets.

    Growth per bet against stake: the peak is at 10%, zero at about 20%-0.5%+0.5%+1.0%00%5%10%15%20%Fraction of bankroll staked on each betKelly 10%: +0.97% a betHalf Kelly: +0.73%,76% of the growthTwice Kelly: +0.07%, about zeroabove about 20.4%:the bankroll shrinks
    Long-run growth peaks at 0.97% a bet at the Kelly stake of 10%; half Kelly keeps 76% of that growth, twice Kelly keeps almost none of it at 0.07%, and any stake above about 20.4% shrinks the bankroll over time.
    The relationship
    f∗=bp−qb=2(0.4)−0.62=0.10g(f)=pln⁡(1+bf)+qln⁡(1−f),g(0.10)≈0.97%f^* = \frac{bp - q}{b} = \frac{2(0.4) - 0.6}{2} = 0.10 \qquad g(f) = p\ln(1+bf) + q\ln(1-f),\quad g(0.10) \approx 0.97\%
    bthe net odds, 2 to 1
    p, qthe chances of winning and losing, 0.4 and 0.6
    g(f)expected log growth of wealth per bet at stake f
    What it says in wordsKelly maximises the expected log of wealth, and its stake is the edge divided by the odds.

    Why is overbetting so much worse than underbetting?

    Near the peak the growth curve is close to a parabola, so the cost of a sizing error grows with its square. Half Kelly gives up only about a quarter of the growth, while twice Kelly gives up nearly all of it, and three times Kelly shrinks wealth at about 2.6% a bet. Real edges are estimated, not known, so a trader who thinks the win rate is 40% but faces 35% is already overbetting at the full 10%. That asymmetry is why desks size at a fraction of Kelly.

    Where candidates lose it

    The first trap is stopping at the positive expected value and saying bet big. The interviewer is testing whether you know that repeated multiplicative bets are judged by log growth, where volatility itself costs money.

    The second is misremembering the formula as p - q or as p/b. Derive it from the log growth in two lines; it is faster than recalling and it proves you know where it comes from.

    What the interviewer asks next

    • What is the Kelly fraction for an even-money bet that wins 55% of the time?
    • Why might a trader deliberately stake half Kelly?
    • How would you size two independent simultaneous bets like this one?
  2. 062A symmetric random walk starts at 0 and moves up or down by one each step with equal probability. What is the expected number of steps until it first reaches +3 or -3?Markov chains and random walksCoreQuant researchQuant trading

    Try it first

    What is the expected number of steps to hit +3 or -3 from 0?

    Show the worked solution

    9 steps. Let E(k) be the expected steps left from state k. Each step costs one and lands on a neighbour with equal chance, so E(k) = 1 + (E(k - 1) + E(k + 1))/2, with E(3) = E(-3) = 0. The solution is E(k) = (3 - k)(3 + k): 9 from 0, 8 from plus or minus 1, 5 from plus or minus 2. A symmetric walk needs about the square of the distance to travel it.

    Why is the answer not 3?

    Think of someone pacing a narrow corridor, choosing left or right at random with every step. They do reach a wall eventually, but they spend most of their time doubling back. A random walk with no drift covers distance like the square root of time, so covering a distance of 3 takes about 3 squared steps, not 3. The answer 3 would only be right if the walk always moved in one direction. The structure to name in the room is a first-step recursion on the state, which turns the question into seven unknowns with simple links between them.

    Expected steps left from each state: 9, 8, 5, then 0 at the walls-35-28-1908+15+2+3stop: 0stop: 0Each state: one step, then the average ofits two neighbours. From +1: 1 + (9 + 5)/2 = 8Distance to the walls multiplied:from k, (3 - k) x (3 + k) = 9 - k^2Check: S^2 - n has zero drift, so E[T] = E[S_T^2] = 3^2 = 9
    The expected number of steps left is 9 from the centre, 8 one step out, 5 two steps out and 0 at the walls, tracing the parabola 9 - k squared, which is the product of the distances to the two walls.

    How do you solve the recursion quickly?

    Use symmetry first: E(1) = E(-1) and E(2) = E(-2). Then three equations remain. From 2: E(2) = 1 + (E(1) + 0)/2. From 1: E(1) = 1 + (E(0) + E(2))/2. From 0: E(0) = 1 + E(1), because both neighbours are worth E(1). Substituting gives E(1) = 8 and E(0) = 9, and every value matches the product of the distances to the two walls. The second differences of E are all minus 2, which is why the answer is a parabola: each step must remove exactly one unit of expected time.

    The relationship
    E(k)=1+12E(k−1)+12E(k+1),E(±3)=0  ⇒  E(k)=(3−k)(3+k),E(0)=9E(k) = 1 + \tfrac12 E(k-1) + \tfrac12 E(k+1),\quad E(\pm 3) = 0 \;\Rightarrow\; E(k) = (3-k)(3+k),\quad E(0) = 9
    E(k)the expected number of steps left from state k
    1the step just taken
    E(plus or minus 3) = 0the walls, where the walk stops
    What it says in wordsOne step plus the average of the two neighbouring states, solved, gives the product of the distances to the walls.

    How do you check 9 a second way?

    Use a martingaleA process whose expected next value, given everything so far, equals its current value: a fair game.. Squaring the position and subtracting the number of steps gives a fair game, because each step adds exactly 1 to the expected square. At the moment the walk stops its square is exactly 9, so the expected number of steps must also be 9. The same argument handles uneven walls: starting between -a and +b, the expected time is a times b. The cousin result is the hitting probability: from +1, the walk reaches +3 before -3 with probability 2/3, the distance to the far wall over the total width.

    Where candidates lose it

    The trap answers are 3, from treating the walk as if it marched to a wall, and infinity, from a half-remembered fact that a symmetric walk on the whole line takes infinite expected time to reach a given level. With two walls, escape is certain and fast.

    The second loss is setting up seven equations and grinding them. Use symmetry to cut to three, then state the product rule and check it with the squared-position argument.

    What the interviewer asks next

    • Starting at 0, what is the expected time to hit +2 or -4?
    • From +1, what is the probability of reaching +3 before -3?
    • With only one wall at +3 and no lower wall, what is the expected time to reach it?
  3. 070I offer you a bet. I draw two cards from a well-shuffled 52-card deck. If they are the same colour you win Rs 100; if they differ you lose Rs 100. Do you take the bet, and what payout on a win would make it fair?Market making, betting and sizingCoreQuant tradingOptions market making

    Try it first

    Should you take the bet?

    Show the worked solution

    Decline it: same colour comes up 25 times in 51, so the bet loses about Rs 1.96 per Rs 100. Whatever the first card is, 25 of the remaining 51 share its colour and 26 do not. The bet is fair only if a win pays Rs 26 for every Rs 25 risked, that is Rs 104 on a win against Rs 100 on a loss.

    Why is same colour less likely than different colour?

    Imagine a classroom with 26 girls and 26 boys. Pick one child, then pick a second: the second is slightly more likely to be of the other sex, because the first pick removed one of their own. Drawing without replacement makes the second card lean away from the first card's colour, since that colour is now short by one. The first card is irrelevant to the answer, whichever colour it is. Only what is left in the deck matters: 25 matching cards and 26 non-matching.

    Once the first card is out, its colour is short by one1stredany colour;say red25 red left: same colour, you win26 black left: you loseP(same colour)25/51 = 49.0%not 1/2: no replacementEV of the Rs 100 betRs -1.96100 x (25 - 26) / 51Fair payout on a winRs 104 per Rs 100odds of 26 to 25
    After any first card, 25 of the 51 cards left share its colour and 26 do not, so same colour has chance 25/51 = 49.0%, the Rs 100 even bet is worth Rs -1.96 on average, and it becomes fair at a payout of Rs 104.

    What is the bet worth, and what makes it fair?

    Expected value is the win times its chance less the loss times its chance: 100 x 25/51 - 100 x 26/51 = -100/51, about Rs -1.96. A bet is fair when the payout ratio equals the odds against winning, here 26 to 25, so the win must pay Rs 104 for each Rs 100 at risk. Quoting it as odds rather than a probability is how a trader would answer: you would take the bet at 26 to 25 or better, and decline anything worse.

    The relationship
    P(same)=2551EV=100⋅2551−100⋅2651=−10051≈−1.96W∗=100⋅2625=104P(\text{same}) = \frac{25}{51} \qquad EV = 100\cdot\frac{25}{51} - 100\cdot\frac{26}{51} = -\frac{100}{51} \approx -1.96 \qquad W^{*} = 100\cdot\frac{26}{25} = 104
    25/51the chance the second card matches the first card's colour
    W*the win payout that makes the expected value zero
    What it says in wordsThe second card matches with chance 25 in 51, so an even-money bet loses a little under 2 rupees per 100.

    Why would an interviewer offer such a small edge?

    To see whether you notice it at all, and then whether you size your response to it. An edge of about 2% per bet is small for one play but decisive over many, so the right answer is to decline at even money and quote the price at which you would play. It also tests whether you separate the first card, which is free, from the conditional chance of the second. With replacement, or with an infinite deck, the bet would be exactly fair; the whole edge comes from the deck being finite, and it shrinks as more decks are shuffled together.

    Where candidates lose it

    The trap answer is that the bet is fair because colours are fifty-fifty. That treats the two cards as independent draws with replacement, which a single deck is not.

    The second loss is getting 25/51 and stopping there. The question asks whether you take the bet and at what price, so finish with the decision and the fair odds of 26 to 25.

    What the interviewer asks next

    • What if the cards come from two decks shuffled together?
    • You win if the two cards are the same suit. What payout makes that fair?
    • I draw three cards and you win if all three are the same colour. What is the chance?
  4. 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?Games and strategic reasoningCoreQuant 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.

    My mix of 3/8 heads makes your two choices pay the same: -1/8Payoff to youI showHTH+3-2T-2+1You showWins 3 + 1 = 4, losses 2 + 2 = 4:looks fair, is not-2-1+1+2+30you show Hyou show Tcross at q = 3/8,both pay -1/800.250.50.751q = my probability of showing heads
    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 relationship
    5q−2=1−3q  ⇒  q∗=38,V=5⋅38−2=−185q - 2 = 1 - 3q \;\Rightarrow\; q^* = \tfrac38,\qquad V = 5\cdot\tfrac38 - 2 = -\tfrac18
    qmy probability of showing heads
    5q - 2your expected payoff from showing heads
    1 - 3qyour expected payoff from showing tails
    Vthe 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?
  5. 073Use Newton's method to find the square root of 2, starting from 1.5. How many correct digits do you have after each step, and why?Mental maths and number senseCoreQuant researchDesk quant

    Try it first

    Starting from 1.5, about how many correct digits after three Newton steps?

    Show the worked solution

    About 1, 3, 6 and 12 correct digits: the count roughly doubles each step. The update is x(next) = (x + 2/x)/2: 1.5 gives 17/12 = 1.41667, then 577/408 = 1.4142157, then 665857/470832 = 1.41421356237469. Each new error is about the old error squared divided by 2x, so if the error is 10^-k, the next is about 10^-2k. That is quadratic convergence.

    Where does the update rule come from?

    Think of guessing a side of a square room whose area is 2. If your guess is too big, 2 divided by your guess is too small, and the truth sits between the two. Newton's method for x squared minus 2 is exactly that: replace x with the average of x and 2/x. Formally, Newton follows the tangent of f(x) = x^2 - 2 down to zero, x - f(x)/f'(x) = x - (x^2 - 2)/(2x), which simplifies to (x + 2/x)/2. The averaging form is the one to use in your head.

    Each Newton step roughly doubles the correct digitsStepFractionDecimal (correct digits in green)Correct digits03/21.51117/121.416666666666632577/4081.414215686274563665857/4708321.4142135623746124(digits run past the table)1.414213562373024Rule: x(next) = (x + 2/x) / 2. The new error is about the old error squared over 2x.
    Starting from 1.5, Newton's iterates for the square root of 2 have 1, 3, 6 and then 12 correct digits, doubling at each step because each new error is roughly the square of the old one.

    How do you get the iterates without a calculator?

    Keep fractions. From 3/2, the next value is (3/2 + 4/3)/2 = 17/12, then (17/12 + 24/17)/2 = 577/408, and the pattern continues: if x = p/q, the next is (p^2 + 2q^2)/(2pq). 17/12 is 1.41667, already right to 1.41. 577/408 is 1.4142157 against 1.4142136, right to 1.41421. The third step's fraction, 665857/470832, is too big for mental division, but you can predict its accuracy without doing it, which is the point of the question.

    The relationship
    xn+1=12(xn+2xn)xn+1−2=(xn−2)22xnx_{n+1} = \tfrac12\Big(x_n + \frac{2}{x_n}\Big) \qquad x_{n+1} - \sqrt2 = \frac{(x_n - \sqrt2)^2}{2x_n}
    x_nthe current estimate of the square root of 2
    x_n - sqrt 2the error of the current estimate
    2 x_nabout 2.8 near the root, so the new error is about a third of the old error squared
    What it says in wordsEach new error is the old error squared, divided by about 2.8, so the correct digits roughly double.

    Why is it the digits that double, and when does that fail?

    Subtract the root from the update and the algebra collapses to (x - root 2)^2 / 2x. Squaring an error of 10^-3 gives 10^-6, so each step doubles the number of correct digits once you are close. The errors here run about 0.09, 0.0025, 2 x 10^-6 and 1.6 x 10^-12. The doubling needs a good start and a simple root: far from the root, or where the slope is zero, Newton can creep or jump away. Bisection, by contrast, gains one binary digit per step whatever happens, which is why desk code often brackets with bisection and finishes with Newton when solving for implied volatility.

    Where candidates lose it

    The trap is guessing linear progress, one or two digits a step, because that is how most iterative methods feel. Newton is special near a simple root, and the interviewer wants the word quadratic and the reason for it.

    The second loss is getting lost in decimals. Work in fractions, 3/2, 17/12, 577/408, and state the error-squared rule instead of computing the third step.

    What the interviewer asks next

    • Write Newton's update for the cube root of 10, and start it from 2.
    • Why does Newton converge only linearly at a double root?
    • How would you use Newton's method to find an implied volatility, and what can go wrong?
  6. 078Let A be the 2 by 2 matrix with 2 on the diagonal and 1 off the diagonal. Compute A to the power 10 without multiplying it out ten times.Correlation, regression and linear algebraCoreQuant researchQuant trading

    Try it first

    What is the top-left entry of A^10?

    Show the worked solution

    A^10 has 29,525 on the diagonal and 29,524 off it. A has eigenvalue 3 along (1, 1) and eigenvalue 1 along (1, -1). Writing A = Q D Q^T with D = diag(3, 1), the tenth power is Q D^10 Q^T, and only the numbers 3 and 1 get raised to the tenth. The entries are (3^10 + 1)/2 and (3^10 - 1)/2.

    Why look for eigenvectors at all?

    Think of a photocopier set to 300% on one axis and 100% on the other. Copy a copy ten times and you do not need to simulate every pass: that axis is 3 to the tenth times longer and the other is unchanged. An eigenvector is a direction the matrix only stretches, so applying the matrix ten times along it is just multiplying by the eigenvalue ten times. Symmetric matrices always have a full set of such directions at right angles, which is what makes this matrix easy.

    Find them by inspection. Adding the two rows of A gives 3 in each, so A(1, 1) = (3, 3): eigenvalue 3. Subtracting gives 1, so A(1, -1) = (1, -1): eigenvalue 1. The trace is 4 and the determinant is 3, and 3 + 1 = 4 and 3 x 1 = 3, which confirms both in one line.

    Two directions the matrix only stretches: powers become powers of numbersxy(1, 1)A(1, 1) = (3, 3)(1, -1) = A(1, -1)eigenvalue 3 along (1, 1); eigenvalue 1 along (1, -1)A = Q D Q^TQ holds the unit eigenvectors, D = diag(3, 1)A^10 = Q D^10 Q^Tthe Q^T Q pairs in the middle cancelD^10 = diag(59,049, 1)only two numbers get raised to the 10thA^10: diagonal (3^10 + 1)/2, off it (3^10 - 1)/229,52529,52429,52429,525
    The matrix stretches the direction (1, 1) by a factor of 3 and leaves (1, -1) unchanged, so A to the tenth stretches them by 59,049 and 1, and converting back to ordinary coordinates gives 29,525 on the diagonal and 29,524 off it.
    The relationship
    A=Q(3001)QT,  Q=12(111−1)⇒A10=12(310+1310−1310−1310+1)A = Q\begin{pmatrix}3&0\\0&1\end{pmatrix}Q^{T},\; Q=\tfrac{1}{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix} \Rightarrow A^{10} = \tfrac12\begin{pmatrix}3^{10}+1 & 3^{10}-1\\ 3^{10}-1 & 3^{10}+1\end{pmatrix}
    Qthe matrix whose columns are the unit eigenvectors
    Dthe diagonal matrix of eigenvalues, 3 and 1
    Q^Tthe transpose of Q, which is also its inverse
    What it says in wordsRotate into the eigenvector directions, raise each eigenvalue to the tenth, and rotate back.

    Is there an even faster route for this particular matrix?

    Yes. Write A = I + J, where J is the all-ones matrix. J squared is 2J, so every power of J is a multiple of J, and (I + J)^n collapses to I + ((3^n - 1)/2) J. For n = 10 that is I + 29,524 J, which gives 29,525 on the diagonal and 29,524 off it: the same answer, and a good cross-check to say aloud. A brute-force multiplication in code agrees exactly.

    Say why this matters on a desk. A covariance matrix with equal variances and one common correlation has exactly this shape, and its eigenvectors are the market direction and the spread directions. Powers of transition matrices in Markov chains are computed the same way, and the eigenvalue closest to 1 tells you how fast the chain forgets where it started.

    Where candidates lose it

    The fast wrong answer raises each entry to the tenth, giving 1,024 on the diagonal and 1 off it. Matrix multiplication mixes rows and columns, so entries do not power separately; A squared already has 5 on the diagonal, not 4.

    The second loss is diagonalising correctly and then fumbling the conversion back. The Q matrix carries a 1/sqrt(2) on each side, which becomes the factor of one half in the final answer. Check with the trace: the diagonal entries of A^10 must sum to 3^10 + 1.

    What the interviewer asks next

    • What is A^n as n grows large, after dividing by 3^n?
    • Compute the square root of A, a symmetric matrix B with B squared equal to A.
    • Generalise: an n by n matrix with a on the diagonal and b everywhere else. What are its eigenvalues?
  7. 097How many integers from 1 to 1,000 share no common factor with 1,000 other than 1?Mental maths and number senseCoreQuant researchQuant trading

    Try it first

    Pick the count.

    Show the worked solution

    400. Since 1,000 = 2^3 x 5^3, a number shares a factor with 1,000 exactly when it is divisible by 2 or by 5. There are 500 multiples of 2 and 200 of 5, but the 100 multiples of 10 sit in both lists, so 600 numbers share a factor and 400 do not. Euler's formula agrees: 1,000 x 1/2 x 4/5 = 400.

    Which numbers share a factor with 1,000?

    Picture a hall of 1,000 people where everyone wearing a red badge or a blue badge is asked to leave. To count who stays, you need the red-badge count, the blue-badge count, and how many wear both, because they would otherwise be counted out twice. Write 1,000 as 2^3 x 5^3: a number shares a factor with it exactly when it is divisible by 2 or by 5, so only two badges matter, and the powers 3 do not add any new conditions. Every multiple of 4 or 8 is already a multiple of 2, and every multiple of 25 or 125 is already a multiple of 5.

    Remove multiples of 2 and of 5, add back the multiples of 10 removed twice1 to 1,000multiples of 2: 500multiples of 5: 2004002 only100both1005 onlyoutside: 400Inclusion and exclusion1,000 - 500 - 200 + 100 = 400the 100 multiples of 10 were removed twiceEuler's product1,000 x (1 - 1/2) x (1 - 1/5) = 400only the distinct primes 2 and 5 matterwrong: 1,000 - 500 - 200 = 300forgets to add the overlap back1 to 20: coprime to 10 shown in lime, 8 of 20 = 40%1234567891011121314151617181920
    Of the numbers 1 to 1,000, 500 are multiples of 2 and 200 are multiples of 5, with 100 multiples of 10 in both, so 600 share a factor with 1,000 and 400 lie outside both circles; Euler's product 1,000 x 1/2 x 4/5 gives the same 400.
    The relationship
    φ(1000)=1000−⌊10002⌋−⌊10005⌋+⌊100010⌋=1000(1−12)(1−15)=400\varphi(1000) = 1000 - \left\lfloor\tfrac{1000}{2}\right\rfloor - \left\lfloor\tfrac{1000}{5}\right\rfloor + \left\lfloor\tfrac{1000}{10}\right\rfloor = 1000\left(1-\tfrac12\right)\left(1-\tfrac15\right) = 400
    phi(1000)Euler's totient: how many of 1 to 1,000 share no factor with 1,000
    1000/2, 1000/5the counts of multiples of 2 and of 5
    1000/10the multiples of both, added back once
    What it says in wordsRemove the multiples of each prime, add back the multiples of both, and you get the same answer as multiplying by the share that survives each prime.

    Why does the quick product formula work here?

    Half of all numbers are odd, and among those, four in five are not multiples of 5. Because 1,000 is a multiple of 10, the numbers 1 to 1,000 contain exactly 100 full blocks of ten, and in each block exactly 4 numbers, 1, 3, 7 and 9, survive both tests, so 100 x 4 = 400. The strip of 1 to 20 in the figure shows the pattern repeating, 8 survivors in 20. The product is exact only when the range is a whole number of such blocks: for 1 to 1,234 it gives 493.6, while a direct count gives 494.

    Where does a question like this lead in an interview?

    Usually to powers and remainders. Euler's theorem says a number coprime to n, raised to the power phi(n), leaves remainder 1 when divided by n, and that is the engine behind last-digit puzzles: phi(100) = 40, so 3^40 ends in 01 and so does 3^400. It also leads to probability: the chance that two large random integers share no factor tends to 6/pi^2, about 0.608. The habit the question tests is factorising first: once you see only the primes 2 and 5 matter, a counting question becomes a two-circle Venn diagram.

    Where candidates lose it

    The usual slip is 1,000 - 500 - 200 = 300, subtracting both lists and forgetting that the multiples of 10 were removed twice. Add them back once and the answer is 400.

    The second loss is treating each prime power as a new condition, subtracting multiples of 4, 8, 25 and 125 as well. Every multiple of 4 is already a multiple of 2; only the distinct primes matter.

    What the interviewer asks next

    • How many integers from 1 to 1,000 share no factor with 360?
    • What are the last two digits of 3^400?
    • What is the probability that two randomly chosen integers share no common factor?
← PreviousPage 2 of 2
  1. 1
  2. 2
Next →
Fin Maverick

Finance education that ends in a job, not a certificate that gathers dust. Built for young India.

LEARN
CalculatorsFrameworksComparisonsInterview RoadmapsShowdown
RESOURCES
All CoursesFree CoursesBootcampsInternships
COMPANY
AboutJob openingPartnership
LEGAL
Privacy PolicyTerms & ConditionsContent LicenseReturn & Refund Policy
© 2026 FIN MAVERICK / BUILT FOR INDIA.DO FINANCE, DO NOT JUST READ ABOUT IT.