Professional Documents
Culture Documents
Watch First Watch First: Pandnp Pandnp
Watch First Watch First: Pandnp Pandnp
Watch First Watch First: Pandnp Pandnp
CONTENTS
CONTENTS
Watch First • DeFnitions • Examples • Decision
Problems, Optimization Problems • The Big Deal
• NP-Complete Problems • Links
Watch First
P vs. NP and the Computational Comple…
Watch later Share
Definitions
Informally,
Exercise
Exercise: Prove that all functions in P
are also in NP
NP.
Examples
The following problems are all in NP
NP.
SHORTEST PATH
Given weighted graph 𝐺 , nodes
𝑠 and 𝑡 in 𝐺 , and value 𝑘 , is
there a path 𝑝 from 𝑠 to 𝑡 such
that 𝑤𝑒𝑖𝑔ℎ𝑡(𝑝) ≤ 𝑘?
TRAVELING SALESPERSON
Given complete weighted graph
𝐺 and value 𝑘 , is there a
Hamilton cycle 𝑐 visiting every
node in 𝐺 such that
𝑤𝑒𝑖𝑔ℎ𝑡(𝑐) ≤ 𝑘 ?
MINIMUM SPANNING TREE
Given weighted graph 𝐺 and
value 𝑘 , is there a spanning
tree 𝑡 such that
𝑤𝑒𝑖𝑔ℎ𝑡(𝑡) ≤ 𝑘 ?
VERTEX COVER
Given graph 𝐺 and value 𝑘 , is
there a vertex cover 𝑠 for 𝐺
such that |𝑠| ≤ 𝑘 ?
Exercise
Exercise: Argue why these are all
polynomial-time checkable.
Exercise
Exercise: Two of the above problems
are currently known to be in P. Which
ones?
Decision
Problems,
Optimization
Problems
P and NP only contains decision
problems. But many decision problems
can be transformed in polynomial time to
and from a corresponding optimization
problem.
Decision Optimization
Name Given
Problem Problem
Some quotes
— Scott Aaronson
— Stephen Cook
— Rocky Ross
— Scott Aaronson.
NP-Complete
Problems
A decision problem is NP-Complete
(alternatively, in the set NPC
NPC), if (1) it is in
NP
NP, and (2) a polynomial-time solution for
it would imply a polynomial-time solution
for every problem in NP .
TODO
Reductions
TODO
Polynomial-Time
Friends
Sometimes there are special cases of NP-
Complete problems that can be solved in
polynomial time. And sometimes an NP-
complete problem is a close cousin to one
in P.
Special Cases or
NP-Complete
Variants in P
Links
The P versus NP Page
A Nice Explanation of the P vs. NP
Problem from MIT News
The Complexity Zoo
Wikipedia's List of NP Complete
Problems
NP-Completeness on xkcd: TSP,
Restaurant Orders.
David Johnson's NP-Completeness
Columns
Slides from a presentation by Uriel
Feige.
Blog posts and papers by Scott
Aaronson:
Ten Reasons to Believe P ≠ NP
Is P=NP Independent of ZFC?
NP-Complete Problems and
Physical Reality