At the heart of science and mathematics is classification. When we classify things, they we are essentially recognising they are similar in a certain way.
Likewise, we like to be able to say that a certain class of algorithms are easy and others hard.
Let
be the complexity measure
of program
. Then the classes are:
In the standard setting, the complexity classes can be written as follows:
| P |
We will talk in terms of time complexity in explaining the complexity classes.