# Properties of Algorithms

There are a few properties of algorithms which need to be understood before diving into understanding complexity. For the moment, we will only be looking at complexity of single variable algorithms (that is, single input). The multi-variable analysis is trivial to generalise.

Let be an algorithm with input and , where , a measure of the length of input. Let and be the input and output sets respectively. Then an algorithm consists of two attributes:

1. Input with .
2. Output with

We can exploit these properties to try and understand algorithms better. In fact, these properties are the very things we use when we try to talk about the algorithmic complexity. Rather than describing the time it takes the algorithm to run on a computer - which would be machine dependant - we can in fact make measurements in terms of the length of input, say. This is clearly machine independent - which is what we actually want to achieve.

Menaka Lashitha Bandara 2005-04-18