Skip to main content

Algorithms, Numbers, and Machines

  • Chapter
  • First Online:
Book cover Fundamentals of Discrete Math for Computer Science

Part of the book series: Undergraduate Topics in Computer Science ((UTICS))

  • 4549 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Jenkyns, T., Stephenson, B. (2018). Algorithms, Numbers, and Machines. In: Fundamentals of Discrete Math for Computer Science. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-70151-6_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-70151-6_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-70150-9

  • Online ISBN: 978-3-319-70151-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics