Thumbnail
Access Restriction
Subscribed

Author Pritchard, Paul
Source ACM Digital Library
Content type Text
Publisher Association for Computing Machinery (ACM)
File Format PDF
Language English
Subject Keyword Prime numbers ♦ Chinese remainder theorem ♦ Program testing
Abstract Programs attributed to Wirth and Misra for generating the prime numbers up to a specified limit are investigated. It is shown that Wirth's program is incorrect according to three increasingly weak criteria, and a composite number is exhibited that the program accepts as prime. This is the smallest known counterexample, and could not have been found by the usual method of program testing—the program would run for trillions of years on the fastest computer before reaching it! Closely related counterexamples are given to a conjecture of Misra concerning his program. An appendix gives a particularly simple algorithmic proof of the Chinese remainder theorem.
Description Affiliation: Cornell Univ., Ithaca, NY (Pritchard, Paul)
Age Range 18 to 22 years ♦ above 22 year
Educational Use Research
Education Level UG and PG
Learning Resource Type Article
Publisher Date 2005-08-01
Publisher Place New York
Journal Communications of the ACM (CACM)
Volume Number 27
Issue Number 1
Page Count 5
Starting Page 53
Ending Page 57


Open content in new tab

   Open content in new tab
Source: ACM Digital Library