WOLFRAM|DEMONSTRATIONS PROJECT

Guessing a Number Using the Chinese Remainder Theorem

​
modulus
m
1
4
6
8
remainder
r
1
0
1
2
3
modulus
m
2
5
7
9
remainder
r
2
0
1
2
3
4
5
6
1
Choose two moduli
m
1
and
m
2
using the controls and think of a secret number
x
from 0 to
m
1
m
2
-1
. Use the controls to select
r
1
=mod(x,
m
1
)
and
r
2
=mod(x,
m
2
)
to reveal your number.