Chapter 2Computational Complexity
Any computation requires energy, which directly corresponds to the system resources consumed during the process. In computing, these resources are referred to as system resources, with the most essential being the processor and memory—since computation involves both executing instructions and storing intermediate results. The computational complexity of an algorithm, often referred to simply as its complexity, measures the amount of these resources needed for execution, with primary emphasis on time and memory usage.
This chapter explores the concept of computational machines and evaluates their efficiency. It then introduces the principles of amortized analysis and discusses the significance of recurrence relations in analyzing algorithms.
After reading this, readers will gain a clear knowledge of computational complexity, including a detailed demonstrations of the following:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access