Skip to main content

Writing and Comparing Algorithms

  • Chapter
What Is Computer Science?

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

  • 3405 Accesses

Abstract

This Chapter presents a brief introduction to the study of algorithms, which are described from first-principles as formal sets of directions which describe how to perform a task. The goal is to demonstrate that algorithms are fundamental tools in Computer Science, but, on the other hand, no more complicated than a set of driving directions or cookery instructions.

A running example, namely the task of exponentiation (or powering) of one number by another, is used throughout; similar arithmetic is used within cryptographic schemes studied in later Chapters. By analysing how different algorithms for exponentiation behave, the Chapter shows we can compare them fairly against each other. Ultimately, this means we can select the most efficient algorithm for a given task.

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.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

References

  1. Wikipedia: Algorithm. http://en.wikipedia.org/wiki/Algorithm

  2. Wikipedia: Big-O notation. http://en.wikipedia.org/wiki/Big_O_notation

  3. Wikipedia: Carmichael number. http://en.wikipedia.org/wiki/Carmichael_number

  4. Wikipedia: Computational complexity theory. http://en.wikipedia.org/wiki/Computational_complexity_theory

  5. Wikipedia: Coprime. http://en.wikipedia.org/wiki/Coprime

  6. Wikipedia: Exponentiation by squaring. http://en.wikipedia.org/wiki/Exponentiation_by_squaring

  7. Wikipedia: Fermat primality test. http://en.wikipedia.org/wiki/Fermat_primality_test

  8. Wikipedia: Floor and ceiling functions. http://en.wikipedia.org/wiki/Floor_and_ceiling_functions

  9. Wikipedia: Flow chart. http://en.wikipedia.org/wiki/Flowchart

  10. Wikipedia: Horner’s scheme. http://en.wikipedia.org/wiki/Horner_scheme

  11. Wikipedia: Pesudo-code. http://en.wikipedia.org/wiki/Pseudo_code

  12. Wikipedia: Prime number. http://en.wikipedia.org/wiki/Prime_number

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Page, D., Smart, N. (2014). Writing and Comparing Algorithms. In: What Is Computer Science?. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-04042-4_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-04042-4_2

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-04041-7

  • Online ISBN: 978-3-319-04042-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics