Skip to main content
Added \left & \right to make the least integer brackets bigger.
Source Link
Brian Hopkins
  • 4.3k
  • 30
  • 44

Because using the random operator destroys any potential gain from a previous subtraction, the optimal strategy must look like the one stated in the question. The solution of @RobPratt showed that in this case $$ V(n) = 1+\min\left(\frac{1}{t}\sum_{k=1}^t V(k), V(n-1)\right).$$ For $t=1000$ he showed that the threshold value is $m=44$ and for $n\geq m+2$ one has a constant $V(n) = m+\xi$ with $\xi=2/9$, whilst for $n\leq m+1$ one has $V(n)=n-1$. For general $t$ one can use the equation to infer that for some $0\leq \xi<1$ $$V(m+2) ~=~ 1+\frac{1}{t}\sum_{k=1}^t V(k) ~=~1+ \frac{1}{t}\sum_{k=1}^{m+1} (k-1) + \frac{(m+\xi) (t-m-1)}{t}. $$ Because $V(m+2) =m+\xi$ This gives $$m+\xi ~=~ 1+ \frac{1}{t} {m+1 \choose 2} + \frac{(m+\xi) (t-m-1)}{t},$$ and after solving for $\xi$: $$\xi= \frac{t}{m+1} -\frac{m}{2},~~{\rm or}~~0\leq \frac{t}{m+1} -\frac{m}{2}<1.$$ Rearranging gives $${m+1 \choose 2} \leq t< {m+2 \choose 2}, $$ which uniquely defines the threshold $m$ as $$m ~=~ \lfloor \frac{\sqrt{8\,t+1} -1}{2} \rfloor.$$$$m ~=~ \left\lfloor \frac{\sqrt{8\,t+1} -1}{2} \right\rfloor.$$

Because using the random operator destroys any potential gain from a previous subtraction, the optimal strategy must look like the one stated in the question. The solution of @RobPratt showed that in this case $$ V(n) = 1+\min\left(\frac{1}{t}\sum_{k=1}^t V(k), V(n-1)\right).$$ For $t=1000$ he showed that the threshold value is $m=44$ and for $n\geq m+2$ one has a constant $V(n) = m+\xi$ with $\xi=2/9$, whilst for $n\leq m+1$ one has $V(n)=n-1$. For general $t$ one can use the equation to infer that for some $0\leq \xi<1$ $$V(m+2) ~=~ 1+\frac{1}{t}\sum_{k=1}^t V(k) ~=~1+ \frac{1}{t}\sum_{k=1}^{m+1} (k-1) + \frac{(m+\xi) (t-m-1)}{t}. $$ Because $V(m+2) =m+\xi$ This gives $$m+\xi ~=~ 1+ \frac{1}{t} {m+1 \choose 2} + \frac{(m+\xi) (t-m-1)}{t},$$ and after solving for $\xi$: $$\xi= \frac{t}{m+1} -\frac{m}{2},~~{\rm or}~~0\leq \frac{t}{m+1} -\frac{m}{2}<1.$$ Rearranging gives $${m+1 \choose 2} \leq t< {m+2 \choose 2}, $$ which uniquely defines the threshold $m$ as $$m ~=~ \lfloor \frac{\sqrt{8\,t+1} -1}{2} \rfloor.$$

Because using the random operator destroys any potential gain from a previous subtraction, the optimal strategy must look like the one stated in the question. The solution of @RobPratt showed that in this case $$ V(n) = 1+\min\left(\frac{1}{t}\sum_{k=1}^t V(k), V(n-1)\right).$$ For $t=1000$ he showed that the threshold value is $m=44$ and for $n\geq m+2$ one has a constant $V(n) = m+\xi$ with $\xi=2/9$, whilst for $n\leq m+1$ one has $V(n)=n-1$. For general $t$ one can use the equation to infer that for some $0\leq \xi<1$ $$V(m+2) ~=~ 1+\frac{1}{t}\sum_{k=1}^t V(k) ~=~1+ \frac{1}{t}\sum_{k=1}^{m+1} (k-1) + \frac{(m+\xi) (t-m-1)}{t}. $$ Because $V(m+2) =m+\xi$ This gives $$m+\xi ~=~ 1+ \frac{1}{t} {m+1 \choose 2} + \frac{(m+\xi) (t-m-1)}{t},$$ and after solving for $\xi$: $$\xi= \frac{t}{m+1} -\frac{m}{2},~~{\rm or}~~0\leq \frac{t}{m+1} -\frac{m}{2}<1.$$ Rearranging gives $${m+1 \choose 2} \leq t< {m+2 \choose 2}, $$ which uniquely defines the threshold $m$ as $$m ~=~ \left\lfloor \frac{\sqrt{8\,t+1} -1}{2} \right\rfloor.$$

deleted 4 characters in body
Source Link
Karl Fabian
  • 1.6k
  • 9
  • 15

