More clarification:
What was said earlier is correct. As long as the picking of prisoners is truly random, the prisoners will never get to 100% certainty over any length of time. However, they can pick a length of time to wait until the chance of being wrong is statistically very tiny.
The stats guys can probably do better, but I approximate the odds by saying that one the first day, a given prisoner has a 1% chance of being picked. Or said another way, he has a 99% chance of not being picked. On day two, his odds of not being picked are 98.01%, or .99^2.
Blowing it out a little:
Ten days: .99^10 = 90.4% chance of not being picked.
50 days: .99^50 = 60.5%
100 days: .99^100 = 36.6%
1 year: .99^365 = 2.55%
2 years: .99^730 = 0.06% (1 in 1535 chance of getting everyone killed if you declare now)
3 years: .99^1095 = 0.0016% (1 in 60,181)
4 years: .99^1460 = 0.0000424% (1 in 2,358,391)
Using this math, the chance is less than one in a million of being wrong at the 3 years and 9 months point.
I'm not a stats guy, and the actual math may be more complex to get it exactly right. (Malmo, any probability help?) But waiting for some agreed upon amount of time is the right solution. All the prisoners should probably go with four years as their number, the odds of getting hit with lightning are greater than being wrong after four years.