CS112 Week14
CS112 Week14
Algorithmic Complexity
What is complexity?
• The word complexity has a variety of different
technical meanings in different research fields.
• There is a field of complex systems, which studies
complicated, difficult-to-analyze non-linear and
chaotic natural & artificial systems.
• Another concept: Informational or descriptional
complexity: The amount of information needed to
completely describe an object.
– As studied by Kolmogorov, Chaitin, Bennett, others…
• In this course, we will study algorithmic or
computational complexity.
An interesting aside...
• Another, increasingly important measure of
complexity for computing is energy complexity –
– How much total physical energy is used up (rendered
unavailable) as a result of performing the computation?
• Motivations:
– Battery life, electricity cost, computer overheating!
– Computer performance within power constraints.
Problem Complexity
• The complexity of a computational problem
or task is (the order of growth of) the
complexity of the algorithm with the lowest
order of growth of complexity for solving
that problem or performing that task.
• E.g. the problem of searching an ordered
list has at most logarithmic time
complexity. (Complexity is O(log n).)
06/25/2025 (c)2001-2003, Michael P. Frank 18
Module #7 - Complexity
Unsolvable problems
• Turing discovered in the 1930’s that there
are problems unsolvable by any algorithm.
– Or equivalently, there are undecidable yes/no
questions, and uncomputable functions.
• Classic example: the halting problem.
– Given an arbitrary algorithm and its input, will
that algorithm eventually halt, or will it
continue forever in an “infinite loop?”
P vs. NP
• NP is the set of problems for which there
exists a tractable algorithm for checking a
proposed solution to tell if it is correct.
• We know that PNP, but the most famous
unproven conjecture in computer science is
that this inclusion is proper.
– i.e., that PNP rather than P=NP.
• Whoever first proves this will be famous!
(or disproves it!)
06/25/2025 (c)2001-2003, Michael P. Frank 24
Module #7 - Complexity