Big Bright Pixels

Algorithm

October 07, 2019

Wikipedia defines an algorithm as:

A sequence of instructions, typically to solve a class of problems or perform a computation.

According to Donald E. Knuth in ”The Art of Computer Programming”, an algorithm possesses five characteristics:

  1. Finiteness: An algorithm must terminate after a finite number of steps, of course this doesn’t mean that the number of steps might no be arbitrarily large.
  2. Definiteness: Each step must be precisely clearly defined. They cannot be ambiguous.
  3. Input: An algorithm takes zero or more parameters.
  4. Output: An algorithm has at least one output.
  5. Effectiveness: In principle, an algorithm must be able to be completed by person using a pencil and paper in a finite amount of time.