uiz Space

May 2025 term · Advanced Algorithms · BSCS4021

Advanced Algorithms Quiz 1: 13 July 2025 (May 2025 term)

The IIT Madras BS Advanced Algorithms (Advanced Algorithms) Quiz 1 paper sat on 13 Jul 2025, in the May 2025 term: 26 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
26
Marks
50
Duration
120 min
MCQ
25
MSQ
1

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 13 July 2025 · No negative marking.

Question 1

+2 marksOne correct option

Based on the above data, answer the given subquestions.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • A

    True

Question 2

+2 marksOne correct option

Based on the above data, answer the given subquestions.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • A

    True

Question 3

+3 marksOne correct option

Based on the above data, answer the given subquestions.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • A

    True

Question 4

+2 marksOne correct option

Consider the given problem, called BoxDepth: Given a set of n axis-aligned rectangles in the plane, how big is the largest subset of these rectangles that contain a common point?
For each statement given in the subquestions, determine if it is true or false.

There is a polynomial-time reduction from BoxDepth to MaxClique.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • A

    True

Question 5

+2 marksOne correct option

Consider the given problem, called BoxDepth: Given a set of n axis-aligned rectangles in the plane, how big is the largest subset of these rectangles that contain a common point?
For each statement given in the subquestions, determine if it is true or false.

There is a polynomial-time algorithm for BoxDepth.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • A

    True

Question 6

+2 marksOne correct option

Consider the given problem, called BoxDepth: Given a set of n axis-aligned rectangles in the plane, how big is the largest subset of these rectangles that contain a common point?
For each statement given in the subquestions, determine if it is true or false.

Only one of the statements in the previous question can be true assuming P ≠ NP.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • B

    False

Question 7

+2 marksOne correct option

Suppose your friend comes up with an algorithm to solve Partition in time O(nM), where n is the size of the input set and M is the sum of the absolute values of its elements. Which of the following statements is correct?

  1. A

    Such an algorithm cannot be possibly correct, since it runs in polynomial time and Partition is NP-hard.

  2. B

    Even if such an algorithm exists, then it does not imply that P=NP.

Show answer

Correct answer

  • B

    Even if such an algorithm exists, then it does not imply that P=NP.

Question 8

+2 marksOne correct option

The problem AllOrNothing3Sat asks, given a 3CNF boolean formula, whether there is an assignment to the variables such that each clause either has three True literals or has three False literals.
Consider the following statements:
(1) There is a polynomial-time algorithm to solve AllOrNothing3Sat.
(2) There is a polynomial-time reduction from 3SAT to AllOrNothing3Sat.
Assuming P ≠ NP, which of the following is true?

  1. A

    Both statements are true.

  2. B

    Statement (1) is true and statement (2) is false.

  3. C

    Statement (1) is false and statement (2) is true.

  4. D

    Both statements are false.

Show answer

Correct answer

  • B

    Statement (1) is true and statement (2) is false.

Question 9

+4 marksOne or more correct options

Which of the following statements is true about a flow network?

Select all that apply.

  1. A

    Increasing the capacity of one edge (u,v) by 1 can result in an increase of at most 1 in the max flow.

  2. B

    Increasing the capacity of one edge (u,v) by 1 will result in an increase of at least 1 in the max flow.

  3. C

    Decreasing the capacity of one edge (u,v) by 1 can result in a decrease of at most 1 in the max flow.

  4. D

    Decreasing the capacity of one edge (u,v) by 1 will result in a decrease of at least 1 in the max flow.

Show answer

Correct answers

  • A

    Increasing the capacity of one edge (u,v) by 1 can result in an increase of at most 1 in the max flow.

  • C

    Decreasing the capacity of one edge (u,v) by 1 can result in a decrease of at most 1 in the max flow.

Question 10

+4 marksOne correct option

Given a flow network (G, s, t, c) and a flow f, how will you determine if f is maximum flow?

  1. A

    If there is any edge that is not saturated to full capacity, then we can conclude that f is not a maximum flow.

  2. B

    If the residual graph does not have any augmenting paths then f is a maximum flow.

  3. C

    If the value of the flow f is not the sum of the capacities of the edges coming out of the source s then f is not a maximum flow.

  4. D

    If the value of the flow f is not the sum of the capacities of the edges coming into the sink t then f is not a maximum flow.

Show answer

Correct answer

  • B

    If the residual graph does not have any augmenting paths then f is a maximum flow.

Question 11

+2 marksOne correct option

In this question, we consider a card game called SWISH.
In the commercial version of SWISH, there are 60 transparent cards. Those cards are made up of three columns and four rows, they are obtained by placing a point in each ofthe four possible positions (accounting for symmetries), and then a circle in each of the other possible positions. Some example cards are shown below.

Based on the above data, answer the given subquestions.

SWISH-SPECIAL is in P.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • A

    True

Question 12

+2 marksOne correct option

In this question, we consider a card game called SWISH.
In the commercial version of SWISH, there are 60 transparent cards. Those cards are made up of three columns and four rows, they are obtained by placing a point in each ofthe four possible positions (accounting for symmetries), and then a circle in each of the other possible positions. Some example cards are shown below.

Based on the above data, answer the given subquestions.

SWISH-SPECIAL is in NP.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • B

    False

Question 13

+2 marksOne correct option

In this question, we consider a card game called SWISH.
In the commercial version of SWISH, there are 60 transparent cards. Those cards are made up of three columns and four rows, they are obtained by placing a point in each ofthe four possible positions (accounting for symmetries), and then a circle in each of the other possible positions. Some example cards are shown below.

Based on the above data, answer the given subquestions.

