Week 10 Practice Assignment

Week 10 Practice Assignment


Mathematics I


1. Multiple Choice Questions (MCQs)

Question 1: Suppose we obtain the following DFS tree rooted at node 0 for an undirected graph with vertices ${0,1,2,3,4,5,6,7,8,9,10}$.

Which of the following cannot be an edge in the original graph? (a) $(1,4)$ (b) $(0,4)$ (c) $(7,10)$ (d) $(2,9)$

Solution: In a DFS tree for an undirected graph, edges between vertices in different branches cannot be present in the original graph if they would have already been visited.

  • (a) $(1,4)$: Both in the same branch—possible.
  • (b) $(0,4)$: Both in the same branch—possible.
  • (c) $(7,10)$: In different branches—cannot be an edge.
  • (d) $(2,9)$: Both in the same branch—possible.

Answer: (c) $(7,10)$123


Questions 2–4 use the following context: Ten friends in a college decide to have a night party at one of their homes. On the day, the government closes many routes in the city. The graph $G = (V, E)$ represents their homes (nodes) and the open routes (edges).

Question 2: The possible place for the party is: (a) Shiva’s house (b) Abhi’s house (c) Joe’s house (d) Vishi’s house

Solution: Shiva’s house is reachable by everyone, so it is the best possible place for the party. Answer: (a) Shiva’s house1


Question 3: Let $V_1 = {\text{Kristi, Shiva, Nia}}$ and $E_1 = E \cap (V_1 \times V_1)$, i.e., edges with both endpoints in $V_1$. Choose the correct option: (a) $G_1 = (V_1, E_1)$ is an undirected graph (b) $G_1 = (V_1, E_1)$ is a cyclic graph (c) $G_1 = (V_1, E_1)$ will not be a graph (d) $G_1 = (V_1, E_1)$ is a directed graph

Solution: Given the edges in $E_1$ are directed, $G_1$ is a directed graph. Answer: (d) $G_1 = (V_1, E_1)$ is a directed graph123


Question 4: If Joe wants to have the party on his home, then at most how many members can join the party? (a) 5 (b) 6 (c) 7 (d) 8

Solution: Joe’s home is not reachable by Kristi and Shiva. With 10 members total, 8 can join. Answer: (d) 8123


2. Multiple Select Questions (MSQs)

Question 5: Suppose $G$ is a graph (shown in the figure). Let $V$ be the set of vertices of $G$, $V_i$ be the maximum independent set, and $V_c$ be the minimum vertex cover. Which of the following is/are true? (a) Cardinality of $V_i$ is 4 (b) Cardinality of $V_c$ is 3 (c) Cardinality of $V_i$ is 5 (d) Cardinality of $V_c$ is 4

Solution: From the figure, the maximum independent set has 4 vertices and the minimum vertex cover has 4 vertices. Answer: (a) and (d)1


Question 6: Consider the graph below. Suppose we perform BFS/DFS so that when we visit a vertex, we explore its unvisited neighbors in a random order. Which of the following options are correct? (a) If we perform Breadth First Search at node 0, then one of the possible orders in which the nodes will be visited is 01423567 (b) If we perform Depth First Search at node 0, then one of the possible orders in which the nodes will be visited is 04123576 (c) If we perform Breadth First Search at node 0, then one of the possible orders in which the nodes will be visited is 01423576 (d) If we perform Depth First Search at node 0, then one of the possible orders in which the nodes will be visited is 04132567

Solution:

  • (a) and (c): Possible BFS orders from node 0.
  • (d): Possible DFS order from node 0.
  • (b): Not a valid BFS or DFS order as per the graph structure.

Answer: (a), (c), and (d)123


Question 7: Which of the following options are correct? (a) In Depth First search of a directed graph, only back edges generate cycles. (b) If the maximum independent set of a graph $G$ contains only 1 element, then the graph must be connected. (c) If we add an edge to a tree $T$, then the resulting graph becomes cyclic. (d) In a connected graph $G$ having $n$ vertices, at least two vertices have the same degree.

Solution:

  • (a): True for directed graphs—only back edges create cycles.
  • (b): True—if the maximum independent set is 1, the graph must be connected.
  • (c): True—adding any edge to a tree creates a cycle.
  • (d): True—in any connected graph with $n \geq 2$ vertices, at least two have the same degree.

Answer: (a), (b), (c), and (d)123


Question 8: Consider the following directed graph. Suppose DFS is performed from node A, exploring unvisited neighbors in alphabetical order. Which options are correct? (a) $AC$ is a forward edge (b) $CE$ is a backward edge (c) $BD$ is a forward edge (d) $FC$ is a backward edge

Solution:

  • (a): $AC$ is a forward edge.
  • (d): $FC$ is a backward edge.

Answer: (a) and (d)123


3. Numerical Answer Type (NAT)

Question 9: The cardinality of the maximum independent set of the graph given below is:

Solution: The maximum independent set has 4 vertices. Answer: 4123


Question 10: The minimum coloring of the graph given below is:

Solution: The minimum number of colors required to color the graph such that no two adjacent vertices have the same color is 2. Answer: 21


All questions and solutions from the PDF have been extracted as above.