Skip to main content
Bounty Ended with 100 reputation awarded by Harry Altman
deleted 4 characters in body
Source Link
RaphaelB4
  • 4.4k
  • 12
  • 25

Just a remark : with your weights (0,...,n) you have an simple formula to calculate the expectation. $$v_1(1b_1b_2\cdots b_n)=1+v_1(b_1\cdots b_n) $$ $$v_1(0b_1b_2\cdots b_n)=\frac{1}{n+2}+\frac{n+3}{n+2}v_1(b_1 \cdots b_n) $$ Proof : Let us call $Y$ the value obtained by the first player with a sequence $b_1 \cdots b_n$. Now consider the same sequence where we add a digit at the beginning. We note $\tilde{Y}$ the new value of the first player.

If it is a $1$, the first player will erase the $0$ stack and we are reduce to the previous problem but with stack $k+1$ instead of $k$. and then $\tilde{Y}=Y+1$. And therefore

$$v_1(1b_1b_2\cdots b_n)=\mathbb{E}(\tilde{Y})=\mathbb{E}(Y)+1= v_1(b_1\cdots b_n)+1 $$

If it is a 0, then the second player erase randomly one stack $X$. We are reduce to the previous problem but with stack $k$ if $k<X$ and $k+1$ if $k\geq X$ instead of $k$. The rest of the game follow identically but at the end $\tilde{Y}=Y$ if $X> Y_n$$X> Y$ or $\tilde{Y}=Y +1$ if $Y\geq X$. Therefore $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y_n=i)\mathbb{P}(X\leq i) $$$$\mathbb{E}(\tilde{Y})=\sum_{i=0}^{n}i\times\mathbb{P}(Y=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y=i)\mathbb{P}(X\leq i) $$ $\mathbb{P}(X\leq i)=\frac{i+1}{n+2}$and we have

$$\mathbb{E}(\tilde{Y})=\sum_{i=0}^{n}i\times\mathbb{P}(Y=i)+\mathbb{P}(Y=i)\frac{i+1}{n+2}$$ and then $$\mathbb{E}(\tilde{Y})=\frac{n+3}{n+2}\mathbb{E}(Y)+\frac{1}{n+2}$$ which can be written as $$\mathbb{E}(\tilde{Y}+1)=(\frac{n+3}{n+2})\mathbb{E}(Y+1)$$ Exemple : $$v(01101)+1=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$ so $v(01101)=\frac{40}{9}$ (as numerically calculated by Claude).

Just a remark : with your weights (0,...,n) you have an simple formula to calculate the expectation. $$v_1(1b_1b_2\cdots b_n)=1+v_1(b_1\cdots b_n) $$ $$v_1(0b_1b_2\cdots b_n)=\frac{1}{n+2}+\frac{n+3}{n+2}v_1(b_1 \cdots b_n) $$ Proof : Let us call $Y$ the value obtained by the first player with a sequence $b_1 \cdots b_n$. Now consider the same sequence where we add a digit at the beginning. We note $\tilde{Y}$ the new value of the first player.

If it is a $1$, the first player will erase the $0$ stack and we are reduce to the previous problem but with stack $k+1$ instead of $k$. and then $\tilde{Y}=Y+1$. And therefore

$$v_1(1b_1b_2\cdots b_n)=\mathbb{E}(\tilde{Y})=\mathbb{E}(Y)+1= v_1(b_1\cdots b_n)+1 $$

If it is a 0, then the second player erase randomly one stack $X$. We are reduce to the previous problem but with stack $k$ if $k<X$ and $k+1$ if $k\geq X$ instead of $k$. The rest of the game follow identically but at the end $\tilde{Y}=Y$ if $X> Y_n$ or $\tilde{Y}=Y +1$ if $Y\geq X$. Therefore $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y_n=i)\mathbb{P}(X\leq i) $$ $\mathbb{P}(X\leq i)=\frac{i+1}{n+2}$and we have

