Skip to content

Commit d9fcd6a

Browse files
authored
Merge pull request #3 from simplearyan/add-content
Add content
2 parents 38271ef + eee6bfc commit d9fcd6a

43 files changed

Lines changed: 3393 additions & 563 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/exercises/graded-assignments/mathematics-1/W10GA1.md

Lines changed: 133 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,63 @@ categories:
66
- Mathematics Graded Assignment
77
---
88

9+
{{< border type="question" >}}
910
## 1. Multiple Choice Questions (MCQ)
1011

1112
**Question 1:**
1213
The maximum number of non-zero entries in an adjacency matrix of a simple graph having \$ n \$ vertices can be
1314
**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" >}}
2228
**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" >}}
3747
**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:**
4964
Below table shows the adjacency list w.r.t outgoing edges of a directed graph \$ G \$:
5065

51-
5266
| | |
5367
| :-- | :-- |
5468
| 1 | {2,4} |
@@ -59,11 +73,9 @@ Below table shows the adjacency list w.r.t outgoing edges of a directed graph \$
5973
| 6 | {1} |
6074
| 7 | {1,2,6} |
6175

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)
6779
| | |
6880
| :-- | :-- |
6981
| 1 | {6,7} |
@@ -74,9 +86,7 @@ Which of the following tables shows the adjacency list w.r.t incoming edges of t
7486
| 6 | {2,4,7} |
7587
| 7 | {3,5} |
7688

77-
(b)
78-
79-
89+
(b)
8090
| | |
8191
| :-- | :-- |
8292
| 1 | {6,7} |
@@ -87,9 +97,7 @@ Which of the following tables shows the adjacency list w.r.t incoming edges of t
8797
| 6 | {2,4,5,7} |
8898
| 7 | {3,5} |
8999

90-
(c)
91-
92-
100+
(c)
93101
| | |
94102
| :-- | :-- |
95103
| 1 | {6,7} |
@@ -100,58 +108,78 @@ Which of the following tables shows the adjacency list w.r.t incoming edges of t
100108
| 6 | {2,4,7} |
101109
| 7 | {3,5} |
102110

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 >}}
118135

119136
---
120137

138+
{{< border type="question" >}}
121139
## 2. Multiple Select Questions (MSQ)
122140

123-
**Question 6:**
141+
**Question 6:**
124142
Which of the following graphs satisfies the below properties:
125143

126144
1. \$ |VC(G)| = 3 \$, where \$ VC(G) \$ is the minimum vertex cover of a graph \$ G \$.
127145
2. \$ |PM(G)| = 3 \$, where \$ PM(G) \$ is the perfect matching of a graph \$ G \$.
128146
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)
133147

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 >}}
148175

149176
---
150177

178+
{{< border type="question" >}}
151179
## 3. Numerical Answer Type (NAT)
152180

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
155183
**Adjacency matrix:**
156184

157185
```
@@ -164,22 +192,35 @@ If \$ A \$ represents adjacency matrix of a graph \$ G \$, then the cardinality
164192
6 0 1 0 1 0 0 0
165193
7 0 0 0 1 0 0 0
166194
```
195+
{{< /border >}}
167196

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 >}}
171202

172-
**Question 9:**
203+
{{< border type="question" >}}
204+
**Question 9:**
173205
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 >}}
177213

178-
**Question 10:**
214+
{{< border type="question" >}}
215+
**Question 10:**
179216
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 >}}
183224

184225
---
185226

@@ -205,7 +246,3 @@ This is the complete extraction of all questions and solutions from the provided
205246

206247
[^9]: https://www.scribd.com/document/510142002/Solutions-Graphtheory
207248

208-
[^10]: https://facultyweb.kennesaw.edu/mlavrov/courses/graph-theory-slides-3.pdf
209-
210-
[^11]: https://archive.nptel.ac.in/content/storage2/courses/downloads_new/106103205/Week_04_Assignment_04.pdf
211-

0 commit comments

Comments
 (0)