Skip to main content Accessibility help
×
Hostname: page-component-7479d7b7d-fwgfc Total loading time: 0 Render date: 2024-07-11T21:22:06.988Z Has data issue: false hasContentIssue false

Appendix B - Complexity of Algorithms

Published online by Cambridge University Press:  05 June 2012

Richard Wiener
Affiliation:
University of Colorado, Colorado Springs
Lewis J. Pinson
Affiliation:
University of Colorado, Colorado Springs
Get access

Summary

Two resources coveted by software developers are memory space and execution time. Among the factors that determine the memory footprint of an application or its execution time is the algorithm chosen in the application (there may of course be many algorithms used within an application).

The space taken by an algorithm is related to the information structure used to hold the data and any other information structures required to support the computational process. These are usually defined as fields in the data structure class.

The time required to execute an algorithm is dependent on the structure of the algorithm. We are usually concerned with the worst-case time, the best-case time, and the average time, to be defined in the following paragraphs. Sometimes these are the same. These execution times are usually related to one or more parameters that determine the size of the problem being solved. To be conservative we normally rely on worst-case time when comparing two algorithms.

The worst-case time is the longest time that any problem of specified size takes to execute. The best-case time is the shortest time that any problem of specified size takes to execute. The average-case time is an estimate of the time required for an average problem of specified size.

For worst-case, best-case, and average-case times, we are normally concerned with asymptotic time complexity – in plain English, the time required to complete an algorithm as a function of problem size when the problem size is assumed to be large.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2000

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Complexity of Algorithms
  • Richard Wiener, University of Colorado, Colorado Springs, Lewis J. Pinson, University of Colorado, Colorado Springs
  • Book: Fundamentals of OOP and Data Structures in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511807176.021
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Complexity of Algorithms
  • Richard Wiener, University of Colorado, Colorado Springs, Lewis J. Pinson, University of Colorado, Colorado Springs
  • Book: Fundamentals of OOP and Data Structures in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511807176.021
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Complexity of Algorithms
  • Richard Wiener, University of Colorado, Colorado Springs, Lewis J. Pinson, University of Colorado, Colorado Springs
  • Book: Fundamentals of OOP and Data Structures in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511807176.021
Available formats
×