Again Suppose That S Is a 3 sat Problem With N Variables and M Clauses
Prerequisite: NP-Completeness, Graph Coloring
Graph K-coloring Problem: A K-coloring trouble for undirected graphs is an assignment of colors to the nodes of the graph such that no two adjacent vertices accept the same color, and at most Grand colors are used to consummate colour the graph.
Trouble Statement: Given a graph G(Five, Due east) and an integer Yard = 3, the task is to make up one's mind if the graph tin be colored using at most iii colors such that no two adjacent vertices are given the same color.
Explanation :
An example of the problem is an input specified to the problem. An instance of the 3-coloring problem is an undirected graph Thousand (Five, E), and the task is to check whether in that location is a possible consignment of colors for each of the vertices Five using only three dissimilar colors with each neighbor colored differently. Since an NP-Consummate problem is a problem which is both in NP and NP-difficult, the proof for the argument that a problem is NP-Complete consists of two parts:
- The trouble itself is in NP class.
- All other problems in NP grade can be polynomial-time reducible to that.(B is polynomial-fourth dimension reducible to C is denoted every bit B ≤ PC)
If the 2nd condition is only satisfied then the problem is called NP-Difficult.
But it is not possible to reduce every NP problem into another NP trouble to prove its NP-Abyss all the time. Therefore, to show a problem is NP-Consummate, then proof that the trouble is in NP and whatsoever NP-Complete problem is reducible to that i.east., if B is NP-Complete and B≤PC then for C in NP, then C is NP-Complete. Thus, it can exist concluded that the Graph Chiliad-coloring Problem is NP-Complete using the following two propositions:
3-coloring trouble is in NP:
If whatsoever problem is in NP, then, given a certificate, which is a solution to the problem and an example of the trouble (A graph G(Five, Eastward) and an consignment of the colors {c1, c2, ciii} where each vertex is assigned a color from this three colors {c1, c2, c3}), so it can exist verified (Cheque whether the solution given is correct or non) that the document in polynomial time. This can be done in the following way:
For each edge {u, v} in graph 1000 verify that the color c(u) != c(v)
Hence, the assignment tin can be checked for correctness in the polynomial-time of the graph with respect to its edges O(5+Eastward).
iii-coloring problem is NP-Hard:
In gild to show that the 3-coloring trouble is NP-Hard, perform a reduction from a known NP-Hard problem to this problem. Bear out a reduction from which the three-Sat trouble tin be reduced to the iii-coloring problem. Let us assume that the iii-Sat problem has a 3-Sat formula of m clauses on n variables denoted by xi, x2, …, xn . The graph can and so be constructed from the formula in the following way:
- For every variable xi Construct a vertex vi In the graph and a vertex vi' denoting the negation of the variable xi .
- For each clause c in m, add together 5 vertices corresponding to values c1, c1, …, c5.
- 3 vertices of different colors are additionally added to denote the values True, False, and Base (T, F, B) respectively.
- Edges are added among these three additional vertices T, F, B to form a triangle.
- Edges are added among the vertices fivei and vi' and Base (B) to form a triangle.
The following constraints are true for graph Thou:
- For each of the pairs of vertices fivei and vi' , either one is assigned a TRUE value and the other, FALSE.
- For each clause c in thousand clauses, at least one of the literal has to hold TRUE value for the value to be true.
A small OR- gadget graph therefore tin be constructed for each of the clause c = (u V v V w) in the formula by input nodes u, v, west, and connect output node of gadget to both False and Base of operations special nodes.
Let u.s.a. consider the formula f = (u' 5 5 V w') AND (u Five v 5 due west')
Now the reduction can be proved past the post-obit two propositions:
Let the states assume that the 3-SAT formula has a satisfying assignment, then in every clause, at to the lowest degree ane of the literals xi has to be truthful, therefore, the respective vi tin be assigned to a Truthful color and vi' to FALSE. Now, extending this, for each clause the corresponding OR-gadget graph can be 3-colored. Hence, the graph tin can be 3-colored.
Permit u.s.a. consider that the graph Thousand is iii-colorable, so if the vertex half-dozen is assigned to the true color, correspondingly the variable xi is assigned to true. This will form a legal truth assignment. Besides, for whatsoever clause Cj = (x Five y V z), information technology cannot be that all the three literals x, y, z are False. Because in this case, the output of the OR-gadget graph for Cj has to be colored False. This is a contradiction because the output is connected to Base and Imitation. Hence, there exists a satisfying assignment to the 3-SAT clause.
Conclusion: Therefore, 3-coloring is an NP-Complete problem.
Source: https://www.geeksforgeeks.org/3-coloring-is-np-complete/
0 Response to "Again Suppose That S Is a 3 sat Problem With N Variables and M Clauses"
Post a Comment