# 关于随机序列中存在记忆的定理

• 如果x1>x2，那么在所有小于x2的数字上投注1美元
• 如果x1 < x2，则在所有大于x2的数字上投注1美元

x1
x2x3

2
3
5
-\$2
2
5
3
+\$2
3
2
5
+\$2
3
5
2
+\$2
5
2
3
+\$2
5
3
2
-\$2

over2u:

over2u:

1. 如果最后一个旋转的滚动与倒数第二个旋转的数字相吻合，我们就跳过一步。
2. 如果x1 > x2，那么就在所有大于x2的数字上投注。我们有这样的数字：n - 1 - x2
3. 如果x1 < x2，那么就在所有低于x2的数字上投注。我们有这样的数字： x2

1

2

3中间

n - 1 - minret - n + 1 + min
4中间

5最大

n - 1 - minret - n + 1 + min
6最大

n - 1 - 中n - 1 - 中

```public class Main {

public static void main(String[] args) {
// Количество чисел на барабане
int n = 37;
double dn = n;
// Возврат денег дилером в случае если ставка выиграет
int ret = 35;
double total = 0 d;
// Счётчик спинов
int score = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (i != j) {
int max = Math.max(i, j);
int min = Math.min(i, j);
double dmax = max;
double dmin = min;
double result = 4 d * ret - 3 d * dn - 2 d * dmax + 2 d * dmin
+ 3 d;
System.out.println("Max = " + max + ", Min = " + min
+ ", Result = " + result);
total = total + result;
}
score++;
}
}
double dscore = score * 6;
total = total / dscore;
// Математическое ожидание выигрыша с одного спина
System.out.println("Total = " + total);
}
}
```

```...
Max = 36, Min = 28, Result = 16.0
Max = 36, Min = 29, Result = 18.0
Max = 36, Min = 30, Result = 20.0
Max = 36, Min = 31, Result = 22.0
Max = 36, Min = 32, Result = 24.0
Max = 36, Min = 33, Result = 26.0
Max = 36, Min = 34, Result = 28.0
Max = 36, Min = 35, Result = 30.0
Total = 1.0810810810810811```

sandex:

over2u:

server:

...这可能是作者已经做的 :)

Reshetov: