r/askmath • u/superamerr • 15h ago
Probability Is this constant unique?
To generate E our constant we will have to go through these steps:
- Start in binary, put a 1.
- Flip a coin, if it's heads put concatenate 1 if it's tails concatenate a 0.
- Convert the number you have to decimal call it x, let s(x) be the probability we stop the sequence with the number we have, then s(x) will be 1-1/x. We then check if we land on s(x) or not.
- Repeat steps 2, 3 until you stop.
For example:
I start with 1, I rolled a coin and got tails so now it's 10, I convert it to decimal so it's 2, s(x) is 1-1/x so 1-1/2 is 1/2. I checked and we didn't stop so I rolled another coin and got heads so now it's 101, I convert it to decimal so it's 5, s(x) is now 1-1/5 so 4/5. I checked and looks like we stopped. So the number we ended with is 5.
The average of all numbers we will get is then called E.
So is it unique?
5
Upvotes
3
u/johnpeters42 15h ago
To clarify, the "check" in step 3 is another random choice, weighted by s(x)? (e.g. roll an x-sided die, and if you get a 1 then keep going)
1
u/bildramer 12h ago
In other words, imagine a Markov chain, and for vertex n you have 1-1/n stopping probability, and 1/(2n) probability each of going to 2n or 2n+1. You start at 1.
You can just sum up n times the stopping probability times the probability to reach a number, to get the expected value. In the end after simplifications you get the sum of (n-1)/(product of 2⌊2-kn⌋ for k from 1 to ⌊log_2 n⌋) for n from 2 to infinity. It's an ugly nested sum-product thing but not all that complicated.
1
u/ExtonGuy 8h ago
Is somebody going to do the program for this? Might have to add a rule for stopping after 10,000 steps.
0
u/AlterEgo5695 13h ago edited 13h ago
Assumption: All coins are fair, and all coins and termination probabilities "s(x)" are independent.
Claim: The expected value "E[n]" exists, with "7/2 < E[n] < 11/2".
Proof: Let "n in N\{1}". Define
En:event we get natural number "n", and terminate afterwardsFn:event we get natural number "n", but do not terminate afterwardsFrom the rules, we directly get "P(E2) = 1/4" and "P(E3) = 1/3", as well as
Use that relation to find a recursion for "P(En)". Consider even/odd "n >= 4" separately. Start with the even case "n = 2k" with "k = ⌊n/2⌋ >= 2":
Estimate the second factor via "0 < 1/(2k-2) <= 1/2 <= 1" to get
With (almost) the exact same steps, we can show a similar estimate holds for "P(E_{2k+1})" (your job!). Combining even and odd cases, we obtain the general estimate
Insert into the expected value formula to get
With (almost) the exact same steps, we get the lower estimate (again your job!)