0

I'm having some trouble understanding "for the first reason but not for the second" from a sentence in a programming textbook called The Structure and Interpretation of the Computer Science(emphasis mine):

Numbers that fool the Fermat test are called Carmichael numbers, and little is known about them other than that they are extremely rare. There are 255 Carmichael numbers below 100,000,000. The smallest few are 561, 1105, 1729, 2465, 2821, and 6601. In testing primality of very large numbers chosen at random, the chance of stumbling upon a value that fools the Fermat test is less than the chance that cosmic radiation will cause the computer to make an error in carrying out a "correct" algorithm. Considering an algorithm to be inadequate for the first reason but not for the second illustrates the difference between mathematics and engineering.

Here is some context: the Fermat test is a test for primality. The answer it gives is only probably correct, although it would be correct in most cases.

From my understanding, the italicized sentence mainly talks about the fact that preciseness is vital in mathematics, but is not extremely important in engineering. However, I don't know what "the first reason" and "the second" refers to. Please explain it to me.

2

The text compares two methods of causing the fermat test to fail:

  1. the value being tested happens to be a Carmichael number - the chances of that being extremely rare.

  2. cosmic radiation causing the computer to make an error - also extremely rare, but less so than the possibility of the first, based on what the author is stating.

My interpretation of "Considering an algorithm to be inadequate for the first reason but not for the second illustrates the difference between mathematics and engineering" is that an engineer would consider the fermat test as being inadequate based on the possibility of the first event, but not on the possibility of the second event. The mathematician on the other hand (presumably because he or she wants a completely infallible test) would consider the fermat test as being inadequate based on the possibility of either the first OR the second event occurring.

  • I agree with you in general, but I think it would make more sense to say that a mathematican would consider the fermat test as being inadequate for the existence of Carmichael numbers, while an engineer would worry about the situation where the computer is hit by a cosmic radiation. – nalzok Nov 22 '16 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.