MauryaHub PYQ Practice

Advanced Algorithms · Quiz 2 · Jan 2026

Advanced Algorithms · Quiz 2 · Jan 2026

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 21 published solutions

Question 2 MCQ · 3.0 marks

Consider the statements about randomized quicksort and answer the given subquestions if they are true or false.
The worst-case running time and expected running time are equal to within constant factors for any randomized algorithm.
6406536646564.
True
6406536646565.
False

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 3.0 marks

Consider the statements about randomized quicksort and answer the given subquestions if they are true or false.
An adversary can provide randomized quicksort with an input array of length
Source diagram or notation
that forces the algorithm to run in
Source diagram or notation
time on that input. (If you are not familiar with the
Source diagram or notation
asymptotic notation, it roughly translates as “at least”. For example, we can say that it is possible to come up with an input that forces insertion sort to run for
Source diagram or notation
steps.)
6406536646566.
True
6406536646567.
False

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 3.0 marks

In RANDOMIZED-QUICKSORT, consider two distinct elements
Source diagram or notation
and
Source diagram or notation
with
Source diagram or notation
. What is the probability that these two elements are compared during execution?
6406536646568.Source diagram or notation
6406536646569.Source diagram or notation
6406536646570.Source diagram or notation
6406536646571.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 3.0 marks

**Generating UAR Sequences** The goal of this exercise is to compute a uniformly random permutation of
Source diagram or notation
. Assume we have a generator that produces independent uniform real numbers in
Source diagram or notation
. Consider the following algorithm: • Generate random numbers
Source diagram or notation
independently from
Source diagram or notation
• Pair them as
Source diagram or notation
• Sort the pairs in **decreasing order** of
Source diagram or notation
• Output the permutation based on sorted indices Does this procedure generate a uniformly random permutation of
Source diagram or notation
?
6406536646572.
Yes
6406536646573.
No

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 3.0 marks

Consider the following approximation algorithm for the weighted vertex cover problem: 1. Solve the relaxed linear program corresponding to the given problem: **Minimize**
Source diagram or notation
**Subject to**
Source diagram or notation
2.
Source diagram or notation
3. return
Source diagram or notation
Based on the above data, answer the given subquestions.
Suppose that instead of putting a vertex
Source diagram or notation
into the cover when
Source diagram or notation
, we put
Source diagram or notation
into the cover when
Source diagram or notation
. What happens?
6406536646574.
We still get a valid solution, and the algorithm remains a 2-approximation.
6406536646575.
We still get a valid solution, and the algorithm becomes a 4-approximation.
6406536646576.
We may no longer get a valid solution.

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 3.0 marks

Consider the following approximation algorithm for the weighted vertex cover problem: 1. Solve the relaxed linear program corresponding to the given problem: **Minimize**
Source diagram or notation
**Subject to**
Source diagram or notation
2.
Source diagram or notation
3. return
Source diagram or notation
Based on the above data, answer the given subquestions.
Suppose that instead of putting a vertex
Source diagram or notation
into the cover when
Source diagram or notation
, we put
Source diagram or notation
into the cover when
Source diagram or notation
. What happens?
6406536646577.
We still get a valid solution, and the algorithm remains a 2-approximation.
6406536646578.
We still get a valid solution, and the algorithm becomes a
Source diagram or notation
-approximation.
6406536646579.
We may no longer get a valid solution.

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 3.0 marks

Consider the following approximation algorithm for the weighted vertex cover problem: 1. Solve the relaxed linear program corresponding to the given problem: **Minimize**
Source diagram or notation
**Subject to**
Source diagram or notation
2.
Source diagram or notation
3. return
Source diagram or notation
Based on the above data, answer the given subquestions.
Suppose that we modify the algorithm to include vertex
Source diagram or notation
in the cover only when
Source diagram or notation
. What happens?
6406536646580.
We still get a valid solution, and the algorithm remains a 2-approximation.
6406536646581.
We may no longer get a valid solution.
6406536646582.
We get an optimal solution always.

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 3.0 marks

