Question: did i do this correctly my work is below Show that the following problem is in N P : 1 . Given a graph G

did i do this correctly my work is below
Show that the following problem is in N P :
1. Given a graph G =
(V, E) and integer K |V |, is there a subset V V of size k, such that every vertex
v in V \ V shares an edge with a vertex in V
Running time: O(n^2)
2.3SAT <= G
3. Let be a formula with clauses. Generate an undirected graph :
For each clause in , make a node for each literal. Make edge between every
pair of nodes, except:
1. Nodes in the same clause
2. Nodes that are negations of each other
4. Yes. (= num clauses)
- nodes
-(^2) edges (fewer
than complete graph)
5. is satisfiable has a -G.
Suppose is satisfiable. Then at least
one literal is true in each clause. For each
clause, select a node in for one of the true
literals. This forms a -G, since nodes
are selected and each is joined by an edge.
6. Suppose has a -G Then there is
a non-contradictory node from the
-G in each clause.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!