Question

In: Computer Science

Determine, for a given graph G =V,E and a positive integer m ≤ |V |, whether...

Determine, for a given graph G =V,E and a positive integer m ≤ |V |, whether G contains a clique of size m or more. (A clique of size k in a graph is its complete subgraph of k vertices.)

Determine, for a given graph G = V,E and a positive integer m ≤ |V |, whether there is a vertex cover of size m or less for G. (A vertex cover of size k for a graph G = V,E is a subset V⊆ V such that |V| = k and, for each edge (u, v) ∈ E, at least one of u and v belongs to V.)

a.)Describe the process of showing that a problem is NP complete

b.) given that the CLIQUE problem is NP complete. show that the VERTEX COVER problem is NP complete.

Solutions

Expert Solution

Answer a

A problem Y can be shown as NP-Complete. If

  1. Y belongs to NP problems. Prove Y NP
  2. There is a problem X which is NP Complete and can be polynomial reducible to Y.  X Y

Answer b

Prove that Vertex Cover is NP problem.

We know that vertex cover of any undirected graph G = (V, E) is a subset of vertices V' such that if (u, v) E then either u V' or v V' or both (u, v) V'

For example, in the following graph all edged can be covered by minimum two vertices either {b, c} or {a, c} so this will be vertex cover for graph below. Vertex Cover Size k = 2

Now, we can see that a problem is called NP when any solution of that can be verified in polynomial time. We know that vertex cover can not be solved in polynomial time but this solution of vertex cover {b, c} can be easily verified in polynomial time. vertex b covers the edge a-b and vertex c covers remaining 3 edges which is easily verifiable in polynomial time. So we can say that

Vertex Cover NP

Prove that Clique Problem can be polynomial reducible to Vertex Cover Problem.

Instance of Clique => Polynomial Reduction => Instance of Vertex Cover => Polynomial verifiable

We know that Clique of any graph G is sub-graph G' which is complete graph means each vertex in the sub-graph is connected to other vertices of sub-graph.

For example, in graph below Clique V' = {a, b, c, d}. Clique Size k = 4

Now let's try to find G' of graph G using some reduction algorithm. G' is graph with vertices V G and Edged E which are not present in complete graph of G. It means if we consider G as a complete graph the edges which are missing in graph G will be part of G'.

Here we can see that vertex cover of graph above V' = {e, f}

So conversely we can say that if there is a graph G' which has vertex cover as V' of size |V| - k where V' is subset of V of Graph G and k is clique size. So we can say that G has a vertex cover of size k if and only if G' has a clique of size |v| - k. This can also be verified in polynomial time.


Related Solutions

Given an undirected graph G = (V,E), consisting of n vertices and m edges, with each...
Given an undirected graph G = (V,E), consisting of n vertices and m edges, with each edge labeled from the set {0,1}. Describe and analyze the worst-case time complexity of an efficient algorithm to find any cycle consisting of edges whose labels alternate 0,1.
If G = (V, E) is a graph and x ∈ V , let G \...
If G = (V, E) is a graph and x ∈ V , let G \ x be the graph whose vertex set is V \ {x} and whose edges are those edges of G that don’t contain x. Show that every connected finite graph G = (V, E) with at least two vertices has at least two vertices x1, x2 ∈ V such that G \ xi is connected.
You are given a directed graph G(V,E) with n vertices and m edges. Let S be...
You are given a directed graph G(V,E) with n vertices and m edges. Let S be the subset of vertices in G that are able to reach some cycle in G. Design an O(n + m) time algorithm to compute the set S. You can assume that G is given to you in the adjacency-list representation.
You are given an undirected graph G = ( V, E ) in which the edge...
You are given an undirected graph G = ( V, E ) in which the edge weights are highly restricted. In particular, each edge has a positive integer weight from 1 to W, where W is a constant (independent of the number of edges or vertices). Show that it is possible to compute the single-source shortest paths in such a graph in O(E+V) time.
Given a list of positive integers c[0...n − 1], and a positive integer v, decides whether...
Given a list of positive integers c[0...n − 1], and a positive integer v, decides whether we can use numbers from c[0...n − 1] to make a sum of v, allowing any particular number in the list to be used multiple times. Or, mathematically, this means that there exists non-negative integer coefficients, x0, x1, ..., xn−1, such that v = x0c[0] + x1c[1] + ...xn−1c[n − 1]. For example, given c[0...3] = {2, 4, 6, 10}, and v = 17,...
Given an undirected graph G=(V, E) with weights and a vertex , we ask for a...
Given an undirected graph G=(V, E) with weights and a vertex , we ask for a minimum weight spanning tree in G where is not a leaf (a leaf node has degree one). Can you solve this problem in polynomial time? Please write the proof.
Problem for submission: For which positive integers k can a simple graph G = (V, E)...
Problem for submission: For which positive integers k can a simple graph G = (V, E) be constructed such that: G has k vertexes, that is, |V | = k, G is bipartite, and its complement G is bipartite? Prove your answer is correct Please show and explain your full proof.
# Problem Description Given a directed graph G = (V,E) with edge length l(e) > 0...
# Problem Description Given a directed graph G = (V,E) with edge length l(e) > 0 for any e in E, and a source vertex s. Use Dijkstra’s algorithm to calculate distance(s,v) for all of the vertices v in V. (You can implement your own priority queue or use the build-in function for C++/Python) # Input The graph has `n` vertices and `m` edges. There are m + 1 lines, the first line gives three numbers `n`,`m` and `s`(1 <=...
Let x be a fixed positive integer. Is it possible to have a graph G with...
Let x be a fixed positive integer. Is it possible to have a graph G with 4x + 1 vertices such that G has a vertex of degree d for all d = 1, 2, ..., 4x + 1? Justify your answer. (Note: The graph G does not need to be simple.)
Consider an unweighted, undirected graph G = <V, E>. The neighbourhood of a node v ∈...
Consider an unweighted, undirected graph G = <V, E>. The neighbourhood of a node v ∈ V in the graph is the set of all nodes that are adjacent (or directly connected) to v. Subsequently, we can define the neighbourhood degree of the node v as the sum of the degrees of all its neighbours (those nodes that are directly connects to v). (a) Design an algorithm that returns a list containing the neighbourhood degree for each node v ∈...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT