Question

In: Computer Science

The PARTITION INTO PATHS OF LENGTH 2 problem is as follows: INSTANCE: A graph, G =...

The PARTITION INTO PATHS OF
LENGTH 2 problem is as follows:
INSTANCE: A graph, G = (V, E) with IV| = 3q for a positive integer q.
QUESTION: Is there a partition of V into q disjoint subsets VI, V2, ...,
Vq of 3 vertices such that, for each V1 = {Vi[1], Vi[2], Vi[3), at least two of the
three edges {Vi[1], Vi[2], {Vi[1], Vi[3], and {Vi[2], Vi[3]} belong to E?
Prove the PARTITION INTO PATHS OF LENGTH 2 problem is NP-
complete.

Solutions

Expert Solution

Solution

Clearly PARTITION INTO TRIANGLES is in NP because we an first non-deterministically guess a disjoint partition of V and then check (in deterministic polynomial time) that ea h Vi fulfills the triangle condition

We show the NP-hardness by reducing from the NP- complete problem EXACT COVER BY 3-SETS. Assume that we are given a set U such that |U| = 3m for some integer m and a family

F {S1,…..,Sn} of subsets of U such that |Si| = 3 for all i.

We now construct a graph G = V , E with |V} = 3q’ such that G an be partitioned into q’ triangles iff F contains an exact cover for U. We substitute for each set Si = {u, v, w} appearing in F the collection Ei of 18 edges shown below.

The graph G = <V , E> is therefore defined by

Now |V| = |U|+ 9n = 3m + 9n and thus q’ = m + 3n. Note that only the U-vertices may be shared by different Eis.

---

i typed the solution in word when i pasted here, some symbols not working

so i taken screenshot and posted here

if u need original text, let me know

all the best


Related Solutions

Question 1: Given a graph with length l(e) on edges, find a minimum length paths from...
Question 1: Given a graph with length l(e) on edges, find a minimum length paths from a vertex s to V −s so that among all shortest lengths paths from s to V −s we find the ones with minimum number of edges. Use Dijkstra's algorithm
How to proof that the 2-partition problem can be transformed to 3-partition problem and the time...
How to proof that the 2-partition problem can be transformed to 3-partition problem and the time complexity of the transformation (i.e. the 2-partition problem can be solved by using an algorithm that solves the 3-partition problem)
# 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 <=...
Problem 2. Consider a graph G = (V,E) where |V|=n. 2(a) What is the total number...
Problem 2. Consider a graph G = (V,E) where |V|=n. 2(a) What is the total number of possible paths of length k ≥ 0 in G from a given starting vertex s and ending vertex t? Hint: a path of length k is a sequence of k + 1 vertices without duplicates. 2(b) What is the total number of possible paths of any length in G from a given starting vertex s and ending vertex t? 2(c) What is the...
the decision-clique problem is the problem of determining whether a graph G contains a clique of...
the decision-clique problem is the problem of determining whether a graph G contains a clique of at least a given size k. This problem is NP-complete. Professor Bartlett has designed an algorithm that can take any graph G with n vertices and determine in O(nk ) time whether or not G contains a clique of size k. Has Professor Bartlett showed that P = NP? Explain your answer.
Problem 8. A bipartite graph G = (V,E) is a graph whose vertices can be partitioned...
Problem 8. A bipartite graph G = (V,E) is a graph whose vertices can be partitioned into two (disjoint) sets V1 and V2, such that every edge joins a vertex in V1 with a vertex in V2. This means no edges are within V1 or V2 (or symbolically: ∀u, v ∈ V1, {u,v} ∉ E and ∀u,v ∈ V2, {u,v} ∉ E). 8(a) Show that the complete graph K2 is a bipartite graph. 8(b) Prove that no complete graph Kn,...
The bond length of N2 is 109.75 pm. Calculate the rotational partition function of the molecule...
The bond length of N2 is 109.75 pm. Calculate the rotational partition function of the molecule at 300 K, using the high-temperature approximation.
Given a graph G, we obtain the subdivision graph of G, denoted by S(G), by subdividing...
Given a graph G, we obtain the subdivision graph of G, denoted by S(G), by subdividing each edge of G exactly once. Remember to subdivide an edge is to add vertex of degree 2. So if you have an edge (u, v) in G it becomes two edges in S(G). Show that S(G) is bipartite.
1) a) Let k ≥  2 and let G be a k-regular bipartite graph. Prove that G...
1) a) Let k ≥  2 and let G be a k-regular bipartite graph. Prove that G has no cut-edge. (Hint: Use the bipartite version of handshaking.) b) Construct a simple, connected, nonbipartite 3-regular graph with a cut-edge. (This shows that the condition “bipartite” really is necessary in (a).) 2) Let F_n be a fan graph and Let a_n = τ(F_n) where τ(F_n) is the number of spanning trees in F_n. Use deletion/contraction to prove that a_n = 3a_n-1 - a_n-2...
# Problem Description Given a directed graph G = (V, E), find the number of connected...
# Problem Description Given a directed graph G = (V, E), find the number of connected components in G. # Input The graph has `n` vertices and `m` edges. There are m + 1 lines, the first line gives two numbers `n` and `m`, describing the number of vertices and edges. Each of the following lines contains two numbers `a` and `b` meaning there is an edge (a,b) belong to E. All the numbers in a line are separated by...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT