Skip to main content

cs2010 Notes: 02 Algos

·1 min

Algorithms #

An algorithm is a sequence of steps to accomplish something.

Example:

  • Boil 6 cups of water in pot
  • Stir in macaroni, boil 6 to 8 minutes
  • drain, do not rinse, return to pot
  • add 1/4 cup butter, 1/4 cup milk, and cheese sauce mix
  • mix well

Ambiguity?

Textbook definition of algorithm:

A well-orderecd collection of unabigiously and effectively computable operations that, when executed, produces a result and halts in a finite amount of time.

  • Well-ordered collection?
  • Effectively computable?
  • Produces a result?
  • Halts in finite time?

Some Slides: ODP, PDF