The problem asks us to consider an infinite binary tree with edges labeled “A” and “B”.
The choice is made randomly and independently for each edge,
with the probability of an “A” label being denoted by p
.
An adversarial game is then played on this tree by two players, Alex and Beth.
Starting with Alex, they take turns stepping downward from the root.
Beth wins if she can ever force an edge labeled by “B” to be crossed.
Conversely, Alex wins if he can continue play forever with both players only crossing “A” edges.
(The image depicts a winning game for Beth.)
We are interested in the circumstances under which Alex has a nonzero probability of winning,
assuming perfect play for both players.
Observe that for 0<p<1
, he cannot be guaranteed a win,
since there is a nonzero probability that the first two edges in the tree are labeled “B”,
forcing him to make a losing move.
The question posed by the puzzle is to determine the infimum of
the set of values of p
for which Alex has a nonzero probability of winning.
In other words, we are interested in the boundary between
the values of p
that are almost surely a win for Beth,
and the values for which Alex has a nonzero chance to win,
regardless of how the boundary value itself is classified.
In notation, we want:
q=inf{p0≤p≤1P[Win(τ)∣τ∼Treesp]>0}
where τ
is a tree,
Win(τ)
is the proposition that
the tree τ
is winnable by Alex playing first,
and Treesp
is a random variable
ranging over infinite binary trees
where the probability of an “A” label is p
.
This concludes my description of the problem.
If you want to work on it yourself, and to avoid spoilers, stop here.
A warm-up — hopelessness
I’ll use variables like ℓ∈A,B
to range over labels
and adopt a 2D notation for trees:
Intuitively, Beth has an easier job than Alex —
she only needs to get lucky once, while her opponent needs to get lucky every time.
My expectation going in was that we should expect q
to be close to 1.
The other people I talked to about the problem felt the same way.
In fact, we can relax the problem a bit to get a lower bound on q
—
some trees τ
have the property that
Alex will lose even with Beth’s cooperation.
This occurs if there are no paths down from the root
that don’t eventually pass through a B edge.
We can denote this condition by Hopeless(τ)
and define it (co)recursively:
For any tree, the hopelessnesses of its branches are independent from each other;
for any branch, its choice of child is independent from its choice of subtree.
This means we can turn these equations into equations about probabilities:
This gives us the probability that a random tree is hopeless
when we sample according to Treesp
.
Note in particular that:
p≤1/2⟹s≥1
.
Hopeless(τ)⟹¬Win(τ)
for any tree τ
.
So Alex almost surely cannot win when p≤1/2
.
This establishes that q≥1/2
.
It also establishes the general techniques we will be using for the full solution:
convert winnability into a predicate on trees,
convert this predicate into a set of equations on probabilities,
and then finally try to solve these equations analytically.
There is a little bit of handwaving involved here —
to do this rigorously we would need to
stipulate that Hopeless
is
the minimal predicate satisfying our definitional equation,
as well as explain why it’s okay for s
to exceed 1
when it ostensibly represents a probability.
But I’m content with this level of rigor.
Tackling the original problem
Since the two players take turns moving in this situation,
it makes to define winnability using two mutually recursive predicates.
Let WA(τ)
denote the condition that Alex can win a game
started at the tree τ
with Alex to play.
Let WB(τ)
denote the condition that Alex can win a game
started at the tree τ
with Beth to play.
Notice that the only difference between these predicates is that
the first one is disjunctive in the branches
(since Alex can choose which branch to take)
whereas the second one is conjunctive
(since Alex must assume the branch will be taken adversarially).
Now let’s attach corresponding probabilities
wA,wB,hA,hB
to these predicates.
We are interested in the values of p
for which
wA>0
, but this is
equivalent to
hA>0
,
and it will make the math easier if we focus on that.
⟺⟺⟺⎩⎨⎧wAwBhAhB=1−(1−hB)2=hA2=pwA=pwB{hAhB=phB(2−hB)=phA2hA=p2hA2(2−phA2)hA is a fixed point of the map fp:x↦p2x2(2−px2).
The last step here might seem redundant,
but talking about fixed points hints at the idea that
we might be able to better understand the problem by
understanding the dynamics of the map fp
.
On its own, trying to solve the equation
x=p2x2(2−px2)
analytically for arbitrary p
isn’t promising.
We can get the solution x=0
,
but then we’re left with an ugly cubic.
Remember, though, that we aren’t really looking to compute
the fixed points of fp
for arbitrary p
but rather to find a boundary value of p
with regards to the fixed point behavior of the map.
Inspecting the graph visually, we can see that when
p
is sufficiently high, there are three fixed points:
a stable fixed point at x=0
,
an unstable fixed point (∣fp’(x)∣>1)
to its right,
and a stable fixed point (∣fp’(x)∣<1)
further to the right of that.
On the other hand, for smaller values of p
there are no fixed points except at 0.
So we should expect that at the boundary value,
the two fixed points merge into a semi-stable fixed point
at which the graph is tangent to the y=x
line:
In other words, we have that fq
has a fixed point
0<x<1
satisfying: