Skip to content
Official PYQ · 2005

GATE CS 2005 Q58 — Undecidability

Explain with AI

Consider the following two problems on undirected graphs:

  • α\alpha: Given G(V,E)G(V, E), does GG have an independent set of size |V| - 44?
  • β\beta: Given G(V,E)G(V, E), does GG have an independent set of size 55?

Which one of the following is TRUE?

Choose one option
View worked solution

Answer: D

To determine the complexity of the two problems, we analyze the time complexity of solving them on an undirected graph G(V,E)G(V, E) with n=∣V∣n = |V| vertices and m=∣E∣m = |E| edges.

1. Analysis of Problem β\beta

Problem: Does GG have an independent set of size 55?

  • The size of the independent set is a fixed constant, k=5k = 5.
  • The number of candidate subsets of vertices of size 55 is given by the binomial coefficient: (n5)=n(n−1)(n−2)(n−3)(n−4)120=O(n5)\binom{n}{5} = \frac{n(n-1)(n-2)(n-3)(n-4)}{120} = O(n^5)
  • For each subset of size 55, we can verify if it forms an independent set by checking if there are any edges between the (52)=10\binom{5}{2} = 10 pairs of vertices. This verification takes O(1)O(1) constant time.
  • Thus, the total time complexity to find if such an independent set exists is O(n5)O(n^5), which is polynomial in terms of the input size.

Therefore, β\beta is in P.

2. Analysis of Problem α\alpha

Problem: Does GG have an independent set of size n−4n - 4?

  • Recall the fundamental graph theory property: A subset of vertices I⊆VI \subseteq V is an independent set of GG if and only if its complement V∖IV \setminus I is a vertex cover of GG.
  • If GG has an independent set of size n−4n - 4, then the remaining n−(n−4)=4n - (n - 4) = 4 vertices must form a vertex cover of GG.
  • Thus, the problem is equivalent to: Does GG have a vertex cover of size 44?
  • Since the size of the vertex cover is a fixed constant (k=4k = 4), we can check all possible subsets of size 44: (n4)=O(n4)\binom{n}{4} = O(n^4)
  • For each subset of size 44, we can verify if it covers all mm edges in O(m)O(m) time.
  • The total time complexity is O(n4⋅m)O(n^4 \cdot m), which is polynomial in terms of the input size.

Therefore, α\alpha is in P.

Conclusion

Since both problems can be solved in polynomial time, both α\alpha and β\beta are in class P.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Undecidability questions