Sunday, November 3, 2013

Algorithm Complexity

In programming we are often interested in how our final piece of software performs. In particular we usually want to find the relationship between the size of our input (into the program) and the time/space the program will require in order to perform the operations needed. This is needed in order to try and minimize the resources that a program will use. We don’t want to overload the hardware which runs our software and we don’t want the user to wait forever for the program to execute. So once we find the relationship (in form of a function) we can determine the order, which is basically the leading term in the function. The order tells us everything we need and it can be constant, logarithmic, linear, quadratic, cubic, exponential and even worse (listed from most efficient). At the end if we have algorithms that perform the task, we always prefer/choose the one with the best order.

No comments:

Post a Comment