bill's blog

Writeup: IMO Shortlist 2001 A1

Problem Statement:

Let T denote the set of all ordered triples (p,q,r) of nonnegative integers. Find all functions f:T satisfying

f(p,q,r)={0ifpqr=0,1+16(f(p+1,q1,r)+f(p1,q+1,r)+f(p1,q,r+1)+f(p+1,q,r1)+f(p,q+1,r1)+f(p,q1,r+1))otherwise

for all nonnegative integers p, q, r.

My Solution:

I've gotten asked a quant interview question almost exactly like this, so I'll rewrite the question in terms of that.

Consider the alternate (and equivalent) question: we have 3-player game involving players A, B, and C, who have p, q, and r coins respectively. Every second, one of A, B, and C is randomly chosen, and they must give a coin to another randomly chosen player. What's the functions in terms of p, q, and r will give the expected amount of time until one of A, B, or C ruin?

We solve this problem with a martingale approach, with stopping condition p, q, or r equal to 0. Let the amount of money players A, B, and C have at timestep i be pi, qi, and ri. Each of these sequences is a random walk. Consider the variable Si=piqiri. We know that

𝔼[Si+1|Si]=Sipi+qi+ri3

which is apparent when substituing all equally likely values of pi+1, qi+1, and ri+1 into the expression for Si+1. We also know that, at stopping time n, Sn must be 0.

We know that the quantity pi+qi+ri is conserved, let it be S. Then the variable

Mi=Si+i·S3

is a martingale, and M0=0. So

𝔼[Mn]=𝔼[M0]=p0q0r0=𝔼[Sn+n·S3]=S3𝔼[n]𝔼[n]=3pqrp+q+r.

So 3pqrp+q+r is a candidate function for f. Note that this must be the only function that works, since this expected value must be unique. So the only answer is f=3pqrp+q+r.