Chapter 9 - Complexity Analysis
Chapter 9 - Complexity Analysis
Complexity Analysis
CHAPTER 9
Search . . .
Asymptotic Notations
Search . . .
Theta (Average Case) You add the running times for each
possible input combination and take the average in the
average case.
Search . . .
3 Asymptotic Notations
2. Big-O Notations:
Big-O notation represents the upper bound of the running
time of an algorithm. Therefore, it gives the worst-case
complexity of an algorithm.
Summary
Search . . .
Memory Complexity
Search . . .
Units of Measurement:
Memory is typically measured in terms of the number of
variables or the size of the data structures used (e.g., arrays, lists).
Important points:
Important points:
1. P Class
2. NP Class
3. CoNP Class
4. NP-hard
5. NP-complete
Search . . .
1. P Class
1. P Class
Features:
1. P Class
2. NP Class
2. NP Class
Features:
Example:
3. Co-NP Class
3. Co-NP Class
Features:
3. Co-NP Class
4. NP-hard class
4. NP-hard class
Features:
4. NP-hard class
1. Halting problem.
2. Qualified Boolean formulas.
3. No Hamiltonian cycle.
Search . . .
5. NP-complete class
5. NP-complete class
Features:
5. NP-complete class
➢ Hamiltonian Cycle.
➢ Satisfiability.
➢ Vertex cover.
Search . . .
Summary:
Reference:
https://www.geeksforgeeks.org/complete-guide-on-complexity-analysis/