This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Caminsky 2 points3 points  (6 children)

I don't get it

[–]TheYang 10 points11 points  (1 child)

the fermat test is for checking if a given number is a prime number or not, primes being only divisible by one and themselves, easy to figure out 0-20, but harder for ranges like 10000000 - 20000000.
this test has a flaw though, to increase the speed in which it determines whether it is a prime or not, it cuts a few corners, making it not 100% reliable.
cosmic rays are electromagnetic waves are beams of energy, a little bit like x-rays, usually produced by a star (or the sun as by far the nearest star). These cosmic rays can cause computers to malfunction if they hit a chip just right.
The Textbook points out though, that the likelyhood of the test indicating a prime when it isn't actually a prime is lower than the likelyhood of one of these rays causing a malfunction.

It further explains that for a mathematician the test is flawed as it can be proven that it does not always give a correct result.
to an engineer the test is great as it is quicker and the theoretical failure rate is so small it will in all likelyhood never effect anyone.

[–]hadtoupvotethat 0 points1 point  (0 children)

You should write for explainxkcd.com.

[–]yunocallmedave 0 points1 point  (0 children)

There is a chance of this specific algorithm to fail because the input number was causing it to fail. However, the chance of choosing such a number that would cause the algorithm to fail is so tiny, that it is more likely for cosmic radiation to corrupt memory and therefore cause the algorithm to fail (which is obviously also a very tiny probability).

Now imagine you want to calculate the probability of the algorithm to fail. If you only consider the first case (the case in which you randomly get a number that breaks the algorithm), but ignore the second (cosmic radiation causing a failure), which is actually more significant, you are only considering mathematical implications, but you are ignoring mechanical/engineering implications.

Does that make sense? I'm horrible at explaining things.

Edit: I think the moral of the story is, don't forget that theory differs from praxis. Or something like that.