ABSTRACT

One of the most important jobs for programmers is choosing, or designing, the fastest algorithms to use when writing programs. Therefore, it is extremely important that they have some way to compare the speed of different algorithms. But algorithms can be very complicated and very different from each other, so comparing them is not easy. This chapter considers two factors, the algorithm and the input. It deals with a big-picture overview of algorithmic complexity. The general idea is that given any algorithm one can find a function associated with that algorithm that essentially describes how long it takes the algorithm to run. The chapter provides the definition of the time-complexity function for an algorithm. It utilizes the approximations on some specific examples of algorithms to figure out their time-complexity functions.