SWISH-SPECIAL is NP-hard.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • B

    False

Question 14

+2 marksOne correct option

In this question, we consider a card game called SWISH.
In the commercial version of SWISH, there are 60 transparent cards. Those cards are made up of three columns and four rows, they are obtained by placing a point in each ofthe four possible positions (accounting for symmetries), and then a circle in each of the other possible positions. Some example cards are shown below.

Based on the above data, answer the given subquestions.

SWISH-SPECIAL is NP-complete.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • B

    False

Question 15

+1 markOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • B

    No

Question 16

+1 markOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

  1. A

    None

  2. B

    One

  3. C

    Three

  4. D

    All

Show answer

Correct answer

  • D

    All

Question 17

+1 markOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

Suppose n=2,N=100n = 2, N = 100 and the randomly assigned weights are:

w(1)=25,w(2)=25w(1) = 25, w(2) = 25

Consider all non-empty families F\mathcal{F} over non-empty subsets of {1,2}\{1, 2\}. There are seven such families. How many of them do not have a unique minimum-weight subset?

  1. A

    None

  2. B

    One

  3. C

    Three

  4. D

    All

Show answer

Correct answer

  • B

    One

Question 18

+1 markOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

  1. A

    0

  2. B

    1/5

  3. C

    4/5

  4. D

    1

Show answer

Correct answer

  • C

    4/5

Question 19

+1 markOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

  1. A

    0

  2. B

    1/3

  3. C

    2/3

  4. D

    1

Show answer

Correct answer

  • D

    1

Question 20

+1 markOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

  1. A

    25

  2. B

    60

  3. C

    90

  4. D

    120

Show answer

Correct answer

  • C

    90

Question 21

+1 markOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

  1. A

    25

  2. B

    50

  3. C

    90

  4. D

    100

Show answer

Correct answer

  • D

    100

Question 22

+2 marksOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

We introduce some notation:

  • Let Pi⊆F\mathcal{P}_i \subseteq \mathcal{F} denote all those sets in F\mathcal{F} that contain ii, and
  • let Qi⊆F\mathcal{Q}_i \subseteq \mathcal{F} denote all those sets in F\mathcal{F} that do not contain ii.

Notice that Qi=F∖Pi\mathcal{Q}_i = \mathcal{F} \setminus \mathcal{P}_i. For example, if F={{1},{1,2},{2,3}}\mathcal{F} = \{\{1\}, \{1, 2\}, \{2, 3\}\}, then:

  • P1={{1},{1,2}}\mathcal{P}_1 = \{\{1\}, \{1, 2\}\} and Q1={{2,3}}\mathcal{Q}_1 = \{\{2, 3\}\}, and
  • P2={{1,2},{2,3}}\mathcal{P}_2 = \{\{1, 2\}, \{2, 3\}\} and Q2={{1}}\mathcal{Q}_2 = \{\{1\}\}, and
  • P3={{2,3}}\mathcal{P}_3 = \{\{2, 3\}\} and Q3={{1},{1,2}}\mathcal{Q}_3 = \{\{1\}, \{1, 2\}\}.

Let Ei\mathcal{E}_i be the event:

min⁡{w(S):Pi}=min⁡{w(S):S∈Qi}.\min\{w(S) : \mathcal{P}_i\} = \min\{w(S) : S \in \mathcal{Q}_i\}.

We can conclude that the good event occurs if:

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 23

+2 marksOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

Further, if the good event occurs, then:

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 24

+2 marksOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answer

  • E

Question 25

+2 marksOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

Consider the problem of finding perfect matchings in a simple, undirected graph. Recall that the Tutte matrix of a graph GG, denoted ZGZ_G, is given by:

ZG[i,j]={zijif (i,j) is an edge and i<j−zjiif (i,j) is an edge and j>i0if (i,j) is not an edgeZ_G[i, j] = \begin{cases} z_{ij} & \text{if } (i, j) \text{ is an edge and } i < j \\ -z_{ji} & \text{if } (i, j) \text{ is an edge and } j > i \\ 0 & \text{if } (i, j) \text{ is not an edge} \end{cases}

Suppose each edge is assigned a random weight in {1,…,2m}\{1, \ldots, 2m\}, and F\mathcal{F} is the set of perfect matchings. Further, let us replace each indeterminate zijz_{ij} in the Tutte matrix of the graph is replaced with 2wij2^{w_{ij}} where wijw_{ij} is the randomly assinged weights of the edge (i,j)(i, j) from above.

If GG has no perfect matching, what is the determinant of ZZ with the variables substituted for these weights?

  1. A

    —

  2. B
  3. C

    —

  4. D
Show answer

Correct answer

  • A

    —

Question 26

+2 marksOne correct option

Let nn and NN be positive integers, and let F\mathcal{F} be an arbitrary nonempty family of subsets of the universe {1,…,n}\{1, \ldots, n\}. Suppose each element x∈{1,…,n}x \in \{1, \ldots, n\} in the universe receives an integer weight w(x)w(x), each of which is chosen independently and uniformly at random from {1,…,N}\{1, \ldots, N\}. The weight of a set SS in F\mathcal{F} is defined as

w(S)=∑x∈Sw(x)w(S) = \sum_{x \in S} w(x)

We want to explore the probability of the following "good" event: there is a unique set in F\mathcal{F} that has the minimum weight among all sets of F\mathcal{F}.

Based on the above data, answer the given subquestions.

We continue the notation from the previous question. Suppose the randomly assigned weights lead to the good event, that is, there is an unique perfect matching in G with minimum weight, and say this minimum weight is r. What can you say about the determinant of Z in this case?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C