Further NP-Complete Problems
- Now that we have CIRCUIT-SAT in NP-Complete it is much easier to add
other problems to this set.
- We can reduce all problems in NP to CIRCUIT-SAT in polynomial time
- and if we can reduce CIRCUIT-SAT to a problem in polynomial time,
- then we can reduce all problems to the new problem in polynomial time.
- SAT
- Given a boolean expression, consisting of variables , and or, not implication, iff, and parenthesis, determine if the expression is satisfiable.
- Given a set of values for the input, we can check this in polynomial time, thus it is in NP
- It makes sense that we can reduce CIRCUIT-SAT to SAT, so it is in NP-Complete
- The niave reduction is not polynomial, it can become exponential.
- The reduction considers an equation of the "values" of each of the
wires.
- 3CNF-SAT
- Given an expression of the form (x+y+z)(a+b+c)(c+d+e) ...
- juxtaposition is and
- + is or
- Can we find a set of inputs that satisfy this expression
- Again, verification in polynomial time is easy
- Reducing SAT to 3CNF-SAT is accomplished by
- building a parse tree to represent the arbritrary expression
- each subtree represents a binary expression
- Which can be simplified into 3CNF
- CLIQUE
- In an undirected Graph G=(V,E), a clique is a set V' in V
suchthat for all u,v in V, (u,v) is in E
- The size of a clique is the number of verticies in the clique
- The clique problem (CLIQUE) is finding the clique of maximum size
in a graph.
-
- Checking to see if something is a clique can be done in O(|V|2)
- So it is in NP
- Reducing NP to CLIQUE is not too bad
- Given an expression in 3CNF
- For each term of each factor, create a node
- Group all of the nodes from a factor togeather
- Connect nodes of a factor to all nodes in other factors
that are other than not of the node.
- Let each factor be set of nodes, either X or not X
- Find a clique of size k
- If the size of the clique is the same as the number of factors
in the original expression then the expression is satisfiable.
- Consider (x+y+!z)(x+!y+z)(!x+y+z)