$$\mathbb{E}(\tilde{Y})=\sum_{i=0}^{n}i\times\mathbb{P}(Y=i)+\mathbb{P}(Y=i)\frac{i+1}{n+2}$$ and then $$\mathbb{E}(\tilde{Y})=\frac{n+3}{n+2}\mathbb{E}(Y)+\frac{1}{n+2}$$ which can be written as $$\mathbb{E}(\tilde{Y}+1)=(\frac{n+3}{n+2})\mathbb{E}(Y+1)$$ Exemple : $$v(01101)+1=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$ so $v(01101)=\frac{40}{9}$ (as numerically calculated by Claude).

Just a remark : with your weights (0,...,n) you have an simple formula to calculate the expectation. $$v_1(1b_1b_2\cdots b_n)=1+v_1(b_1\cdots b_n) $$ $$v_1(0b_1b_2\cdots b_n)=\frac{1}{n+2}+\frac{n+3}{n+2}v_1(b_1 \cdots b_n) $$ Proof : Let us call $Y$ the value obtained by the first player with a sequence $b_1 \cdots b_n$. Now consider the same sequence where we add a digit at the beginning. We note $\tilde{Y}$ the new value of the first player.

If it is a $1$, the first player will erase the $0$ stack and we are reduce to the previous problem but with stack $k+1$ instead of $k$. and then $\tilde{Y}=Y+1$. And therefore

$$v_1(1b_1b_2\cdots b_n)=\mathbb{E}(\tilde{Y})=\mathbb{E}(Y)+1= v_1(b_1\cdots b_n)+1 $$

If it is a 0, then the second player erase randomly one stack $X$. We are reduce to the previous problem but with stack $k$ if $k<X$ and $k+1$ if $k\geq X$ instead of $k$. The rest of the game follow identically but at the end $\tilde{Y}=Y$ if $X> Y$ or $\tilde{Y}=Y +1$ if $Y\geq X$. Therefore $$\mathbb{E}(\tilde{Y})=\sum_{i=0}^{n}i\times\mathbb{P}(Y=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y=i)\mathbb{P}(X\leq i) $$ $\mathbb{P}(X\leq i)=\frac{i+1}{n+2}$and we have

$$\mathbb{E}(\tilde{Y})=\sum_{i=0}^{n}i\times\mathbb{P}(Y=i)+\mathbb{P}(Y=i)\frac{i+1}{n+2}$$ and then $$\mathbb{E}(\tilde{Y})=\frac{n+3}{n+2}\mathbb{E}(Y)+\frac{1}{n+2}$$ which can be written as $$\mathbb{E}(\tilde{Y}+1)=(\frac{n+3}{n+2})\mathbb{E}(Y+1)$$ Exemple : $$v(01101)+1=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$ so $v(01101)=\frac{40}{9}$ (as numerically calculated by Claude).

added 92 characters in body
Source Link
RaphaelB4
  • 4.4k
  • 12
  • 25

Just a remark : with your weights (0,...,n) you have an simple formula to calculate the expectation.

Let a sequence $(101100\cdots0)$ of length $$v_1(1b_1b_2\cdots b_n)=1+v_1(b_1\cdots b_n) $$ $$v_1(0b_1b_2\cdots b_n)=\frac{1}{n+2}+\frac{n+3}{n+2}v_1(b_1 \cdots b_n) $$ Proof $n$ and let: Let us call $Y_n$$Y$ the value obtained by the first player with a sequence $b_1 \cdots b_n$. Now consider the same sequence where we add a digit at the beginning. We note $\tilde{Y}$ the new value of the first player.

If it is a $1$: $(\color{red}{1}101100\cdots0)$, the first player will erase the $0$ stack and we are reduce to the previous problem but with stack $k+1$ instead of $k$. and then $Y_{n+1}=Y_n+1$$\tilde{Y}=Y+1$. And therefore $\mathbb{E}(Y_{n+1})=\mathbb{E}(Y_{n})+1$

$$v_1(1b_1b_2\cdots b_n)=\mathbb{E}(\tilde{Y})=\mathbb{E}(Y)+1= v_1(b_1\cdots b_n)+1 $$

