Analysis of Algorithms
Description
An algorithm is a finite set of precise instructions that are performed to solve a problem. So, every algorithm is constructed using a finite sequence of statements. The origin of the word algorithm goes back to Muhammad Ibn Musa Al-Khwarizmi (ca. 780–840), whose book on the Indian number system and reckoning methods (addition, subtraction, multiplication, division, working with fractions, computing roots) revolutionized occidental mathematics. In the first half of this book chapter, we present the fundamentals of runtime analysis and study the asymptotic analysis of algorithms. In the second half of this book chapter, we analyze sequential programs, which are programs without function calls. We also analyze recursive and nonrecursive programs, which are programs with function calls. Finally, we briefly introduce the complexity classes NP and NP-complete.