How to generate sequence like this?

53 Views Asked by At

Can you tell what algorithm can generate sequence $x_1, x_2, x_3, x_4, ...$ satisfying:

  1. $x_n$ is real, and always $0<x_n<1$.

  2. Every change between $x_n$ and $x_{n+1}$, such as increase or decrease and their amount, can be controlled by a variable with values, say, $+ε$ or $-ε$ where $ε$ is not necessarily between 0 and 1.

This sequence are intended for me to be probabilities, which can be changed step by step.

Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $\displaystyle c_n=\tan \left(\tau\left(\frac{x_n}2-\frac{1}4\right)\right )$. Each real $c_n$ corresponds to a unique real $0<x_n<1$

Take $c_{n+1}=c_n\pm \epsilon$ and solve for $x_{n+1}$.