Sunday, February 27, 2022

Pick the bigger real

Source

I write down two distinct reals secretly and call them $x$ and $y$. You can pick one of them to observe its value. Then, you will need to decide whether $x$ or $y$ is larger. Your strategy should produce the right answer with probability more than $\frac{1}{2}$ for any $(x,y)$.


At one point I thought it's impossible, but then...


====================


Solution:

First, select $x$ or $y$ with equal probabilities. Say the observed value is $z$. Then with probability $f(z)$ claim that it's the larger one. Obviously the only requirement for $f$ is to be strictly monotonic, which can be achieved easily. For example, let $f(z)=\frac{e^z}{1+e^z}$.


Alternative solution:

From source: draw a random real $w$ from a fixed distribution where each open interval has non-zero support. Compare $w$ with $z$ and claim $z$ is the larger if and only if $z>w$. Clearly, if $w$ is between $x$ and $y$ then the answer will be correct. Otherwise the probability of being right is $\frac{1}{2}$, therefore the overall chance is more than $\frac{1}{2}$.

No comments: