Probability recurrence relations: two University of Tokyo problems explained

Original publication:

What is a probability recurrence relation?

A probability recurrence describes how a probability changes after successive steps of a random process. It combines probability with sequences: define the state probabilities, find how one step redistributes them, and solve the resulting recurrence.

These problems need not involve calculus or advanced probability. The main challenge is often choosing a small enough set of states. The two University of Tokyo entrance-exam problems below illustrate this especially well. The explanations and solutions here are the author's own.

Two problems to try

Problem 1: rolling a regular tetrahedron

A regular tetrahedron rests on a plane. At each step, one of the three edges of the face in contact with the plane is chosen with equal probability, and the tetrahedron is rolled over that edge onto the adjacent face.

Find the probability that, after nn steps, the face originally in contact with the plane is again in contact with it.

University of Tokyo, 1991 science-track mathematics, Problem 1.

Problem 2: a random walk through nine rooms

An equilateral triangle is divided into nine triangular rooms as shown below. A ball starts in room PP. Every second, it moves to one of the rooms sharing an edge with its current room, choosing each available adjacent room with equal probability. It never stays in the same room.

Find the probability that the ball is in room QQ after nn seconds.

University of Tokyo, 2012 humanities-track Problem 3 and science-track Problem 2.

Nine triangular rooms, with the starting room P at the center and destination Q below and to the right.

The basic method

Define probabilities as sequences

For Problem 1, let pnp_n be the probability that the original face is in contact with the plane after nn rolls. Giving the desired probability a name is the first step toward relating it to the previous step.

Draw a transition diagram

Suppose a process has two states, AA and BB, with probabilities pnp_n and 1−pn1-p_n after nn steps. Suppose it stays in its current state with probability 1/31/3 and changes state with probability 2/32/3.

Two-state transition diagram: each state stays with probability 1/3 and changes to the other with probability 2/3.

The arrows describe conditional probabilities of the next state given the current state. To compute the probability of arriving in AA, add the contributions from both possible starting states:

pn+1=13pn+23(1−pn).p_{n+1}=\frac13p_n+\frac23(1-p_n).

This is the law of total probability written as a recurrence.

Find an initial value and solve

A first-order affine recurrence has the form pn+1=apn+bp_{n+1}=ap_n+b. If a≠1a\ne1, its fixed point is L=b/(1−a)L=b/(1-a). Subtracting it gives

pn+1−L=a(pn−L),p_{n+1}-L=a(p_n-L),

so

pn=L+(p0−L)an.p_n=L+(p_0-L)a^n.

For the transition diagram above, a=−1/3a=-1/3 and L=1/2L=1/2, giving

pn=1/2+(p0−1/2)(−1/3)n.p_n=1/2+(p_0-1/2)(-1/3)^n.

Five useful checks and shortcuts

1. Reduce the number of states using symmetry and parity

In Problem 1, the original face is special, but the other three faces are symmetric. Track whether the original face is down rather than tracking all four faces separately.

In Problem 2, the ball alternates between two groups of rooms. Separating even and odd times dramatically reduces the number of states that need to be considered.

2. Use the fact that probabilities sum to one

If qnq_n is the probability that some other face is down in Problem 1, then qn=1−pnq_n=1-p_n. There is no need to introduce a second independent sequence.

3. Treat unexpectedly large systems as a reason to reconsider the states

These examples can both be reduced to a single recurrence. In other problems a larger system may be necessary, but before doing a long calculation, check whether states are symmetric or whether looking every two steps simplifies the process.

When combining states, verify that the transition probabilities to the groups are consistent for the individual states being combined. Symmetry helps justify this; grouping arbitrary states may not.

4. Start at time zero

An initial value does not have to be the value after one step. At time zero, the tetrahedron certainly has its original face down, and the ball is certainly in room PP. These observations give initial values without any probability calculation.

5. Check small cases and limiting behavior

Substitute n=0,1,2n=0,1,2 when you can calculate those probabilities directly. A limit can also be a useful check, but take care with periodic processes: in Problem 2 the full sequence does not have a single limit because all odd-time probabilities are zero.

Solution to Problem 1: the tetrahedron

Choose two states

Call the original face AA, and let pnp_n be the probability that AA is down after nn rolls. The complementary state, “one of the other three faces is down,” has probability 1−pn1-p_n.

  • From AA, the next roll always moves to another face.
  • From any other face, exactly one of the three possible rolls returns to AA, while the remaining two lead to other faces.

Tetrahedron transition diagram: A moves to another face with probability 1; another face returns to A with probability 1/3 and stays in the complementary group with probability 2/3.

Thus

pn+1=13(1−pn),p0=1.p_{n+1}=\frac13(1-p_n),\qquad p_0=1.

