









































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Some concept of Automata and Complexity Theory are Administrivia, Closure Properties, Context-Free Grammars, Decision Properties, Deterministic Finite Automata, Intractable Problems, More Undecidable Problems. Main points of this lecture are: Np-Complete Problems, Np-Hard Problems, Tautology Problem, Node Cover, Knapsack, Number of Problems, Directly, Polytime, Transducer, Construction
Typology: Slides
1 / 49
This page cannot be seen from the preview
Don't miss anything!
1
NP-Hard Problems Tautology Problem
Node Cover
Knapsack
2
We can now reduce 3SAT to a large number of problems, either directly orindirectly.
Each reduction must be polytime.
Usually we focus on length of the output from the transducer, becausethe construction is easy.
But key issue: must be polytime.
4
The
is: given a
Boolean formula, is it satisfied by alltruth assignments?
Example: x + -x + yz
Not obviously in
, but it’s
complement is.
Guess a truth assignment; accept if thatassignment doesn’t satisfy the formula.
5
An NTM can guess a truth assignment and decide whether formula F issatisfied by that assignment inpolytime.
But if the NTM accepts when it guesses a satisfying assignment, it will accept Fwhenever F is in SAT, not Tautology.
7
While we can’t prove Tautology is in NP
, we can prove it is NP-hard.
Suppose we had a polytime algorithm for Tautology.
Take any Boolean formula F and convert it to -(F).
Obviously linear time.
8
F is satisfiable if and only -(F) is not a tautology.
Use the hypothetical polytime algorithm for Tautology to test if -(F) is atautology.
Say “yes, F is in SAT” if -(F) is not a tautology and say “no” otherwise.
Then SAT would be in
, and
10
Cook used “if problem X is in
, then
” as the definition of “X is NP-
hard.”
Today called
Cook completeness.
In 1972, Richard Karp wrote a paper showing many of the key problems inOperations Research to be NP-complete.
11
Karp’s paper moved “NP-completeness” from a concept about theorem provingto an essential for any study ofalgorithms.
But Karp used the definition of NP- completeness “exists a polytimereduction,” as we have.
Called
Karp completeness.
13
But there is one important reason we prefer Karp-completeness.
Suppose I had an algorithm for some NP-complete problem that ran in timeO(n
log n
A function that is bigger than anypolynomial, yet smaller than theexponentials like 2
n
.
14
If “NP-complete is Karp-completeness, I can conclude that all of
can be
solved in time O(n
f(n)
), where f(n) is
some function of the form c log
k
n.
Still faster than any exponential, and fasterthan we have a right to expect.
But if I use Cook-completeness, I cannot say anything of this type.
16
A
C
E
F
D
B
One possible node coverof size 3: {B, C, E}
17
Reduction from 3SAT.
For each clause (X+Y+Z) construct a “column” of three nodes, all connectedby
edges.
Add a
edge between nodes
that represent any variable and itsnegation.
Budget = twice the number of clauses.
19
A node cover must have at least two nodes from every column, or somevertical edge is not covered.
Since the budget is twice the number of columns, there must be exactly twonodes in the cover from each column.
Satisfying assignment corresponds to the node in each column not selected.
20
(x + y + z)(-x + -y + -z)(x + -y +z)(-x + y + -z)Truth assignment: x = y = T; z = F
x y z
-x -y -z
x z -y
-x -z
y
Pick a true node in each column