Abstract
This chapter begins with a strange algorithm, Russian Peasant Multiplication, that may or may not work correctly. (Verifying correctness is a constant theme throughout this book, and the techniques used to decide such issues are explained thoroughly later.)
The concept of an algorithm is illustrated by more examples: testing primes, factoring an integer into primes, and finding the greatest common divisor of two integers. Representation of numbers in computers is discussed, and truncation error is shown to be an unavoidable consequence of using machines to do computation.
This chapter ends with an algorithm to solve equations, that is, to find a numerical solution that is accurate to any degree one might desire. This illustrates the formal idea of the limit of a sequence in the context of how many iterations must be done by the algorithm to guarantee a specified accuracy.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag London
About this chapter
Cite this chapter
Jenkyns, T., Stephenson, B. (2013). Algorithms, Numbers, and Machines. In: Fundamentals of Discrete Math for Computer Science. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-1-4471-4069-6_1
Download citation
DOI: https://doi.org/10.1007/978-1-4471-4069-6_1
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-4471-4068-9
Online ISBN: 978-1-4471-4069-6
eBook Packages: Computer ScienceComputer Science (R0)