Because using the random operator destroys any potential gain from a previous the subtraction, the optimal strategy must look like the one stated in the question. The solution of @RobPratt showed that in this case $$ V(n) = 1+\min\left(\frac{1}{t}\sum_{k=1}^t V(k), V(n-1)\right).$$ For $t=1000$ he showed that the threshold value is $m=44$ and for $n\geq m+2$ one has a constant $V(n) = m+\xi$ with $\xi=2/9$, whilst for $n\leq m+1$ one has $V(n)=n-1$. For general $t$ one can use the equation to infer that for some $0\leq \xi<1$ $$V(m+2) ~=~ 1+\frac{1}{t}\sum_{k=1}^t V(k) ~=~1+ \frac{1}{t}\sum_{k=1}^{m+1} (k-1) + \frac{(m+\xi) (t-m-1)}{t}. $$ Because $V(m+2) =m+\xi$ This gives $$m+\xi ~=~ 1+ \frac{1}{t} {m+1 \choose 2} + \frac{(m+\xi) (t-m-1)}{t},$$ and after solving for $\xi$: $$\xi= \frac{t}{m+1} -\frac{m}{2},~~{\rm or}~~0\leq \frac{t}{m+1} -\frac{m}{2}<1.$$ Rearranging gives $${m+1 \choose 2} \leq t< {m+2 \choose 2}, $$ which uniquely defines the threshold $m$ as $$m ~=~ \lfloor \frac{\sqrt{8\,t+1} -1}{2} \rfloor.$$

Because using the random operator destroys any potential gain from a previous the subtraction, the optimal strategy must look like the one stated in the question. The solution of @RobPratt showed that in this case $$ V(n) = 1+\min\left(\frac{1}{t}\sum_{k=1}^t V(k), V(n-1)\right).$$ For $t=1000$ he showed that the threshold value is $m=44$ and for $n\geq m+2$ one has a constant $V(n) = m+\xi$ with $\xi=2/9$, whilst for $n\leq m+1$ one has $V(n)=n-1$. For general $t$ one can use the equation to infer that for some $0\leq \xi<1$ $$V(m+2) ~=~ 1+\frac{1}{t}\sum_{k=1}^t V(k) ~=~1+ \frac{1}{t}\sum_{k=1}^{m+1} (k-1) + \frac{(m+\xi) (t-m-1)}{t}. $$ Because $V(m+2) =m+\xi$ This gives $$m+\xi ~=~ 1+ \frac{1}{t} {m+1 \choose 2} + \frac{(m+\xi) (t-m-1)}{t},$$ and after solving for $\xi$: $$\xi= \frac{t}{m+1} -\frac{m}{2},~~{\rm or}~~0\leq \frac{t}{m+1} -\frac{m}{2}<1.$$ Rearranging gives $${m+1 \choose 2} \leq t< {m+2 \choose 2}, $$ which uniquely defines the threshold $m$ as $$m ~=~ \lfloor \frac{\sqrt{8\,t+1} -1}{2} \rfloor.$$

Because using the random operator destroys any potential gain from a previous subtraction, the optimal strategy must look like the one stated in the question. The solution of @RobPratt showed that in this case $$ V(n) = 1+\min\left(\frac{1}{t}\sum_{k=1}^t V(k), V(n-1)\right).$$ For $t=1000$ he showed that the threshold value is $m=44$ and for $n\geq m+2$ one has a constant $V(n) = m+\xi$ with $\xi=2/9$, whilst for $n\leq m+1$ one has $V(n)=n-1$. For general $t$ one can use the equation to infer that for some $0\leq \xi<1$ $$V(m+2) ~=~ 1+\frac{1}{t}\sum_{k=1}^t V(k) ~=~1+ \frac{1}{t}\sum_{k=1}^{m+1} (k-1) + \frac{(m+\xi) (t-m-1)}{t}. $$ Because $V(m+2) =m+\xi$ This gives $$m+\xi ~=~ 1+ \frac{1}{t} {m+1 \choose 2} + \frac{(m+\xi) (t-m-1)}{t},$$ and after solving for $\xi$: $$\xi= \frac{t}{m+1} -\frac{m}{2},~~{\rm or}~~0\leq \frac{t}{m+1} -\frac{m}{2}<1.$$ Rearranging gives $${m+1 \choose 2} \leq t< {m+2 \choose 2}, $$ which uniquely defines the threshold $m$ as $$m ~=~ \lfloor \frac{\sqrt{8\,t+1} -1}{2} \rfloor.$$

Source Link
Karl Fabian
  • 1.6k
  • 9
  • 15

Because using the random operator destroys any potential gain from a previous the subtraction, the optimal strategy must look like the one stated in the question. The solution of @RobPratt showed that in this case $$ V(n) = 1+\min\left(\frac{1}{t}\sum_{k=1}^t V(k), V(n-1)\right).$$ For $t=1000$ he showed that the threshold value is $m=44$ and for $n\geq m+2$ one has a constant $V(n) = m+\xi$ with $\xi=2/9$, whilst for $n\leq m+1$ one has $V(n)=n-1$. For general $t$ one can use the equation to infer that for some $0\leq \xi<1$ $$V(m+2) ~=~ 1+\frac{1}{t}\sum_{k=1}^t V(k) ~=~1+ \frac{1}{t}\sum_{k=1}^{m+1} (k-1) + \frac{(m+\xi) (t-m-1)}{t}. $$ Because $V(m+2) =m+\xi$ This gives $$m+\xi ~=~ 1+ \frac{1}{t} {m+1 \choose 2} + \frac{(m+\xi) (t-m-1)}{t},$$ and after solving for $\xi$: $$\xi= \frac{t}{m+1} -\frac{m}{2},~~{\rm or}~~0\leq \frac{t}{m+1} -\frac{m}{2}<1.$$ Rearranging gives $${m+1 \choose 2} \leq t< {m+2 \choose 2}, $$ which uniquely defines the threshold $m$ as $$m ~=~ \lfloor \frac{\sqrt{8\,t+1} -1}{2} \rfloor.$$