Lucent's Thoughts Dump

How to (Maybe) Survive a Math Gulag: A Guide

You're sent to a gulag1.
The one way you get out is if you beat your opponent in the following game: There is a button RND in many old-school calculators. It generates a random number between (0,1), assumed to follow the uniform distribution. To allow players some control, you may both choose a threshold τ. When the first drawn number is less than τ, it is discarded and replaced by a new random number.
Whoever has the greater number wins.
What threshold do you choose to maximize your chance to survive?

Probability of Winning if You Keep Your Score x

We compute P(youwinyou keep x) given that the opponent follows the same threshold τ.

Case 1: xτ (low draw)

If your score x is τ, you only win if the opponent also redraws (i.e., their first score τ).

P(opponent redraws)=τ

After redrawing, the opponent’s new score y is uniformly distributed in [0,1]. You win if yx, which occurs with probability x.

Hence,

P(winxτ)=τ·x=τx.

Case 2: xτ (high draw)

There are two possibilities:

  1. Opponent redraws: This happens with probability τ, and you win if x>y (probability x). Thus, contribution: τ·x.

  2. Opponent keeps: This happens with probability (1τ). You win if the opponent's score lies in (τ,x], which has probability (xτ).

Adding these contributions gives

P(winxτ)=τx+(xτ).

To Summarize

P(win if you keep x)={τx,xτ,\ τx+xτ,xτ.

Probability of Winning if You Redraw

Let your redraw be y~U[0,1].

Case A: Opponent redraws

This occurs with probability τ. You win if y>yop, where both are independent uniforms.

P(y>yop)=12.

Thus, the contribution is τ·12.


Case B: Opponent keeps

This occurs with probability (1τ). Given that the opponent’s score xop>τ, we have

P(y>xopxop>τ)=τ1P(y>xop),dxop1τ=τ1(1xop),dxop1τ=1τ2.

Thus, the contribution is (1τ)·1τ2.


Total

P(win if you redraw)=τ·12+(1τ)·1τ2=1τ+τ22.

Nash Equilibrium

At equilibrium, a player must be indifferent between keeping or redrawing when their score equals the threshold:

P(win if you keep)=P(win if you redraw)

For x=τ, both cases yield

P(win if you keep)=τ2.

And,

P(win if you redraw)=1τ+τ22.

Equating these:

τ2=1τ+τ22.

Solving for τ

Simplify:

2τ2=1τ+τ2τ2+τ1=0.

Solving using the quadratic formula:

τ=1±124(1)(1)2(1)=1±52.

Since τ[0,1], we take the positive root:

τ*=1+520.618.

Which happens to be the golden ratio ϕ. Why? I don't know. I will update this or make a new post if I ever figure it out. #StayTuned2

So in conclusion, if you're opponent is as logical and well-read in math as you are, then the survival rate is 50% for you again. Which means you may or may not die (?), so it really doesn't change much of your life trajectory if you've ridden a citibike in nyc at least once.
Thank you for reading this semi-informative and probably incomplete proof. Always welcome to email me for errors and improvements here.

  1. Not the Soviet Union gulag

  2. Or maybe I will quit math before reaching that point :0

#math #problems