If it is a 0: $(\color{red}{0}101100\cdots0)$ Then, then the second player erase randomly one stack $X$. We are reduce to the previous problem but with stack $k$ if $k<X$ and $k+1$ if $k\geq X$ instead of $k$. The rest of the game follow identically but at the end $Y_{n+1}=Y_n$$\tilde{Y}=Y$ if $X> Y_n$ or $Y_{n+1}=Y_n +1$$\tilde{Y}=Y +1$ if $Y_n\geq X$$Y\geq X$. Therefore $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y_n=i)\mathbb{P}(X\leq i) $$ $\mathbb{P}(X\leq i)=\frac{i+1}{n+1}$$\mathbb{P}(X\leq i)=\frac{i+1}{n+2}$and we have

$$\mathbb{E}(\tilde{Y})=\sum_{i=0}^{n}i\times\mathbb{P}(Y=i)+\mathbb{P}(Y=i)\frac{i+1}{n+2}$$ $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)+\mathbb{P}(Y_n=i)\frac{i+1}{n+1}$$ andand then $$\mathbb{E}(Y_{n+1}+1)=(\frac{n+2}{n+1})\mathbb{E}(Y_{n}+1)$$$$\mathbb{E}(\tilde{Y})=\frac{n+3}{n+2}\mathbb{E}(Y)+\frac{1}{n+2}$$ which can be written as Conclusion : $$\mathbb{E}(Y_{n+1}+1)=\begin{cases} \mathbb{E}(Y_{n+1}+1)+1 \\ \frac{n+2}{n+1}\mathbb{E}(Y_{n+1}+1) \end{cases} $$$$\mathbb{E}(\tilde{Y}+1)=(\frac{n+3}{n+2})\mathbb{E}(Y+1)$$ Exemple : for $(01101)$ $$\mathbb{E}(Y_5+1)=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$$$v(01101)+1=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$ so $\mathbb{E}(Y_5)=\frac{40}{9}$$v(01101)=\frac{40}{9}$ (as numerically calculated by Claude).

Just a remark : with your weights (0,...,n) you have an simple formula to calculate the expectation.

Let a sequence $(101100\cdots0)$ of length $n$ and let us call $Y_n$ the value obtained by the first player. Now consider the same sequence where we add a digit at the beginning.

If it is a $1$: $(\color{red}{1}101100\cdots0)$ the first player will erase the $0$ stack and we are reduce to the previous problem but with stack $k+1$ instead of $k$. and then $Y_{n+1}=Y_n+1$. And therefore $\mathbb{E}(Y_{n+1})=\mathbb{E}(Y_{n})+1$

If it is a 0: $(\color{red}{0}101100\cdots0)$ Then the second player erase randomly one stack $X$. We are reduce to the previous problem but with stack $k$ if $k<X$ and $k+1$ if $k\geq X$ instead of $k$. The rest of the game follow identically but at the end $Y_{n+1}=Y_n$ if $X> Y_n$ or $Y_{n+1}=Y_n +1$ if $Y_n\geq X$. Therefore $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y_n=i)\mathbb{P}(X\leq i) $$ $\mathbb{P}(X\leq i)=\frac{i+1}{n+1}$and we have $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)+\mathbb{P}(Y_n=i)\frac{i+1}{n+1}$$ and then $$\mathbb{E}(Y_{n+1}+1)=(\frac{n+2}{n+1})\mathbb{E}(Y_{n}+1)$$ Conclusion : $$\mathbb{E}(Y_{n+1}+1)=\begin{cases} \mathbb{E}(Y_{n+1}+1)+1 \\ \frac{n+2}{n+1}\mathbb{E}(Y_{n+1}+1) \end{cases} $$ Exemple : for $(01101)$ $$\mathbb{E}(Y_5+1)=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$ so $\mathbb{E}(Y_5)=\frac{40}{9}$ (as numerically calculated by Claude).

