UGC-NET Jun 2014 · Introduction to Graph Theory

MCQ · 2 marks · Problem PROG-GRPH-0014

Given the following statements : $S_{1}$ : The subgraph-isomorphism problem takes two graphs $G_{1}$ and $G_{2}$ and asks whether $G_{1}$ is a subgraph of $G_{2}$ . $S_{2}$ : The set-partition problem takes as input a set $S$ of numbers and asks whether the numbers can be partitioned into two sets $A$ and $\bar{A} = S - A$ such that$$\sum_{x \in A} x = \sum_{x \in \bar{A}} x$$Which of the following is true ?
  1. A
    $S_{1}$ is $NP$ problem and $S_{2}$ is $P$ problem.
  2. B
    $S_{1}$ is $NP$ problem and $S_{2}$ is $NP$ problem.
  3. C
    $S_{1}$ is $P$ problem and $S_{2}$ is $P$ problem.
  4. D
    $S_{1}$ is $P$ problem and $S_{2}$ is $NP$ problem.

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionA problem is in NP when a proposed solution can be checked in polynomial time.\(S_1\): subgraph isomorphism — given a mapping of the vertices of \(G_1\) into \(G_2\), checking that every edge maps to an edge is polynomial, so it is in NP (it is NP-complete; it contains CLIQUE as a special case).\(S_2\): set partition — given the set \(A\), comparing the two sums is polynomial, so it is in NP (it is NP-complete, a special case of subset sum).Neither is known to be in P, so both are NP problems.Answer: B

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com