Graph 3-Colorability

advertisement
Graph 3-Colorability
Instance: a graph G = (V, E).
Question: Is there an assignment ๐‘: ๐‘‰ → {๐ŸŽ, ๐Ÿ, ๐Ÿ} s.t. ๐‘(๐‘ฃ๐‘– ) ≠ ๐‘(๐‘ฃ๐‘— ) if ๐‘ฃ๐‘–
and ๐‘ฃ๐‘— are adjacent?
Exercise 6: Show that Graph 3-Colorability is NP Hard.
Suggestion: Use 3-Sat -- given an arbitrary instance of 3-Sat, (i.e. a set of variables ๐‘ˆ =
{๐‘ข1 , ๐‘ข2 , โ‹ฏ , ๐‘ข๐‘› } and a set of size three clauses, = {๐‘1 , ๐‘2 , โ‹ฏ , ๐‘๐‘š } ) we wish to construct an
equivalent instance of 3-Colorability.
The suggested construction is an example of “component design”. Each component
will be a subgraph that will effectively perform the stated function.
Some of the vertices of the graph will correspond to variables. The way those vertices
are colored will determine a true/false assignment for the corresponding variables.
1. Color-to-True/False Correspondence
The “center” of our graph will be the triangle below. These vertices do not
correspond to variables but one have the color corresponding to “true”, one will
have the color corresponding to “false” and the third will be the “neutral” or
“neither” or “not like the others” color. Without loss of generality, we can assume
the vertices are colored as below.
F
T
N
2. True/False Determination
Now create ๐‘› pairs of new vertices. One vertex of the ๐‘– ๐‘กโ„Ž pair will
correspond to variable ๐‘ข๐‘– and the other vertex will correspond to ๐‘ขฬ…๐‘– . Connect
each pair to the “N” vertex above to form a subgraph that ensures that each
vertex corresponding to a variable gets colored either blue = “T” or “red = F”
and that the vertex corresponding to its negation is colored the opposite.
3. Satisfaction Testing
Create one of the gadgets to the right for each clause, ๐‘๐‘˜ .
The vertices shown only appear within one gadget.
Arrows indicate connections to vertices
already introduced in above components.
Find what the connections need to be so that the subgraph is 3-colorable
iff the clause is satisfied. (The blue arrows are a hint.)
Download