Next: Types of Complexity
Up: Introduction to algorithm design
Previous: Introduction to algorithm design
Algorithms can be measured in a machine-independent way using the
Random Access Machine (RAM) model. This model assumes a single
processor. In the RAM model, instructions are executed one after the
other, with no concurrent operations. This model of computation is an
abstraction that allows us to compare algorithms on the basis of
performance. The assumptions made in the RAM model to accomplish this
are:
- Each simple operation takes 1 time step.
- Loops and subroutines are not simple operations.
- Each memory access takes one time step, and there is no
shortage of memory.
For any given problem the running time of an algorithms is assumed to
be the number
of time steps. The space used by an algorithm is assumed to be
the number of RAM memory cells.
Nitin Sharma
Wed Oct 8 17:46:14 PDT 1997