Just a remark : with your weights (0,...,n) you have an simple formula to calculate the expectation. $$v_1(1b_1b_2\cdots b_n)=1+v_1(b_1\cdots b_n) $$ $$v_1(0b_1b_2\cdots b_n)=\frac{1}{n+2}+\frac{n+3}{n+2}v_1(b_1 \cdots b_n) $$ Proof : Let us call $Y$ the value obtained by the first player with a sequence $b_1 \cdots b_n$. Now consider the same sequence where we add a digit at the beginning. We note $\tilde{Y}$ the new value of the first player.

If it is a $1$, the first player will erase the $0$ stack and we are reduce to the previous problem but with stack $k+1$ instead of $k$. and then $\tilde{Y}=Y+1$. And therefore

$$v_1(1b_1b_2\cdots b_n)=\mathbb{E}(\tilde{Y})=\mathbb{E}(Y)+1= v_1(b_1\cdots b_n)+1 $$

If it is a 0, then the second player erase randomly one stack $X$. We are reduce to the previous problem but with stack $k$ if $k<X$ and $k+1$ if $k\geq X$ instead of $k$. The rest of the game follow identically but at the end $\tilde{Y}=Y$ if $X> Y_n$ or $\tilde{Y}=Y +1$ if $Y\geq X$. Therefore $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y_n=i)\mathbb{P}(X\leq i) $$ $\mathbb{P}(X\leq i)=\frac{i+1}{n+2}$and we have

$$\mathbb{E}(\tilde{Y})=\sum_{i=0}^{n}i\times\mathbb{P}(Y=i)+\mathbb{P}(Y=i)\frac{i+1}{n+2}$$ and then $$\mathbb{E}(\tilde{Y})=\frac{n+3}{n+2}\mathbb{E}(Y)+\frac{1}{n+2}$$ which can be written as $$\mathbb{E}(\tilde{Y}+1)=(\frac{n+3}{n+2})\mathbb{E}(Y+1)$$ Exemple : $$v(01101)+1=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$ so $v(01101)=\frac{40}{9}$ (as numerically calculated by Claude).

Source Link
RaphaelB4
  • 4.4k
  • 12
  • 25

Just a remark : with your weights (0,...,n) you have an simple formula to calculate the expectation.

Let a sequence $(101100\cdots0)$ of length $n$ and let us call $Y_n$ the value obtained by the first player. Now consider the same sequence where we add a digit at the beginning.

If it is a $1$: $(\color{red}{1}101100\cdots0)$ the first player will erase the $0$ stack and we are reduce to the previous problem but with stack $k+1$ instead of $k$. and then $Y_{n+1}=Y_n+1$. And therefore $\mathbb{E}(Y_{n+1})=\mathbb{E}(Y_{n})+1$

If it is a 0: $(\color{red}{0}101100\cdots0)$ Then the second player erase randomly one stack $X$. We are reduce to the previous problem but with stack $k$ if $k<X$ and $k+1$ if $k\geq X$ instead of $k$. The rest of the game follow identically but at the end $Y_{n+1}=Y_n$ if $X> Y_n$ or $Y_{n+1}=Y_n +1$ if $Y_n\geq X$. Therefore $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)\mathbb{P}(X>i)+(i+1)\times\mathbb{P}(Y_n=i)\mathbb{P}(X\leq i) $$ $\mathbb{P}(X\leq i)=\frac{i+1}{n+1}$and we have $$\mathbb{E}(Y_{n+1})=\sum_{i=0}^{n}i\times\mathbb{P}(Y_n=i)+\mathbb{P}(Y_n=i)\frac{i+1}{n+1}$$ and then $$\mathbb{E}(Y_{n+1}+1)=(\frac{n+2}{n+1})\mathbb{E}(Y_{n}+1)$$ Conclusion : $$\mathbb{E}(Y_{n+1}+1)=\begin{cases} \mathbb{E}(Y_{n+1}+1)+1 \\ \frac{n+2}{n+1}\mathbb{E}(Y_{n+1}+1) \end{cases} $$ Exemple : for $(01101)$ $$\mathbb{E}(Y_5+1)=\frac{7}{6}\times(1+1+\frac{4}{3}\times 2)=\frac{98}{18} $$ so $\mathbb{E}(Y_5)=\frac{40}{9}$ (as numerically calculated by Claude).