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(youwin∣you 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 y≤x, which occurs with probability x.

Hence,

P(win∣x≤τ)=τ·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(win∣x≥τ)=τ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>xop∣xop>τ)=∫τ1P(y>xop),dxop1−τ=∫τ1(1−xop),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±12−4(1)(−1)2(1)=−1±52.

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

τ*=−1+52≈0.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