Title: INTRODUCTION TO
1INTRODUCTION TO COMPUTATIONAL COMPLEXITY
Instructor Stefan Dobrev E-mail
sdobrev_at_site.uottawa.ca Office SITE 5043 Office
hours by appointment
2Course Organization
- Course web page
- http//www.site.uottawa.ca/sdobrev/CSI5140-CC
- Textbook
- Christos Papadimitriu Computational Complexity
- Addison Wesley 1994, ISBN 0-201-53082-1
- (I will post additional reading on the course
web-site) - Grading
- 4 assignments 60
- test 40
3Algorithm/Problem Complexity
- Algorithm analysis
- how long will this algorithm execute on a given
input? - practically well motivated (we want to be sure
it works efficiently) - we can define (worst-case, average case) time
complexity of an algorithm - What if we cant find sufficiently efficient
algorithm for a given computational problem? - i.e. cant find O(n) sorting algorithm
- cant find polynomial algorithms for the TSP
- it makes sense to define also the complexity of
the problem
4Problem Complexity
- How much resources must any algorithm solving
this problem use? - Usually, time is the resource, but we will also
consider memory (space), non-determinism,
randomness - Are there computational problems that cannot be
algorithmically solved regardless of how much
time/memory is available? - we need precise definition of what a
computational problem is, and what is an
algorithm
5Models of Computation
- What is an algorithm?
- several smart people in the first part of 20th
century tried to formally capture the notion of
algorithm/computation - they came up with several notions
- Turing machines, recursive functions, lambda
calculus, - at the end, all of them turned out to be
equivalent - We will use Turing machines as our model of
computation - Lecture plan for the next 2 weeks - review the
Turing machines and related results
(undecidability)
6Complexity Classes
- What are the classes of problems that can be
solved in - O(n2) time?
- using polynomial memory?
- using polynomial time?
- deterministically and non-deterministically
- What are relationships between those classes?
- P NP?
- PSPACE NPSPACE?
7Reductions and Completeness
How to solve difficult problems An experiment
is being made. A physicist and a mathematician
are asked to boil the hot water in a kettle in
the living room. The physicist goes to the living
room, takes the kettle, returns to the kitchen,
puts it on the stove and boils the water. The
mathematician does the same. In the second
stage, the kettle is in the kitchen and the two
are again asked to boil hot water. The physicist
simply puts the kettle on the stove and boils the
water. However, the mathematician takes the
kettle, puts it in the living room and declares
"We have already solved this problem!" We will do
this again and again.
8Reductions and Completeness
- Are there representative problems that truly
reflect the inherent difficulty of a complexity
class? - if we can solve this representative problem, we
can solve (in about the same complexity) any
other problem in the class? - called complete problems
- can be used to show coincidence of classes
- if an NP complete problem is shown to be in P
then PNP - We will see complete problems for several
complexity classes. - We will study NP-complete problems in detail
- most natural problems are either in P or NP
complete
9Function Problems
- Complexity classes are defined for decision
problems - In reality, we often need not only yes/no answer,
but also the solution (i.e. for TSP, we want to
know the path). - Can we efficiently construct the solution from
the decision problem? (self-reducibility) - Some problems have trivial decision problem, but
the function problem is very interesting - factoring
10Randomized Computation
- How to deal with NP-complete problems?
- go to Monte Carlo/Las Vegas and have a drink
- Use randomized computation
- Monte Carlo algorithms
- yes indeed yes
- no probably no (with non-1 probability of
error) - we can run it several times to reduce the
probability of error - Las Vegas algorithms
- answers yes, no, I dont know - with non 1
probability - eventually it will produce the correct answer
11Inside P
- P represents problems efficiently solvable on
sequential machines - Unfortunately, we do not know how to efficiently
parallelise all problems in P - What is the class of problems that are
efficiently parallelisable? - NC - polylogarithmic parallel time, polynomial
total work - Open problems
- NC P?
- What is the power of non-determinism in (small)
space? - we will see that PSPACE NPSPACE, what about L
NL?
12Other topics we will cover
- Circuit Complexity what kind of languages have
polynomial circuits? - Complexity vs security one way functions, trap
door functions, interactive proofs - Anytime algorithms have a (not necessarily
perfect) answer ready any time the answer is
refined as more time is allowed - Counting complexity classes Given a boolean
expression, compute the number of different truth
assignments that satisfy it. - PSPACE and its many alternative characterizations
(Alternating Turing Machines, Interactive
proofs) - Satisfiability of quantified boolean
expresssions is PSPACE complete