

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


http://www.cs.virginia.edu/evans
CS150: Computer Science University of Virginia Computer Science CS150 Fall 2005: Lecture 14: Intractable Problems 2
CS150 Fall 2005: Lecture 14: Intractable Problems 4
CS150 Fall 2005: Lecture 14: Intractable Problems 5
CS150 Fall 2005: Lecture 14: Intractable Problems 6
CS150 Fall 2005: Lecture 14: Intractable Problems 7
Complexity Class NP
Class NP: problems that can be solved in
nondeterministic polynomial time
If we could try all possible solutions at once, we
could identify the solution in polynomial time.
Alternately: If we had a magic guess-correctly
procedure that makes every decision correctly,
we could devise a procedure that solves the
problem in polynomial time.
CS150 Fall 2005: Lecture 14: Intractable Problems 8
NP Problems
answers until we find one that is right
We can easily try n! different answers
We can quickly check if a guess is
correct (check all n tiles)
CS150 Fall 2005: Lecture 14: Intractable Problems 9
Is the Smileyās Problem in P?
No one knows!
We canāt find a O ( n
k ) solution.
We canāt prove one doesnāt exist.
CS150 Fall 2005: Lecture 14: Intractable Problems 10
Orders of Growth
1 2 3 4 5 6 7 8 9 10
logn n
nlogn n^
n^3 2^n
2
n < n!
CS150 Fall 2005: Lecture 14: Intractable Problems 11
Orders of Growth
logn n
nlogn n^
n^3 2^n
CS150 Fall 2005: 12
Orders of Growth
0
200000
400000
600000
800000
1000000
1200000
logn n
nlogn n^
n^3 2^n
simulating universe