Question 1 |

For constants a\geq 1 and b \gt 1, consider the following recurrence defined on the non-negative integers:

T(n) = a \cdot T \left(\dfrac{n}{b} \right) + f(n)

Which one of the following options is correct about the recurrence T(n)?

T(n) = a \cdot T \left(\dfrac{n}{b} \right) + f(n)

Which one of the following options is correct about the recurrence T(n)?

if f(n) is n \log_2(n), then T(n) is \Theta(n \log_2(n)). | |

if f(n) is \dfrac{n}{\log_2(n)}, then T(n) is \Theta(\log_2(n)). | |

if f(n) is O(n^{\log_b(a)-\epsilon}) for some \epsilon \gt 0, then T(n) is \Theta(n ^{\log_b(a)}). | |

if f(n) is \Theta(n ^{\log_b(a)}), then T(n) is \Theta(n ^{\log_b(a)}). |

Question 1 Explanation:

Question 2 |

Consider the string abbccddeee. Each letter in the string must be assigned a binary code satisfying the following properties:

For any two letters, the code assigned to one letter must not be a prefix of the code assigned to the other letter.

For any two letters of the same frequency, the letter which occurs earlier in the dictionary order is assigned a code whose length is at most the length of the code assigned to the other letter.

Among the set of all binary code assignments which satisfy the above two properties, what is the minimum length of the encoded string?

For any two letters, the code assigned to one letter must not be a prefix of the code assigned to the other letter.

For any two letters of the same frequency, the letter which occurs earlier in the dictionary order is assigned a code whose length is at most the length of the code assigned to the other letter.

Among the set of all binary code assignments which satisfy the above two properties, what is the minimum length of the encoded string?

21 | |

23 | |

25 | |

30 |

Question 2 Explanation:

Question 3 |

Let G be a connected undirected weighted graph. Consider the following two statements.

S1: There exists a minimum weight edge in G which is present in every minimum spanning tree of G.

S2: If every edge in G has distinct weight, then G has a unique minimum spanning tree.

Which one of the following options is correct?

S1: There exists a minimum weight edge in G which is present in every minimum spanning tree of G.

S2: If every edge in G has distinct weight, then G has a unique minimum spanning tree.

Which one of the following options is correct?

Both S1 and S2 are true | |

S1 is true and S2 is false | |

S1 is false and S2 is true | |

Both S1 and S2 are false |

Question 3 Explanation:

Question 4 |

An articulation point in a connected graph is a vertex such that removing the vertex and its incident edges disconnects the graph into two or more connected components.

Let T be a DFS tree obtained by doing DFS in a connected undirected graph G.

Which of the following options is/are correct?

Let T be a DFS tree obtained by doing DFS in a connected undirected graph G.

Which of the following options is/are correct?

Root of T can never be an articulation point in G. | |

Root of T is an articulation point in G if and only if it has 2 or more children. | |

A leaf of T can be an articulation point in G. | |

If u is an articulation point in G such that x is an ancestor of u in T and y is a descendent of u in T, then all paths from x to y in G must pass through u. |

Question 4 Explanation:

Question 5 |

Define R_n to be the maximum amount earned by cutting a rod of length n meters into one or more pieces of integer length and selling them. For i > 0, let p[i] denote the selling price of a rod whose length is i meters. Consider the array of prices:

\text{p}[1]=1,\text{p}[2]=5,\text{p}[3]=8,\text{p}[4]=9,\text{p}[5]=10,\text{p}[6]=17,\text{p}[7]=18

which of the following statements is/are correct about R_7?

\text{p}[1]=1,\text{p}[2]=5,\text{p}[3]=8,\text{p}[4]=9,\text{p}[5]=10,\text{p}[6]=17,\text{p}[7]=18

which of the following statements is/are correct about R_7?

**[MSQ]**R_7=18 | |

R_7=19 | |

R_7 is achieved by three different solutions. | |

R_7 cannot be achieved by a solution consisting of three pieces. |

Question 5 Explanation:

Question 6 |

Let G=(V,E) be an undirected unweighted connected graph. The diameter of G is defined as:

diam(G)=\displaystyle \max_{u,v \in V} \{ \text{the length of shortest path between }u \text{ and }v \}

Let M be the adjacency matrix of G.

Define graph G_2 on the same set of vertices with adjacency matrix N, where

N_{ij}=\left\{\begin{array} {lcl} 1 &\text{if}\; M_{ij}>0 \text{ or } P_{ij}>0, \text{ where }P=M^2\\0 &\text{otherwise} \end{array}\right.

Which one of the following statements is true?

diam(G)=\displaystyle \max_{u,v \in V} \{ \text{the length of shortest path between }u \text{ and }v \}

Let M be the adjacency matrix of G.

Define graph G_2 on the same set of vertices with adjacency matrix N, where

N_{ij}=\left\{\begin{array} {lcl} 1 &\text{if}\; M_{ij}>0 \text{ or } P_{ij}>0, \text{ where }P=M^2\\0 &\text{otherwise} \end{array}\right.

Which one of the following statements is true?

diam(G_2)\leq \left \lceil diam(G)/2 \right \rceil | |

\left \lceil diam(G)/2 \right \rceil \lt diam(G_2) \lt diam(G) | |

diam(G_2) =diam(G) | |

diam(G) \lt diam(G_2) \leq 2 \; diam(G) |

Question 6 Explanation:

Question 7 |

Consider the following recurrence relation.

T\left ( n \right )=\left\{\begin{array} {lcl} T(n/2)+T(2n/5)+7n & \text{if} \; n > 0\\1 & \text{if}\; n=0 \end{array}\right.

Which one of the following options is correct?

T\left ( n \right )=\left\{\begin{array} {lcl} T(n/2)+T(2n/5)+7n & \text{if} \; n > 0\\1 & \text{if}\; n=0 \end{array}\right.

Which one of the following options is correct?

T(n)=\Theta (n^{5/2}) | |

T(n)=\Theta (n \log n) | |

T(n)=\Theta (n) | |

T(n)=\Theta ((\log n)^{5/2}) |

Question 7 Explanation:

Question 8 |

Consider the following undirected graph with edge weights as shown:

The number of minimum-weight spanning trees of the graph is __________

The number of minimum-weight spanning trees of the graph is __________

4 | |

6 | |

5 | |

3 |

Question 8 Explanation:

Question 9 |

Consider the following array.

\begin{array}{|l|l|l|l|l|l|l|l|} \hline 23&32&45&69&72&73&89&97 \\ \hline\end{array}

Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort the above array in ascending order?

\begin{array}{|l|l|l|l|l|l|l|l|} \hline 23&32&45&69&72&73&89&97 \\ \hline\end{array}

Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort the above array in ascending order?

Selection sort | |

Mergesort | |

Insertion sort | |

Quicksort using the last element as pivot |

Question 9 Explanation:

Question 10 |

Consider the following three functions.

f_1=10^n\; f_2=n^{\log n}\;f_3=n^{\sqrt {n}}

Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?

f_1=10^n\; f_2=n^{\log n}\;f_3=n^{\sqrt {n}}

Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?

f_3, f_2, f_1 | |

f_2, f_1, f_3 | |

f_1, f_2, f_3 | |

f_2, f_3, f_1 |

Question 10 Explanation:

There are 10 questions to complete.