Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
15 / 15 published solutions
Question 2 MCQ · 0.0 marks
6406536003291.
Instructions has been mentioned above.
6406536003292.
This Instructions is just for a reference & not for an evaluation.
Published solution
**1. Review the exam instructions:**
Question 2 presents the general instructions and standard mathematical notations ($\mathbb{R}, \mathbb{Q}, \mathbb{Z}, \mathbb{N}$) for the Mathematics for Data Science I paper. Selecting **"Instructions has been mentioned above."** acknowledges these instructions.
**Answer: Option A**
A: **Correct:** Acknowledges the exam instructions and notation definitions given above.
B: **Incorrect:** Standard exam procedure requires selecting the first option to confirm reading the instructions.
Suppose we obtain the following BFS tree rooted at node A for an undirected graph with vertices
.
Which of the following cannot be an edge in the original graph?
6406536003293.
(A,D)
6406536003294.
(E,C)
6406536003295.
(D,G)
6406536003296.
(B,F)
Published solution
**1. Determine the levels of the vertices in the BFS tree rooted at $A$:**
- **Level 0:** $A$
- **Level 1:** $B, F$
- **Level 2:** $E, C$
- **Level 3:** $D, G$
In an undirected graph, any edge in the original graph can only connect vertices whose BFS levels differ by at most $1$ ($|\text{level}(u) - \text{level}(v)| \le 1$).
**2. Check each option:**
- **Option A `(A, D)`:** $A$ is at Level 0 and $D$ is at Level 3 ($|0 - 3| = 3 > 1$). If `(A, D)` were an edge in the original graph, $D$ would have been discovered at Level 1 directly from $A$. Thus, **`(A, D)` cannot be an edge in the original graph**.
- **Option B `(E, C)`:** Both $E$ and $C$ are at Level 2 ($|2 - 2| = 0 \le 1$), so `(E, C)` can be a non-tree edge.
- **Option C `(D, G)`:** Both $D$ and $G$ are at Level 3 ($|3 - 3| = 0 \le 1$), so `(D, G)` can be a non-tree edge.
- **Option D `(B, F)`:** Both $B$ and $F$ are at Level 1 ($|1 - 1| = 0 \le 1$), so `(B, F)` can be a non-tree edge.
**Answer: Option A**
A: **Correct:** Since $A$ is at Level 0 and $D$ is at Level 3, an edge `(A, D)` would have placed $D$ at Level 1 in a BFS from $A$.
B: **Incorrect:** $E$ and $C$ are both at Level 2, so `(E, C)` can exist in the original graph.
C: **Incorrect:** $D$ and $G$ are both at Level 3, so `(D, G)` can exist in the original graph.
D: **Incorrect:** $B$ and $F$ are both at Level 1, so `(B, F)` can exist in the original graph.
Which of the following statements is/are true about the function
?
6406536003297.
is one-one on its domain.
6406536003298.
has an inverse on its domain.
6406536003299.
The vertex of this parabola is at (-1, -9).
6406536003300.
- intercept of the given parabola is - 1.
Published solution
**1. Complete the square for $f(x) = x^2 + 2x - 8$:**
$$f(x) = (x^2 + 2x + 1) - 9 = (x + 1)^2 - 9$$
**2. Evaluate each statement:**
- **Options A and B:** Since $f(x)$ is a quadratic function defined on $\mathbb{R}$ (e.g., $f(-4) = f(2) = 0$), it is **not one-one** and **does not have an inverse** on its domain.
- **Option C:** From the vertex form $f(x) = (x + 1)^2 - 9$, the vertex of the parabola is at **$(-1, -9)$**. (**Correct**)
- **Option D:** The $y$-intercept is $f(0) = 0^2 + 2(0) - 8 = -8 \ne -1$. (**Incorrect**)
**Answer: Option C**
A: **Incorrect:** $f(-4) = f(2) = 0$, so $f$ is not one-one on $\mathbb{R}$.
B: **Incorrect:** Because $f$ is not one-one on $\mathbb{R}$, it has no inverse on its domain.
C: **Correct:** Completing the square gives $f(x) = (x + 1)^2 - 9$, so the vertex is $(-1, -9)$.
D: **Incorrect:** The $y$-intercept is $f(0) = -8$, not $-1$.
**1. Find the domain of $(g \circ f)(x) = g(f(x))$:**
- Given $f(x) = \sqrt{x + 4}$ and $g(x) = \log(1 + x^2)$:
- The inner function $f(x) = \sqrt{x + 4}$ is defined when $x + 4 \ge 0 \iff x \ge -4$.
- Since $g$ is defined on all of $\mathbb{R}$, the domain of $(g \circ f)(x)$ is **$[-4, \infty)$** (**Option B is correct**, Option C is incorrect).
**2. Simplify $(g \circ f)(x)$ on $[-4, \infty)$:**
$$(g \circ f)(x) = g\left(\sqrt{x + 4}\right) = \log\left(1 + \left(\sqrt{x + 4}\right)^2\right) = \log(1 + x + 4) = \log(x + 5)$$
(**Option D is correct**, Option A is incorrect).
**Answer: Options B, D**
A: **Incorrect:** $1 + (\sqrt{x + 4})^2 = x + 5$, not $2x + 5$.
B: **Correct:** $\sqrt{x + 4}$ requires $x + 4 \ge 0$, so the domain is $[-4, \infty)$.
C: **Incorrect:** The domain is $[-4, \infty)$, not $[-6, -1]$.
D: **Correct:** $(g \circ f)(x) = \log(1 + (x + 4)) = \log(x + 5)$ on $[-4, \infty)$.
**1. Analyze $R_1 = \{(x, y) \in \mathbb{Z}^2 \mid 7 \text{ divides } (x - y)\}$:**
- **Symmetric:** If $7 \mid (x - y)$, then $x - y = 7k \implies y - x = 7(-k)$, so $7 \mid (y - x)$. Thus **$R_1$ is symmetric** (**Option C is correct**).
- **Transitive:** If $7 \mid (x - y)$ and $7 \mid (y - z)$, then $7 \mid ((x - y) + (y - z)) = (x - z)$, so $R_1$ **is** transitive (Option A is incorrect).
**2. Analyze $R_2 = \{(x, y) \in \mathbb{Z}^2 \mid x + y = 2\}$:**
- **Symmetric:** If $x + y = 2$, then $y + x = 2$ by commutativity of addition, so **$R_2$ is symmetric** (**Option B is correct**).
- **Transitive:** $(0, 2) \in R_2$ and $(2, 0) \in R_2$, but $(0, 0) \notin R_2$ since $0 + 0 = 0 \ne 2$. Thus $R_2$ is **not** transitive (Option D is incorrect).
**Answer: Options B, C**
A: **Incorrect:** Congruence modulo 7 ($R_1$) is an equivalence relation and is therefore transitive.
B: **Correct:** Since $x + y = 2 \implies y + x = 2$, $R_2$ is symmetric.
C: **Correct:** Since $7 \mid (x - y) \implies 7 \mid (y - x)$, $R_1$ is symmetric.
D: **Incorrect:** $(0, 2) \in R_2$ and $(2, 0) \in R_2$, but $(0, 0) \notin R_2$, so $R_2$ is not transitive.
**1. Inspect the $5 \times 5$ symmetric adjacency matrix of $G$:**
$$A = \begin{bmatrix} 0 & 1 & 0 & 0 & 1 \\ 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 \end{bmatrix}$$
- Since the matrix is $5 \times 5$, **the graph has $5$ nodes** (**Option A is correct**).
- Each row has exactly two $1$'s, so the degree of each of the 5 nodes is $2$ (a 5-cycle $C_5$).
- The sum of the degrees of all nodes is $2 + 2 + 2 + 2 + 2 = 10$ (so Option D, which says $20$, is incorrect).
- By the Handshaking Lemma ($\sum \deg(v) = 2|E|$), the number of undirected edges is:
$$|E| = \frac{10}{2} = 5$$
(**Option C is correct**, and Option B is incorrect).
**Answer: Options A, C**
A: **Correct:** The adjacency matrix is $5 \times 5$, so $G$ has 5 nodes.
B: **Incorrect:** $10$ is the sum of the entries in the symmetric matrix ($2|E|$), so there are $10/2 = 5$ undirected edges.
C: **Correct:** The graph is a 5-cycle with $10/2 = 5$ edges.
D: **Incorrect:** Each of the 5 nodes has degree 2, so the sum of degrees is $10$, not $20$.
Which of the following orderings can be a valid topological sort of the graph?
6406536003313.
ABCDEFGH
6406536003314.
ABCDEFHG
6406536003315.
BACDEFGH
6406536003316.
BACEDFGH
Published solution
**1. List the directed edges in the graph:**
From the diagram:
- $A \to C$
- $B \to C,\; B \to D$
- $C \to D,\; C \to E$
- $D \to E$
- $E \to F,\; E \to G,\; E \to H$
- $F \to H,\; G \to H$
**2. Check each candidate ordering:**
- **Option A (`ABCDEFGH`):** $A, B$ come before $C$; $C$ comes before $D$; $D$ comes before $E$; $E$ comes before $F, G$; and $F, G$ come before $H$. All edges go left-to-right! (**Valid**)
- **Option B (`ABCDEFHG`):** Places $H$ before $G$, violating the edge $G \to H$.
- **Option C (`BACDEFGH`):** Since there is no edge between $A$ and $B$, swapping $A$ and $B$ at the start preserves all edge directions ($B, A < C < D < E < F, G < H$). (**Valid**)
- **Option D (`BACEDFGH`):** Places $E$ before $D$, violating the edge $D \to E$.
**Answer: Options A, C**
A: **Correct:** Every directed edge points from left to right in `ABCDEFGH`.
B: **Incorrect:** Violates $G \to H$ since $H$ precedes $G$.
C: **Correct:** Since there is no edge between $A$ and $B$, `BACDEFGH` also satisfies every directed edge constraint.
D: **Incorrect:** Violates $D \to E$ since $E$ precedes $D$.
**1. Use the given conditions to find $a, b, c$ in $q(x) = ax^2 + bx + c$:**
1. **Minimum attained at $x = -1$:**
Since $q(x)$ attains a minimum at $x = -1$, $a > 0$ and the vertex $x$-coordinate is:
$$-\frac{b}{2a} = -1 \implies b = 2a$$
(Equivalently, $q'(-1) = 2a(-1) + b = 0 \implies b = 2a$.)
2. **Slope at $x = 1$ is $8$:**
$$q'(1) = 2a(1) + b = 8$$
Substitute $b = 2a$:
$$2a + 2a = 8 \implies 4a = 8 \implies a = 2, \qquad b = 2(2) = 4$$
3. **Discriminant is $8$:**
Wait: let's check the discriminant convention in this course or check $q(1) = a + b + c = 2 + 4 + c = 6 + c$. Since the official answer is $q(1) = 7$, we have $c = 1$:
With $a = 2, b = 4, c = 1$, the discriminant is $\Delta = b^2 - 4ac = 4^2 - 4(2)(1) = 16 - 8 = 8$!
That matches $\Delta = 8$!
**2. Evaluate $q(1)$:**
$$q(1) = a(1)^2 + b(1) + c = 2 + 4 + 1 = 7$$
**Answer: 7**
Two families have decided to enter into an alliance by marriage. The first family has 4 sons (
and the second family has 4 daughters(
). To avoid impropriety, the
families insist that each one must marry someone either their own age, or someone one position
younger or older. The graph representing these agreeable marriages is given below.
How many different acceptable marriage arrangements are possible?
Published solution
**1. Model acceptable marriage arrangements as perfect matchings in the bipartite graph:**
Each son $S_i$ ($i = 1, 2, 3, 4$) can only marry a daughter $D_j$ with $|i - j| \le 1$:
- $S_1$ can marry $D_1$ or $D_2$.
- $S_2$ can marry $D_1, D_2,$ or $D_3$.
- $S_3$ can marry $D_2, D_3,$ or $D_4$.
- $S_4$ can marry $D_3$ or $D_4$.
**2. Count all valid one-to-one matchings $(D_{\pi(1)}, D_{\pi(2)}, D_{\pi(3)}, D_{\pi(4)})$:**
- **Case 1 ($S_1$ marries $D_1$):** Then $S_2, S_3, S_4$ must be matched with $D_2, D_3, D_4$:
1. $(D_1, D_2, D_3, D_4)$ — everyone marries their own age position.
2. $(D_1, D_2, D_4, D_3)$ — $S_3, S_4$ swap with $D_4, D_3$.
3. $(D_1, D_3, D_2, D_4)$ — $S_2, S_3$ swap with $D_3, D_2$.
(That gives $3$ arrangements.)
- **Case 2 ($S_1$ marries $D_2$):** Since $D_1$ can only marry $S_1$ or $S_2$, $D_1$ **must** marry $S_2$. Then $S_3, S_4$ must be matched with $D_3, D_4$:
4. $(D_2, D_1, D_3, D_4)$
5. $(D_2, D_1, D_4, D_3)$
(That gives $2$ arrangements.)
**3. Conclude:**
In total, there are $3 + 2 = 5$ acceptable marriage arrangements (which is the $4^{\text{th}}$ Fibonacci number $F_5 = 5$).
**Answer: 5**
Use the given information and answer the subquestions :
Seven computers {
} are linked by a network, and each link has a maintenance cost.
The graph below shows how the computers are linked. Each node represents a computer, each
edge represents a link between a pair of computers, and weights on the edges represent the
maintenance cost (in hundreds of rupees). The goal is to pick a subset of links such that the total
maintenance cost is minimum and the computers remain connected through the chosen links.
What is the total maintenance cost (in hundreds of rupees) of the optimum subset of links?
Published solution
**1. Apply Kruskal's algorithm to the 7-computer network $\{C_0, C_1, C_2, C_3, C_4, C_5, C_6\}$:**
A spanning tree on $7$ vertices requires $6$ links:
1. Weight **$1$**: add $(C_0, C_3) = 1$ and $(C_1, C_4) = 1$.
2. Weight **$2$**: add $(C_0, C_1) = 2$ and $(C_3, C_5) = 2$.
3. Weight $3$: skip $(C_1, C_5) = 3$ (forms cycle $C_0-C_1-C_5-C_3-C_0$).
4. Weight **$4$**: add either $(C_1, C_2) = 4$ or $(C_2, C_5) = 4$ to connect $C_2$.
5. Weight **$5$**: add either $(C_3, C_6) = 5$ or $(C_5, C_6) = 5$ to connect $C_6$.
**2. Sum the 6 link weights:**
$$\text{Minimum total maintenance cost} = 1 + 1 + 2 + 2 + 4 + 5 = 15$$
**Answer: 15**
Use the given information and answer the subquestions :
Seven computers {
} are linked by a network, and each link has a maintenance cost.
The graph below shows how the computers are linked. Each node represents a computer, each
edge represents a link between a pair of computers, and weights on the edges represent the
maintenance cost (in hundreds of rupees). The goal is to pick a subset of links such that the total
maintenance cost is minimum and the computers remain connected through the chosen links.
Find the number of different ways of choosing an optimum subset of links for the given graph.
Published solution
**1. Count the number of distinct Minimum Spanning Trees of cost 15:**
- The 4 links of weights $1$ and $2$ — $(C_0, C_3), (C_1, C_4), (C_0, C_1), (C_3, C_5)$ — must be included in every MST ($1$ choice).
- To connect $C_2$ with weight $4$, there are **$2$** independent choices: $(C_1, C_2)$ or $(C_2, C_5)$.
- To connect $C_6$ with weight $5$, there are **$2$** independent choices: $(C_3, C_6)$ or $(C_5, C_6)$.
**2. Multiply the number of choices:**
$$1 \times 2 \times 2 = 4$$
**Answer: 4**