Algorithm (from
"Fundamentals of Data Structures", by Horowitz & Sahni)
An algorithm
is a finite set of instructions which, if followed, accomplish a particular
task.
In
addition, every algorithm must satisfy the following criteria:
1. Input:
there are zero or more quantities which are externally supplied
2. Output:
at least one quantity is produced
3. Definiteness:
each instruction must be clear and unambiguous
4. Finiteness:
if we trace the instructions of an algorithm, then for all cases, the algorithm
will terminate after a finite number of steps
5. Effectiveness:
every instruction must be sufficiently basic that it can in principle be
carried out by a person using only pencil and paper. It is not enough that each
operation be definite, but it must also be feasible.
No comments:
Post a Comment