Consider the following approximation algorithm for the weighted vertex cover problem: 1. Solve the relaxed linear program corresponding to the given problem: **Minimize**
Source diagram or notation
**Subject to**
Source diagram or notation
2.
Source diagram or notation
3. return
Source diagram or notation
Based on the above data, answer the given subquestions.
Suppose that we include vertex
Source diagram or notation
in the cover when
Source diagram or notation
. What happens?
6406536646583.
We always get a valid solution, but the approximation factor may become worse.
6406536646584.
We always get an optimal solution.
6406536646585.
We may not get a valid solution.

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 2.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
A graph G is a cluster graph if and only if it does not have an induced path on 3 vertices.
6406536646586.
True
6406536646587.
False

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 2.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
In the DISJOINT CLUSTER VERTEX DELETION problem, if the subgraph induced on S is not a cluster graph, we can immediately return YES.
6406536646588.
True
6406536646589.
False

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 2.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
In the DISJOINT CLUSTER VERTEX DELETION problem, if the subgraph induced on the vertices of S is not a cluster graph, we can immediately return NO.
6406536646590.
True
6406536646591.
False

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 2.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
If the subgraph induced on the vertices of S is a cluster graph and a vertex in V (G) \ S is adjacent to at least two vertices in S which are in different cliques, then we can delete it and leave the parameter unchanged.
6406536646592.
True
6406536646593.
False

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 2.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
If the subgraph induced on the vertices of S is a cluster graph and a vertex in V (G) \ S is adjacent to at least two vertices in S which are in different cliques, then we can delete it and decrease the parameter by 1.
6406536646594.
True
6406536646595.
False

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MCQ · 2.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
If the subgraph induced on the vertices of S is a cluster graph and a vertex in V (G) \ S is adjacent to some but not all vertices in a clique of G[S], then we can delete it and leave the parameter unchanged.
6406536646596.
True
6406536646597.
False

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MCQ · 2.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
If the subgraph induced on the vertices of S is a cluster graph and a vertex in V (G) \ S is adjacent to some but not all vertices in a clique of G[S], then we can delete it and decrease the parameter by 1.
6406536646598.
True
6406536646599.
False

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MSQ · 2.0 marks

Consider a graph
Source diagram or notation
and let
Source diagram or notation
denote its chromatic number. Let
Source diagram or notation
. Select all true statements:
6406536646600.
If
Source diagram or notation
is an **independent set**, then
Source diagram or notation
6406536646601.
There exists an optimal coloring of
Source diagram or notation
such that **every color class is a** **maximal independent set**.
6406536646602.
If
Source diagram or notation
is a **maximum independent set**, then
Source diagram or notation
6406536646603.
A DP over subsets that tries all independent sets leads to an algorithm running in
Source diagram or notation
time.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MSQ · 2.0 marks

Let
Source diagram or notation
be a maximal independent set in graph
Source diagram or notation
. Select all true statements:
6406536646604.
For every vertex
Source diagram or notation
, **all neighbours** of
Source diagram or notation
must be in
Source diagram or notation
6406536646605.
In branching algorithms, we can branch on a vertex
Source diagram or notation
by either: • include
Source diagram or notation
, or • exclude
Source diagram or notation
and include all neighbours of
Source diagram or notation
6406536646606.
If a vertex has degree 0, it must be included in every maximum independent set
6406536646607.
If
Source diagram or notation
, then removing
Source diagram or notation
does not reduce the size of maximum independent set

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MCQ · 2.0 marks

Source diagram or notation
In the above figure, we have a graph G and a **Feedback Vertex Set (FVS)** of size 3, which is given by the boxed vertices: S := {a, c, e} We need to find a **DISJOINT FVS** of size 2. For each of the given statements, determine whether it is **True** or **False**. Based on the above data, answer the given subquestions.
According to the reduction rules for **DFVS**, the following figure shows a valid intermediate instance in the reduction with
Source diagram or notation
.
Source diagram or notation
6406536646608.
True
6406536646609.
False

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 2.0 marks

Source diagram or notation
In the above figure, we have a graph G and a **Feedback Vertex Set (FVS)** of size 3, which is given by the boxed vertices: S := {a, c, e} We need to find a **DISJOINT FVS** of size 2. For each of the given statements, determine whether it is **True** or **False**. Based on the above data, answer the given subquestions.
According to the reduction rules for **DFVS**, the following figure shows a valid intermediate instance in the reduction with
Source diagram or notation
.
Source diagram or notation
6406536646610.
True
6406536646611.
False

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MCQ · 2.0 marks

Source diagram or notation
In the above figure, we have a graph G and a **Feedback Vertex Set (FVS)** of size 3, which is given by the boxed vertices: S := {a, c, e} We need to find a **DISJOINT FVS** of size 2. For each of the given statements, determine whether it is **True** or **False**. Based on the above data, answer the given subquestions.
According to the reduction rules for **DFVS**, the following figure shows a valid intermediate instance in the reduction with
Source diagram or notation
.
Source diagram or notation
6406536646612.
True
6406536646613.
False

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MCQ · 2.0 marks

Source diagram or notation
In the above figure, we have a graph G and a **Feedback Vertex Set (FVS)** of size 3, which is given by the boxed vertices: S := {a, c, e} We need to find a **DISJOINT FVS** of size 2. For each of the given statements, determine whether it is **True** or **False**. Based on the above data, answer the given subquestions.
According to the reduction rules for **DFVS**, the following figure shows a valid intermediate instance in the reduction with
Source diagram or notation
.
Source diagram or notation
6406536646614.
True
6406536646615.
False

A published solution is not available for this question yet.

Report a correction for Q22