Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-c47g7 Total loading time: 0 Render date: 2024-04-19T10:59:21.677Z Has data issue: false hasContentIssue false

Introduction

Published online by Cambridge University Press:  05 June 2012

Jeff Edmonds
Affiliation:
York University, Toronto
Get access

Summary

From determining the cheapest way to make a hot dog to monitoring the workings of a factory, there are many complex computational problems to be solved. Before executable code can be produced, computer scientists need to be able to design the algorithms that lie behind the code, be able to understand and describe such algorithms abstractly, and be confident that they work correctly and efficiently. These are the goals of computer scientists.

A Computational Problem: A specification of a computational problem uses pre-conditions and post-conditions to describe for each legal input instance that the computation might receive, what the required output or actions are. This may be a function mapping each input instance to the required output. It may be an optimization problem which requires a solution to be outputted that is “optimal” from among a huge set of possible solutions for the given input instance. It may also be an ongoing system or data structure that responds appropriately to a constant stream of input.

Example: The sorting problem is defined as follows:

  1. Preconditions: The input is a list of n values, including possible repetitions.

  2. Postconditions: The output is a list consisting of the same n values in non-decreasing order.

An Algorithm: An algorithm is a step-by-step procedure which, starting with an input instance, produces a suitable output. It is described at the level of detail and abstraction best suited to the human audience that must understand it. In contrast, code is an implementation of an algorithm that can be executed by a computer. Pseudocode lies between these two.

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

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.

  • Introduction
  • Jeff Edmonds, York University, Toronto
  • Book: How to Think About Algorithms
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511808241.002
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.

  • Introduction
  • Jeff Edmonds, York University, Toronto
  • Book: How to Think About Algorithms
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511808241.002
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.

  • Introduction
  • Jeff Edmonds, York University, Toronto
  • Book: How to Think About Algorithms
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511808241.002
Available formats
×