You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The maximum number of non-zero entries in an adjacency matrix of a simple graph having \$ n \$ vertices can be
13
14
**Options:**
14
-
(a) \$ n^2 \$
15
-
(b) \$ n(n-1) \$
16
-
(c) \$ \frac{n(n-1)}{2} \$
17
-
(d) \$ n(n-1) \$
18
-
**Solution:**
19
-
The number of non-zero entries is equal to twice the number of edges for undirected graphs, but for directed simple graphs (no loops, no multiple edges), it is \$ n(n-1) \$. Since the question says "simple graph" (typically undirected, but the context here implies directed or maximum possible), and the solution says "sum of degrees" is \$ n(n-1) \$ if every vertex has degree \$ n-1 \$, which is only possible in a directed simple graph.
20
-
**Correct option:** (d) \$ n(n-1) \$
21
-
15
+
(a) \$ n^2 \$
16
+
(b) \$ n(n-1) \$
17
+
(c) \$ \frac{n(n-1)}{2} \$
18
+
(d) \$ n(n-1) \$
19
+
{{< /border >}}
20
+
21
+
{{< border >}}
22
+
**Solution:**
23
+
The number of non-zero entries is equal to twice the number of edges for undirected graphs, but for directed simple graphs (no loops, no multiple edges), it is \$ n(n-1) \$. Since the question says "simple graph" (typically undirected, but the context here implies directed or maximum possible), and the solution says "sum of degrees" is \$ n(n-1) \$ if every vertex has degree \$ n-1 \$, which is only possible in a directed simple graph.
24
+
**Correct option:** (d) \$ n(n-1) \$
25
+
{{< /border >}}
26
+
27
+
{{< border type="question" >}}
22
28
**Question 2:**
23
-
We have a graph \$ G \$ with 6 vertices. We write down the degrees of all vertices in \$ G \$ in descending order. Which of the following is a possible listing of the degrees?
24
-
**Options:**
25
-
(a) 6,5,4,3,2,1
26
-
(b) 5,5,2,2,1,1
27
-
(c) 5,3,3,2,2,1
28
-
(d) 2,1,1,1,1,1
29
-
**Solution:**
30
-
31
-
-**Option (a):** Not possible (degree > 5 for a 6-vertex simple graph).
32
-
-**Option (b):** Not possible (sum of degrees is odd).
33
-
-**Option (c):** Possible.
34
-
-**Option (d):** Not possible (sum of degrees is odd).
35
-
**Correct option:** (c) 5,3,3,2,2,1
36
-
29
+
We have a graph \$ G \$ with 6 vertices. We write down the degrees of all vertices in \$ G \$ in descending order. Which of the following is a possible listing of the degrees?
30
+
**Options:**
31
+
(a) 6,5,4,3,2,1
32
+
(b) 5,5,2,2,1,1
33
+
(c) 5,3,3,2,2,1
34
+
(d) 2,1,1,1,1,1
35
+
{{< /border >}}
36
+
37
+
{{< border >}}
38
+
**Solution:**
39
+
-**Option (a):** Not possible (degree > 5 for a 6-vertex simple graph).
40
+
-**Option (b):** Not possible (sum of degrees is odd).
41
+
-**Option (c):** Possible.
42
+
-**Option (d):** Not possible (sum of degrees is odd).
43
+
**Correct option:** (c) 5,3,3,2,2,1
44
+
{{< /border >}}
45
+
46
+
{{< border type="question" >}}
37
47
**Question 3:**
38
-
We are trying to find the correct path in a maze. We start at the entrance. At some points, we have to choose a direction to explore. If we reach a dead end, we come back to the most recent intersection where we still have an unexplored direction to investigate. What is a good data structure to keep track of the intersections we have visited?
39
-
**Options:**
40
-
(a) List
41
-
(b) Stack
42
-
(c) Queue
43
-
(d) Array
44
-
**Solution:**
45
-
This is a recursive exploration (depth-first), so a stack is appropriate.
46
-
**Correct option:** (b) Stack
47
-
48
-
**Question 4:**
48
+
We are trying to find the correct path in a maze. We start at the entrance. At some points, we have to choose a direction to explore. If we reach a dead end, we come back to the most recent intersection where we still have an unexplored direction to investigate. What is a good data structure to keep track of the intersections we have visited?
49
+
**Options:**
50
+
(a) List
51
+
(b) Stack
52
+
(c) Queue
53
+
(d) Array
54
+
{{< /border >}}
55
+
56
+
{{< border >}}
57
+
**Solution:**
58
+
This is a recursive exploration (depth-first), so a stack is appropriate.
59
+
**Correct option:** (b) Stack
60
+
{{< /border >}}
61
+
62
+
{{< border type="question" >}}
63
+
**Question 4:**
49
64
Below table shows the adjacency list w.r.t outgoing edges of a directed graph \$ G \$:
50
65
51
-
52
66
|||
53
67
| :-- | :-- |
54
68
| 1 | {2,4} |
@@ -59,11 +73,9 @@ Below table shows the adjacency list w.r.t outgoing edges of a directed graph \$
59
73
| 6 | {1} |
60
74
| 7 | {1,2,6} |
61
75
62
-
Which of the following tables shows the adjacency list w.r.t incoming edges of the graph \$ G \$?
63
-
**Options:**
64
-
(a)
65
-
66
-
76
+
Which of the following tables shows the adjacency list w.r.t incoming edges of the graph \$ G \$?
77
+
**Options:**
78
+
(a)
67
79
|||
68
80
| :-- | :-- |
69
81
| 1 | {6,7} |
@@ -74,9 +86,7 @@ Which of the following tables shows the adjacency list w.r.t incoming edges of t
74
86
| 6 | {2,4,7} |
75
87
| 7 | {3,5} |
76
88
77
-
(b)
78
-
79
-
89
+
(b)
80
90
|||
81
91
| :-- | :-- |
82
92
| 1 | {6,7} |
@@ -87,9 +97,7 @@ Which of the following tables shows the adjacency list w.r.t incoming edges of t
87
97
| 6 | {2,4,5,7} |
88
98
| 7 | {3,5} |
89
99
90
-
(c)
91
-
92
-
100
+
(c)
93
101
|||
94
102
| :-- | :-- |
95
103
| 1 | {6,7} |
@@ -100,58 +108,78 @@ Which of the following tables shows the adjacency list w.r.t incoming edges of t
100
108
| 6 | {2,4,7} |
101
109
| 7 | {3,5} |
102
110
103
-
(d) (no table shown)
104
-
**Solution:**
105
-
Analyzing the incoming edges from the outgoing list, option (c) matches the correct incoming adjacency list.
106
-
**Correct option:** (c)
107
-
108
-
**Question 5:**
109
-
Suppose we obtain the following BFS tree rooted at node 1 for an undirected graph with vertices (1,2,3,4,5,...,14). Which of the following cannot be an edge in the original graph?
110
-
**Options:**
111
-
(a) (8,11)
112
-
(b) (3,10)
113
-
(c) (4,5)
114
-
(d) (6,9)
115
-
**Solution:**
116
-
In a BFS tree, edges between vertices in the same or adjacent levels are possible. The edge (8,11) is unlikely to be present if not part of the tree and not connecting tree levels as expected.
117
-
**Correct option:** (a) (8,11)
111
+
(d) (no table shown)
112
+
{{< /border >}}
113
+
114
+
{{< border >}}
115
+
**Solution:**
116
+
Analyzing the incoming edges from the outgoing list, option (c) matches the correct incoming adjacency list.
117
+
**Correct option:** (c)
118
+
{{< /border >}}
119
+
120
+
{{< border type="question" >}}
121
+
**Question 5:**
122
+
Suppose we obtain the following BFS tree rooted at node 1 for an undirected graph with vertices (1,2,3,4,5,...,14). Which of the following cannot be an edge in the original graph?
123
+
**Options:**
124
+
(a) (8,11)
125
+
(b) (3,10)
126
+
(c) (4,5)
127
+
(d) (6,9)
128
+
{{< /border >}}
129
+
130
+
{{< border >}}
131
+
**Solution:**
132
+
In a BFS tree, edges between vertices in the same or adjacent levels are possible. The edge (8,11) is unlikely to be present if not part of the tree and not connecting tree levels as expected.
133
+
**Correct option:** (a) (8,11)
134
+
{{< /border >}}
118
135
119
136
---
120
137
138
+
{{< border type="question" >}}
121
139
## 2. Multiple Select Questions (MSQ)
122
140
123
-
**Question 6:**
141
+
**Question 6:**
124
142
Which of the following graphs satisfies the below properties:
125
143
126
144
1.\$ |VC(G)| = 3 \$, where \$ VC(G) \$ is the minimum vertex cover of a graph \$ G \$.
127
145
2.\$ |PM(G)| = 3 \$, where \$ PM(G) \$ is the perfect matching of a graph \$ G \$.
128
146
3. The graph is a 3-colouring.
129
-
**Options:** (Specific graph diagrams are implied, but not shown here.)
130
-
**Solution:**
131
-
The correct options are (c) and (d) based on the provided answer key.
132
-
**Correct options:** (c), (d)
133
147
134
-
**Question 7:**
135
-
Which of the following statements is(are) true?
136
-
**Options:**
137
-
(a) BFS can be used to identify the vertex which is at the farthest distance from \$ v \$ in any graph, in terms of number of edges, where vertex \$ v \$ is the starting vertex.
138
-
(b) BFS and DFS identifies all the vertices reachable from the starting vertex \$ v \$.
139
-
(c) BFS cannot be used to check for cycles in the graph while DFS can be used to check for cycles in the graph.
140
-
(d) DFS can be used to identify the shortest distance from starting vertex \$ v \$ to every other vertex in the graph, in terms of number of edges.
141
-
**Solution:**
142
-
143
-
-**(a):** True (BFS gives the level, i.e., distance from starting vertex).
144
-
-**(b):** True (both BFS and DFS explore all reachable vertices).
145
-
-**(c):** False (both can be used to detect cycles, but in different ways).
146
-
-**(d):** False (DFS does not guarantee shortest path).
147
-
**Correct options:** (a), (b)
148
+
**Options:** (Specific graph diagrams are implied, but not shown here.)
149
+
{{< /border >}}
150
+
151
+
{{< border >}}
152
+
**Solution:**
153
+
The correct options are (c) and (d) based on the provided answer key.
154
+
**Correct options:** (c), (d)
155
+
{{< /border >}}
156
+
157
+
{{< border type="question" >}}
158
+
**Question 7:**
159
+
Which of the following statements is(are) true?
160
+
**Options:**
161
+
(a) BFS can be used to identify the vertex which is at the farthest distance from \$ v \$ in any graph, in terms of number of edges, where vertex \$ v \$ is the starting vertex.
162
+
(b) BFS and DFS identifies all the vertices reachable from the starting vertex \$ v \$.
163
+
(c) BFS cannot be used to check for cycles in the graph while DFS can be used to check for cycles in the graph.
164
+
(d) DFS can be used to identify the shortest distance from starting vertex \$ v \$ to every other vertex in the graph, in terms of number of edges.
165
+
{{< /border >}}
166
+
167
+
{{< border >}}
168
+
**Solution:**
169
+
-**(a):** True (BFS gives the level, i.e., distance from starting vertex).
170
+
-**(b):** True (both BFS and DFS explore all reachable vertices).
171
+
-**(c):** False (both can be used to detect cycles, but in different ways).
172
+
-**(d):** False (DFS does not guarantee shortest path).
173
+
**Correct options:** (a), (b)
174
+
{{< /border >}}
148
175
149
176
---
150
177
178
+
{{< border type="question" >}}
151
179
## 3. Numerical Answer Type (NAT)
152
180
153
-
**Question 8:**
154
-
If \$ A \$ represents adjacency matrix of a graph \$ G \$, then the cardinality of the maximum independent set of the graph \$ G \$ is
181
+
**Question 8:**
182
+
If \$ A \$ represents adjacency matrix of a graph \$ G \$, then the cardinality of the maximum independent set of the graph \$ G \$ is
155
183
**Adjacency matrix:**
156
184
157
185
```
@@ -164,22 +192,35 @@ If \$ A \$ represents adjacency matrix of a graph \$ G \$, then the cardinality
164
192
6 0 1 0 1 0 0 0
165
193
7 0 0 0 1 0 0 0
166
194
```
195
+
{{< /border >}}
167
196
168
-
**Solution:**
169
-
Analyzing the graph: a maximum independent set is a set of vertices with no edges between them.
170
-
**Answer:** 5
197
+
{{< border >}}
198
+
**Solution:**
199
+
Analyzing the graph: a maximum independent set is a set of vertices with no edges between them.
200
+
**Answer:** 5
201
+
{{< /border >}}
171
202
172
-
**Question 9:**
203
+
{{< border type="question" >}}
204
+
**Question 9:**
173
205
A company manufactures 10 chemicals \$ X_1, X_2, X_3, ..., X_{10} \$. Certain pairs of these chemicals are incompatible and would cause explosions if brought into contact with each other. The graph shows incompatibility (each vertex is a chemical, each edge is incompatibility). The company wishes to partition its warehouse into compartments, and store incompatible chemicals in different compartments. What is the least number of compartments into which the warehouse should be partitioned?
174
-
**Solution:**
175
-
This is the chromatic number problem. The answer is determined by the maximum clique or by the graph's structure.
176
-
**Answer:** 3
206
+
{{< /border >}}
207
+
208
+
{{< border >}}
209
+
**Solution:**
210
+
This is the chromatic number problem. The answer is determined by the maximum clique or by the graph's structure.
211
+
**Answer:** 3
212
+
{{< /border >}}
177
213
178
-
**Question 10:**
214
+
{{< border type="question" >}}
215
+
**Question 10:**
179
216
An incomplete undirected graph is given below and the numbering on each vertex denotes the colouring of the graph ('1' denotes color 1, '2' denotes color 2, and '3' denotes color 3). Find the number of maximum edges that can be added to the given graph such that the colouring is retained and the graph is planar.
180
-
**Solution:**
181
-
A planar graph with \$ n \$ vertices has at most \$ 3n-6 \$ edges (for \$ n \geq 3 \$). The maximum number of edges that can be added while retaining the given colouring and planarity is determined by the current edge count and the constraints.
182
-
**Answer:** 6
217
+
{{< /border >}}
218
+
219
+
{{< border >}}
220
+
**Solution:**
221
+
A planar graph with \$ n \$ vertices has at most \$ 3n-6 \$ edges (for \$ n \geq 3 \$). The maximum number of edges that can be added while retaining the given colouring and planarity is determined by the current edge count and the constraints.
222
+
**Answer:** 6
223
+
{{< /border >}}
183
224
184
225
---
185
226
@@ -205,7 +246,3 @@ This is the complete extraction of all questions and solutions from the provided
0 commit comments