Solve the recurrence

The fixed point is 1/41/4, so

pn+1−14=−13(pn−14).p_{n+1}-\frac14=-\frac13\left(p_n-\frac14\right).

Therefore

pn−14=(−13)n(1−14),p_n-\frac14=\left(-\frac13\right)^n\left(1-\frac14\right),

and the answer is

pn=14+34(−13)n.\boxed{p_n=\frac14+\frac34\left(-\frac13\right)^n.}

For n≥1n\ge1, an equivalent form is 14{1−(−13)n−1}\frac14\{1-(-\frac13)^{n-1}\}.

Check the answer

The formula gives p0=1p_0=1, p1=0p_1=0, and p2=1/3p_2=1/3, as expected. As nn tends to infinity, it tends to 1/41/4, consistent with the four symmetric faces.

Solution to Problem 2: the triangular rooms

Use reflection symmetry

Label the rooms as in the diagram below. The two rooms marked CC are reflections of one another, and one of them is QQ. Rooms bearing the same letter have equal probabilities by reflection symmetry.

The nine rooms labeled A at the top, P in the center, two B rooms beside P, two C rooms including Q below P, D at the bottom center, and two E rooms at the bottom corners.

Tracking all six labels separately still looks cumbersome. Parity provides the next simplification.

Separate even and odd times

Starting from PP:

  • After an even number of steps, the ball is in PP or one of the two CC rooms.
  • After an odd number of steps, it is in an AA, BB, DD, or EE room.

This follows by induction. It holds at time zero, and every shared edge connects one of these groups to the other. Hence the desired probability is zero for odd nn.

For even nn, let cnc_n be the probability of being in either CC room. The probability of being in PP is 1−cn1-c_n, and by reflection symmetry the probability of being in QQ is cn/2c_n/2.

Calculate transitions over two seconds

From PP, the first step goes to AA or either of the two BB rooms, each with probability 1/31/3. The room AA leads straight back to PP. Each BB room has two neighbors, PP and a CC room. Hence the two-step probability of moving from PP to the CC group is

2×13×12=13.2\times\frac13\times\frac12=\frac13.

From either CC room, the first step goes to its neighboring BB, DD, or EE room, each with probability 1/31/3. Only the route through BB can reach PP on the next step, and it does so with probability 1/21/2. Thus the two-step probability of moving from the CC group to PP is

13×12=16.\frac13\times\frac12=\frac16.

The probability of remaining in the CC group after two steps is consequently 5/65/6.

Two-step transitions: the C group stays with probability 5/6 and goes to P with probability 1/6; P goes to the C group with probability 1/3 and returns to P with probability 2/3.

Each arrow represents two seconds of elapsed time, from nn to n+2n+2.

Solve the recurrence at even times

For even nn,

cn+2=56cn+13(1−cn)=12cn+13,c0=0.c_{n+2}=\frac56c_n+\frac13(1-c_n)=\frac12c_n+\frac13,\qquad c_0=0.

Subtract the fixed point 2/32/3:

cn+2−23=12(cn−23).c_{n+2}-\frac23=\frac12\left(c_n-\frac23\right).

Writing n=2kn=2k gives

c2k=23(1−(12)k).c_{2k}=\frac23\left(1-\left(\frac12\right)^k\right).

Since QQ is one of the two equally likely CC rooms, the required probability is

Pr⁡(Xn=Q)={0,n odd,13(1−(12)n/2),n even.\boxed{\Pr(X_n=Q)=\begin{cases}0,&n\text{ odd},\\[3pt]\displaystyle\frac13\left(1-\left(\frac12\right)^{n/2}\right),&n\text{ even}.\end{cases}}

Check the answer

At time zero the probability is zero. After two seconds, the only route to QQ is through the adjacent BB room, giving 1/3×1/2=1/61/3\times1/2=1/6, which agrees with the formula.

Along even times, the probability tends to 1/31/3. The three downward-pointing rooms PP and the two CC rooms are symmetric under a rotation of the entire triangle. Along odd times the probability is always zero, so the full sequence does not converge.

What to take away

Choose states before doing algebra. Symmetry can identify equal probabilities; the total-probability condition can remove a variable; and parity can suggest looking at two steps at a time. Once those choices are right, an apparently complicated random process may reduce to a single affine recurrence.

For another example of choosing a method from the structure of a problem, see three strategies for integer problems.

Related articles

About the author

Koki Saito

Physician and graduate of the University of Tokyo Faculty of Medicine. Drawing on his entrance-exam experience, he explains how to choose mathematical methods and construct complete solutions.

Full profile →

Have a question or spotted an error? Contact us.