Xandra studies in Eindhoven and her friend
Yvonne in Canberra.
Clearly they are a long way apart.
But they want to know if they have the same study material.
Locally they both have phenomenal machinery at their disposal.
But communication is the problem.
They have both transformed their material into a bit string of length
1013 (in the same way).
Their modems can send up to 28800 bytes per second, i.e.,
28800 × 8 × 365 × 24 × 3600
1013
bits per year.
A simple test to compare the notes
Analysis of the probability of an error
A simple test to compare the notes
The simplest way to test equality of the material is that Xandra sends her material bit by bit to Yvonne and Yvonne checks bit for bit whether hers is the same. Given the speed of their communication, this will take a year. Check this! There is no faster method to determine with certainty that their material is the same or not. But if they are satisfied with an answer which allows a small margin of error the checking can be done much faster... thanks to primes!
This checking procedure is as follows.
These numbers are between 0 and p-1.
Why does the test work?
Of course we have:
x = y implies x mod p = y mod p.
This means that the conclusion
x
y
is justified if
So suppose that x mod p = y mod p.
How large is the
probability of an error? How large is the possibility that
x
y?
In that case x - y must be a multiple of p unequal
to 0. So the chance of a wrong conclusion equals
| P := | number of prime divisors of x - y ----------------------- . number of primes < 2500 |
This probability is very small. It is smaller than 10-134, as we will show in the next step.
Analysis of the probability of an error
As we have seen before, the probability P of an error equals
| P := | number of prime divisors of x - y ------------------------ . number of primes < 2500 |
First we analyze the numerator
If k is the number of primes that divide the number z, then
2 · 3 · 5 ··· pk,
Now the denominator
According to the prime number theorem
the number of primes
less than z is approximately
z/log(z).
So the denominator is about
If x and y are not the same, then a similar computation shows that the above method verifies this with very large probability.