Book contents
- Computational Thinking for Life Scientists
- Reviews
- Computational Thinking for Life Scientists
- Copyright page
- Dedication
- Contents
- Introduction
- Part I: Programming in Python
- 1 Crash Introduction to Python
- 2 Efficiency Matters – Gentle Introduction to Complexity
- Part II: Sequences
- Part III: Graphs and Networks
- Part IV: Images
- Part V: Limitations of Computing
- Index
2 - Efficiency Matters – Gentle Introduction to Complexity
from Part I: - Programming in Python
Published online by Cambridge University Press: 19 August 2022
- Computational Thinking for Life Scientists
- Reviews
- Computational Thinking for Life Scientists
- Copyright page
- Dedication
- Contents
- Introduction
- Part I: Programming in Python
- 1 Crash Introduction to Python
- 2 Efficiency Matters – Gentle Introduction to Complexity
- Part II: Sequences
- Part III: Graphs and Networks
- Part IV: Images
- Part V: Limitations of Computing
- Index
Summary
In this chapter, you will encounter one of the most fundamental notions in CS – complexity of computations. We take a rather non-formal approach in presenting this topic, with an emphasis on intuition. Complexity of algorithms has two flavors – time complexity, which is related to running time, and memory, or space complexity, which reflects the memory allocation requirements of an algorithm. In this chapter, and in most other chapters as well, we will focus primarily on time complexity (except for some cases, in which memory poses a real limitation). You are not expected to become an expert in analyzing the complexity of algorithms. However, you should be able, by the end of this chapter, to understand how running time depends on an algorithm’s input size and to estimate empirically an algorithm’s actual running time. Later in the book, in chapter 11 (Mission Infeasible), we will get acquainted with the notion of complexity from another perspective – computational problems that can be solved in principle, but for which no efficient solutions are known.
- Type
- Chapter
- Information
- Computational Thinking for Life Scientists , pp. 42 - 54Publisher: Cambridge University PressPrint publication year: 2022