uiz Space

May 2024 term · Advanced Algorithms · BSCS4021

Advanced Algorithms End Term: 1 September 2024, Set QDB3 (May 2024 term)

The IIT Madras BS Advanced Algorithms (Advanced Algorithms) End Term paper sat on 1 Sept 2024, in the May 2024 term, set QDB3: 54 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
54
Marks
100
Duration
180 min
MCQ
45
Numerical
8
MSQ
1

Updated

Official paper: IIT M DEGREE AN EXAM QDB3 01 Sep 2024 · No negative marking.

Question 1

+1 markOne correct option

We are given a non-empty list of N ordered triplets where each triplet holds three integers and represents a cuboid-shaped disk. These integers denote each disk’s width, depth, and height, respectively. Your goal is to stack up the disks and to maximize the total height of the stack. A disk must have a strictly smaller width, depth, and height than any other disk below it.
Our goal is to design an algorithm that returns the total height of the optimal stack, starting with the top disk and ending with the bottom disk. Note that you can’t rotate disks. You can assume that there will only be one stack with the greatest total height. We also use 1-based indexing in the subquestions.
Based on the above data, answer the given subquestions.

Can the disk with dimensions [2,1,2] be placed above [3,2,3]?

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • A

    Yes

Question 2

+1 markOne correct option

We are given a non-empty list of N ordered triplets where each triplet holds three integers and represents a cuboid-shaped disk. These integers denote each disk’s width, depth, and height, respectively. Your goal is to stack up the disks and to maximize the total height of the stack. A disk must have a strictly smaller width, depth, and height than any other disk below it.
Our goal is to design an algorithm that returns the total height of the optimal stack, starting with the top disk and ending with the bottom disk. Note that you can’t rotate disks. You can assume that there will only be one stack with the greatest total height. We also use 1-based indexing in the subquestions.
Based on the above data, answer the given subquestions.

Can the disk with dimensions [2,2,2] be placed above [3,2,3]?

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • B

    No

Question 3

+2 marksNumerical answer

We are given a non-empty list of N ordered triplets where each triplet holds three integers and represents a cuboid-shaped disk. These integers denote each disk’s width, depth, and height, respectively. Your goal is to stack up the disks and to maximize the total height of the stack. A disk must have a strictly smaller width, depth, and height than any other disk below it.
Our goal is to design an algorithm that returns the total height of the optimal stack, starting with the top disk and ending with the bottom disk. Note that you can’t rotate disks. You can assume that there will only be one stack with the greatest total height. We also use 1-based indexing in the subquestions.
Based on the above data, answer the given subquestions.

Suppose the input consists of the following triplets: [[3, 8, 8], [2, 1, 9], [4, 1, 1], [2, 3, 6]]. What’s the answer?

Show answer

Correct answer: 14

Question 4

+2 marksOne correct option

We are given a non-empty list of N ordered triplets where each triplet holds three integers and represents a cuboid-shaped disk. These integers denote each disk’s width, depth, and height, respectively. Your goal is to stack up the disks and to maximize the total height of the stack. A disk must have a strictly smaller width, depth, and height than any other disk below it.
Our goal is to design an algorithm that returns the total height of the optimal stack, starting with the top disk and ending with the bottom disk. Note that you can’t rotate disks. You can assume that there will only be one stack with the greatest total height. We also use 1-based indexing in the subquestions.
Based on the above data, answer the given subquestions.

Our approach will be to building a DP table of the same length as the array of disks. Let did_i denote the ithi^{th} disk in the input array. The value of DP[i]\text{DP}[i] will be the height of the tallest tower that can be created with did_i the bottom. We initialize the value of DP[i]\text{DP}[i] the height of did_i.

Consider the following approach. We process the DP array in increasing order of indices (i.e, i=1i = 1 to i=Ni = N). We look at all disks djd_j where j<ij < i and djd_j can be placed on top of did_i. If djd_j can be placed on top of did_i, then DP[i]\text{DP}[i] is updated to be the maximum of DP[i]\text{DP}[i] and DP[j]+H\text{DP}[j] + H, where HH is the height of the disk did_i.

What can you say about this approach?

  1. A
  2. B
  3. C
Show answer

Correct answer

  • B

Question 5

+2 marksOne correct option

We are given a non-empty list of N ordered triplets where each triplet holds three integers and represents a cuboid-shaped disk. These integers denote each disk’s width, depth, and height, respectively. Your goal is to stack up the disks and to maximize the total height of the stack. A disk must have a strictly smaller width, depth, and height than any other disk below it.
Our goal is to design an algorithm that returns the total height of the optimal stack, starting with the top disk and ending with the bottom disk. Note that you can’t rotate disks. You can assume that there will only be one stack with the greatest total height. We also use 1-based indexing in the subquestions.
Based on the above data, answer the given subquestions.

With the same notation as in the previous question, consider the following alternate approach.We process the DP array in increasing order of indices (i.e, i=1i = 1 to i=Ni = N). We look at all disks djd_j such that djd_j can be placed on top of did_i. If djd_j can be placed on top of did_i, then DP[i]\text{DP}[i] is updated to be the maximum of DP[i]\text{DP}[i] and DP[j]+H\text{DP}[j] + H, where HH is the height of the disk did_i.

Note that the DP array is initialized as before, that is, DP[i]\text{DP}[i] is initialized to the height of did_i. What can you say about this approach?

  1. A
  2. B
  3. C
Show answer

Correct answer

  • C

Question 6

+2 marksOne correct option

We are given a non-empty list of N ordered triplets where each triplet holds three integers and represents a cuboid-shaped disk. These integers denote each disk’s width, depth, and height, respectively. Your goal is to stack up the disks and to maximize the total height of the stack. A disk must have a strictly smaller width, depth, and height than any other disk below it.
Our goal is to design an algorithm that returns the total height of the optimal stack, starting with the top disk and ending with the bottom disk. Note that you can’t rotate disks. You can assume that there will only be one stack with the greatest total height. We also use 1-based indexing in the subquestions.
Based on the above data, answer the given subquestions.

With the same notation as in the previous questions, consider the following alternate approach. We first organize the disks in non-decreasing order of heights, that is, d1d_1 is a disk that has the smallest height, while dNd_N is a disk that has the largest height.

We process the DP array in increasing order of indices (i.e, i=1i = 1 to i=Ni = N). We look at all disks djd_j where j<ij < i such that djd_j can be placed on top of did_i.

If djd_j can be placed on top of did_i, then DP[i]\text{DP}[i] is updated to be the maximum of DP[i]\text{DP}[i] and DP[j]+H\text{DP}[j] + H, where HH is the height of the disk did_i.

What can you say about this approach?

  1. A
  2. B
  3. C
Show answer

Correct answer

  • A

Question 7

+2 marksOne correct option

We are given a non-empty list of N ordered triplets where each triplet holds three integers and represents a cuboid-shaped disk. These integers denote each disk’s width, depth, and height, respectively. Your goal is to stack up the disks and to maximize the total height of the stack. A disk must have a strictly smaller width, depth, and height than any other disk below it.
Our goal is to design an algorithm that returns the total height of the optimal stack, starting with the top disk and ending with the bottom disk. Note that you can’t rotate disks. You can assume that there will only be one stack with the greatest total height. We also use 1-based indexing in the subquestions.
Based on the above data, answer the given subquestions.

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

Correct answer

  • B

Question 8

+1 markOne correct option

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

If we have 1 die with 6 sides, how many ways can we achieve a target sum of 4?

  1. A

    0

  2. B

    1

  3. C

    2

  4. D

    3

Show answer

Correct answer

  • B

    1

Question 9

+1 markOne correct option

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

If we have 3 dice with 17 sides each, how many ways can we achieve a target sum of 7?

  1. A

    10

  2. B

    15

  3. C

    17

  4. D

    18

Show answer

Correct answer

  • B

    15

Question 10

+1 markNumerical answer

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

Suppose the input consists of 3 dice, each with 4 sides, and the target sum is 9. What’s the answer?

Show answer

Correct answer: 10

Question 11

+1 markOne or more correct options

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

In which of the following scenarios will the answer be zero?

Select all that apply.

  1. A

    The target sum is less than the number of dice.

  2. B

    The target sum is greater than SN , the product of the number of dice and the number of sides.

  3. C

    The target sum is not divisible by the number of dice.

  4. D

    The target sum is equal to the number of dice.

Show answer

Correct answers

  • A

    The target sum is less than the number of dice.

  • B

    The target sum is greater than SN , the product of the number of dice and the number of sides.

Question 12

+1 markOne correct option

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

If we have one die with six sides, what are the achievable targets?

  1. A

    0, 1, 2, 3, 4, 5, 6

  2. B

    1, 2, 3, 4, 5, 6

  3. C

    1, 2, 3, 4, 5, 6, 7

  4. D

    0, 1, 2, 3, 4, 5, 6, 7

Show answer

Correct answer

  • B

    1, 2, 3, 4, 5, 6

Question 13

+2 marksOne correct option

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

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

Correct answer

  • C

Question 14

+1 markNumerical answer

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

What is the value of DP[0, 0]?

Show answer

Correct answer: 1

Question 15

+1 markNumerical answer

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0

Question 16

+1 markNumerical answer

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0

Question 17

+1 markNumerical answer

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0

Question 18

+1 markOne correct option

We are given a set of NN dice, each with SS sides, and a target integer TT, which represents a target sum to obtain when rolling all of the dice and summing their values. Your goal is to determine the total number of dice-roll permutations that sum up to exactly that target value.

All three input values will always be positive integers. Each of the dice has an equal probability of landing on any number from 1 to SS.

Identical total dice rolls obtained from different individual dice rolls (for example, [2,3][2, 3] vs. [3,2][3, 2]) count as different dice-roll permutations.

If there's no possible dice-roll combination that sums up to the target given the input dice, the answer is zero.

Based on the above data, answer the given subquestions.

What is the complexity of this algorithm?

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

Correct answer

  • A

Question 19

+2 marksOne correct option

In this question, we use [3][3] to denote {1,2,3}\{1, 2, 3\}.

Let GG be a simple undirected finite graph. A function f:V(G)→[3]f : V(G) \to [3] is called a proper 3-coloring of GG if no two adjacent vertices in GG have the same image under ff. You can imagine ff coloring the vertices of the graph with colors 1, 2, and 3 (all vertices that have image 1 under ff are 'colored' 1, and so on); and such a coloring is proper if and only if there are no edges between vertices that have the same color.

In this question, we will explore ideas involving building up a DP-based solution for this problem for graphs of bounded treewidth using nice tree decompositions.

Let T(T,{Xt}t∈V(T))\mathcal{T}(T, \{X_t\}_{t \in V(T)}) be a rooted nice tree decomposition of GG. For every node t∈V(T)t \in V(T), let TtT_t denote the subtree of TT rooted at tt.

For every node x∈V(T)x \in V(T) and every function χ:Xx→[3]\chi : X_x \to [3], let f(x,χ)f(x, \chi) be defined as follows:

f(x,χ):=TRUEf(x, \chi) := \text{TRUE} if there exists a function σ:⋃β∈V(Tx)Xβ→[3]\sigma : \bigcup_{\beta \in V(T_x)} X_\beta \to [3] such that

  • ∀u∈Xx: (χ(u)=σ(u))\forall u \in X_x : \ \big(\chi(u) = \sigma(u)\big)
  • No two adjacent vertices in G[⋃β∈V(Tx)Xβ]G\left[\bigcup_{\beta \in V(T_x)} X_\beta\right] have the same image under σ\sigma.

Otherwise, f(x,χ):=FALSEf(x, \chi) := \text{FALSE}.

The intuition for these definitions is the following. Fix a node x∈V(T)x \in V(T). Then χ\chi describes a 3-coloring of the vertices in the bag XxX_x, which is not necessarily a proper 3-coloring. The function f(x,χ)f(x, \chi) describes if χ\chi can be extended to a proper 3-coloring of the vertices in the subtree of TT rooted at xx.

Now, let v∈V(G)v \in V(G). Let a,b∈V(T)a, b \in V(T) such that vv is introduced at aa, and bb is the child of aa.

Let θ:Xa→[3]\theta : X_a \to [3] be a function such that

∀y∈Xa∩NG(v):(θ(y)≠θ(v))\forall y \in X_a \cap N_G(v) : \quad \big(\theta(y) \neq \theta(v)\big)

In other words, θ\theta is a three-coloring of XaX_a which ensures that the color of vv is different from the color of any of its neighbors in XaX_a.

Let θ′:Xb→[3]\theta' : X_b \to [3] be defined as follows:

∀y∈Xb:θ′(y):=θ(y)\forall y \in X_b : \quad \theta'(y) := \theta(y)

Note that Xb=Xa∪{v}X_b = X_a \cup \{v\} and thus θ′\theta' is simply the projection of θ\theta on XbX_b.

Let w∈V(G)w \in V(G). Let c,d∈V(T)c, d \in V(T) such that ww is forgotten at cc, and dd is the child of cc.

In other words, Xc=Xd∖{w}X_c = X_d \setminus \{w\}.

Let ψ:Xc→[3]\psi : X_c \to [3] be a function. For every i∈[3]i \in [3], let ψi′:Xd→[3]\psi'_i : X_d \to [3] be defined as follows:

∀y∈Xd∖{w}:ψi′(y):=ψ(y)ψi′(w):=i\begin{aligned} \forall y \in X_d \setminus \{w\} : \quad & \psi'_i(y) := \psi(y) \\ & \psi'_i(w) := i \end{aligned}

To explain this, assume that ψ\psi is a given 3-coloring of the parent node XcX_c. Now we define three colorings that extend ψ\psi in the child node XdX_d. For a fixed color i∈[3]i \in [3], we are coloring every vertex in XdX_d other than ww in the same way that it was colored in XcX_c under ψ\psi, and we are coloring ww with color ii.

Let e,g,h∈V(T)e, g, h \in V(T) such that ee is a join node, and gg and hh are the children of ee, and let λ:Xe→[3]\lambda : X_e \to [3].

Based on the above data, answer the given subquestions.

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • A

    Yes

Question 20

+2 marksOne correct option

In this question, we use [3][3] to denote {1,2,3}\{1, 2, 3\}.

Let GG be a simple undirected finite graph. A function f:V(G)→[3]f : V(G) \to [3] is called a proper 3-coloring of GG if no two adjacent vertices in GG have the same image under ff. You can imagine ff coloring the vertices of the graph with colors 1, 2, and 3 (all vertices that have image 1 under ff are 'colored' 1, and so on); and such a coloring is proper if and only if there are no edges between vertices that have the same color.

In this question, we will explore ideas involving building up a DP-based solution for this problem for graphs of bounded treewidth using nice tree decompositions.

Let T(T,{Xt}t∈V(T))\mathcal{T}(T, \{X_t\}_{t \in V(T)}) be a rooted nice tree decomposition of GG. For every node t∈V(T)t \in V(T), let TtT_t denote the subtree of TT rooted at tt.

For every node x∈V(T)x \in V(T) and every function χ:Xx→[3]\chi : X_x \to [3], let f(x,χ)f(x, \chi) be defined as follows:

f(x,χ):=TRUEf(x, \chi) := \text{TRUE} if there exists a function σ:⋃β∈V(Tx)Xβ→[3]\sigma : \bigcup_{\beta \in V(T_x)} X_\beta \to [3] such that

  • ∀u∈Xx: (χ(u)=σ(u))\forall u \in X_x : \ \big(\chi(u) = \sigma(u)\big)
  • No two adjacent vertices in G[⋃β∈V(Tx)Xβ]G\left[\bigcup_{\beta \in V(T_x)} X_\beta\right] have the same image under σ\sigma.

Otherwise, f(x,χ):=FALSEf(x, \chi) := \text{FALSE}.

The intuition for these definitions is the following. Fix a node x∈V(T)x \in V(T). Then χ\chi describes a 3-coloring of the vertices in the bag XxX_x, which is not necessarily a proper 3-coloring. The function f(x,χ)f(x, \chi) describes if χ\chi can be extended to a proper 3-coloring of the vertices in the subtree of TT rooted at xx.

Now, let v∈V(G)v \in V(G). Let a,b∈V(T)a, b \in V(T) such that vv is introduced at aa, and bb is the child of aa.

Let θ:Xa→[3]\theta : X_a \to [3] be a function such that

∀y∈Xa∩NG(v):(θ(y)≠θ(v))\forall y \in X_a \cap N_G(v) : \quad \big(\theta(y) \neq \theta(v)\big)

In other words, θ\theta is a three-coloring of XaX_a which ensures that the color of vv is different from the color of any of its neighbors in XaX_a.

Let θ′:Xb→[3]\theta' : X_b \to [3] be defined as follows:

∀y∈Xb:θ′(y):=θ(y)\forall y \in X_b : \quad \theta'(y) := \theta(y)

Note that Xb=Xa∪{v}X_b = X_a \cup \{v\} and thus θ′\theta' is simply the projection of θ\theta on XbX_b.

Let w∈V(G)w \in V(G). Let c,d∈V(T)c, d \in V(T) such that ww is forgotten at cc, and dd is the child of cc.

In other words, Xc=Xd∖{w}X_c = X_d \setminus \{w\}.

Let ψ:Xc→[3]\psi : X_c \to [3] be a function. For every i∈[3]i \in [3], let ψi′:Xd→[3]\psi'_i : X_d \to [3] be defined as follows:

∀y∈Xd∖{w}:ψi′(y):=ψ(y)ψi′(w):=i\begin{aligned} \forall y \in X_d \setminus \{w\} : \quad & \psi'_i(y) := \psi(y) \\ & \psi'_i(w) := i \end{aligned}

To explain this, assume that ψ\psi is a given 3-coloring of the parent node XcX_c. Now we define three colorings that extend ψ\psi in the child node XdX_d. For a fixed color i∈[3]i \in [3], we are coloring every vertex in XdX_d other than ww in the same way that it was colored in XcX_c under ψ\psi, and we are coloring ww with color ii.

Let e,g,h∈V(T)e, g, h \in V(T) such that ee is a join node, and gg and hh are the children of ee, and let λ:Xe→[3]\lambda : X_e \to [3].

Based on the above data, answer the given subquestions.

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • A

    Yes

Question 21

+2 marksOne correct option

In this question, we use [3][3] to denote {1,2,3}\{1, 2, 3\}.

Let GG be a simple undirected finite graph. A function f:V(G)→[3]f : V(G) \to [3] is called a proper 3-coloring of GG if no two adjacent vertices in GG have the same image under ff. You can imagine ff coloring the vertices of the graph with colors 1, 2, and 3 (all vertices that have image 1 under ff are 'colored' 1, and so on); and such a coloring is proper if and only if there are no edges between vertices that have the same color.

In this question, we will explore ideas involving building up a DP-based solution for this problem for graphs of bounded treewidth using nice tree decompositions.

Let T(T,{Xt}t∈V(T))\mathcal{T}(T, \{X_t\}_{t \in V(T)}) be a rooted nice tree decomposition of GG. For every node t∈V(T)t \in V(T), let TtT_t denote the subtree of TT rooted at tt.

For every node x∈V(T)x \in V(T) and every function χ:Xx→[3]\chi : X_x \to [3], let f(x,χ)f(x, \chi) be defined as follows:

f(x,χ):=TRUEf(x, \chi) := \text{TRUE} if there exists a function σ:⋃β∈V(Tx)Xβ→[3]\sigma : \bigcup_{\beta \in V(T_x)} X_\beta \to [3] such that

  • ∀u∈Xx: (χ(u)=σ(u))\forall u \in X_x : \ \big(\chi(u) = \sigma(u)\big)
  • No two adjacent vertices in G[⋃β∈V(Tx)Xβ]G\left[\bigcup_{\beta \in V(T_x)} X_\beta\right] have the same image under σ\sigma.

Otherwise, f(x,χ):=FALSEf(x, \chi) := \text{FALSE}.

The intuition for these definitions is the following. Fix a node x∈V(T)x \in V(T). Then χ\chi describes a 3-coloring of the vertices in the bag XxX_x, which is not necessarily a proper 3-coloring. The function f(x,χ)f(x, \chi) describes if χ\chi can be extended to a proper 3-coloring of the vertices in the subtree of TT rooted at xx.

Now, let v∈V(G)v \in V(G). Let a,b∈V(T)a, b \in V(T) such that vv is introduced at aa, and bb is the child of aa.

Let θ:Xa→[3]\theta : X_a \to [3] be a function such that

∀y∈Xa∩NG(v):(θ(y)≠θ(v))\forall y \in X_a \cap N_G(v) : \quad \big(\theta(y) \neq \theta(v)\big)

In other words, θ\theta is a three-coloring of XaX_a which ensures that the color of vv is different from the color of any of its neighbors in XaX_a.

Let θ′:Xb→[3]\theta' : X_b \to [3] be defined as follows:

∀y∈Xb:θ′(y):=θ(y)\forall y \in X_b : \quad \theta'(y) := \theta(y)

Note that Xb=Xa∪{v}X_b = X_a \cup \{v\} and thus θ′\theta' is simply the projection of θ\theta on XbX_b.

Let w∈V(G)w \in V(G). Let c,d∈V(T)c, d \in V(T) such that ww is forgotten at cc, and dd is the child of cc.

In other words, Xc=Xd∖{w}X_c = X_d \setminus \{w\}.

Let ψ:Xc→[3]\psi : X_c \to [3] be a function. For every i∈[3]i \in [3], let ψi′:Xd→[3]\psi'_i : X_d \to [3] be defined as follows:

∀y∈Xd∖{w}:ψi′(y):=ψ(y)ψi′(w):=i\begin{aligned} \forall y \in X_d \setminus \{w\} : \quad & \psi'_i(y) := \psi(y) \\ & \psi'_i(w) := i \end{aligned}

To explain this, assume that ψ\psi is a given 3-coloring of the parent node XcX_c. Now we define three colorings that extend ψ\psi in the child node XdX_d. For a fixed color i∈[3]i \in [3], we are coloring every vertex in XdX_d other than ww in the same way that it was colored in XcX_c under ψ\psi, and we are coloring ww with color ii.

Let e,g,h∈V(T)e, g, h \in V(T) such that ee is a join node, and gg and hh are the children of ee, and let λ:Xe→[3]\lambda : X_e \to [3].

Based on the above data, answer the given subquestions.

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • B

    No

Question 22

+2 marksOne correct option

In this question, we use [3][3] to denote {1,2,3}\{1, 2, 3\}.

Let GG be a simple undirected finite graph. A function f:V(G)→[3]f : V(G) \to [3] is called a proper 3-coloring of GG if no two adjacent vertices in GG have the same image under ff. You can imagine ff coloring the vertices of the graph with colors 1, 2, and 3 (all vertices that have image 1 under ff are 'colored' 1, and so on); and such a coloring is proper if and only if there are no edges between vertices that have the same color.

In this question, we will explore ideas involving building up a DP-based solution for this problem for graphs of bounded treewidth using nice tree decompositions.

Let T(T,{Xt}t∈V(T))\mathcal{T}(T, \{X_t\}_{t \in V(T)}) be a rooted nice tree decomposition of GG. For every node t∈V(T)t \in V(T), let TtT_t denote the subtree of TT rooted at tt.

For every node x∈V(T)x \in V(T) and every function χ:Xx→[3]\chi : X_x \to [3], let f(x,χ)f(x, \chi) be defined as follows:

f(x,χ):=TRUEf(x, \chi) := \text{TRUE} if there exists a function σ:⋃β∈V(Tx)Xβ→[3]\sigma : \bigcup_{\beta \in V(T_x)} X_\beta \to [3] such that

  • ∀u∈Xx: (χ(u)=σ(u))\forall u \in X_x : \ \big(\chi(u) = \sigma(u)\big)
  • No two adjacent vertices in G[⋃β∈V(Tx)Xβ]G\left[\bigcup_{\beta \in V(T_x)} X_\beta\right] have the same image under σ\sigma.

Otherwise, f(x,χ):=FALSEf(x, \chi) := \text{FALSE}.

The intuition for these definitions is the following. Fix a node x∈V(T)x \in V(T). Then χ\chi describes a 3-coloring of the vertices in the bag XxX_x, which is not necessarily a proper 3-coloring. The function f(x,χ)f(x, \chi) describes if χ\chi can be extended to a proper 3-coloring of the vertices in the subtree of TT rooted at xx.

Now, let v∈V(G)v \in V(G). Let a,b∈V(T)a, b \in V(T) such that vv is introduced at aa, and bb is the child of aa.

Let θ:Xa→[3]\theta : X_a \to [3] be a function such that

∀y∈Xa∩NG(v):(θ(y)≠θ(v))\forall y \in X_a \cap N_G(v) : \quad \big(\theta(y) \neq \theta(v)\big)

In other words, θ\theta is a three-coloring of XaX_a which ensures that the color of vv is different from the color of any of its neighbors in XaX_a.

Let θ′:Xb→[3]\theta' : X_b \to [3] be defined as follows:

∀y∈Xb:θ′(y):=θ(y)\forall y \in X_b : \quad \theta'(y) := \theta(y)

Note that Xb=Xa∪{v}X_b = X_a \cup \{v\} and thus θ′\theta' is simply the projection of θ\theta on XbX_b.

Let w∈V(G)w \in V(G). Let c,d∈V(T)c, d \in V(T) such that ww is forgotten at cc, and dd is the child of cc.

In other words, Xc=Xd∖{w}X_c = X_d \setminus \{w\}.

Let ψ:Xc→[3]\psi : X_c \to [3] be a function. For every i∈[3]i \in [3], let ψi′:Xd→[3]\psi'_i : X_d \to [3] be defined as follows:

∀y∈Xd∖{w}:ψi′(y):=ψ(y)ψi′(w):=i\begin{aligned} \forall y \in X_d \setminus \{w\} : \quad & \psi'_i(y) := \psi(y) \\ & \psi'_i(w) := i \end{aligned}

To explain this, assume that ψ\psi is a given 3-coloring of the parent node XcX_c. Now we define three colorings that extend ψ\psi in the child node XdX_d. For a fixed color i∈[3]i \in [3], we are coloring every vertex in XdX_d other than ww in the same way that it was colored in XcX_c under ψ\psi, and we are coloring ww with color ii.

Let e,g,h∈V(T)e, g, h \in V(T) such that ee is a join node, and gg and hh are the children of ee, and let λ:Xe→[3]\lambda : X_e \to [3].

Based on the above data, answer the given subquestions.

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • B

    No

Question 23

+2 marksOne correct option

In this question, we use [3][3] to denote {1,2,3}\{1, 2, 3\}.

Let GG be a simple undirected finite graph. A function f:V(G)→[3]f : V(G) \to [3] is called a proper 3-coloring of GG if no two adjacent vertices in GG have the same image under ff. You can imagine ff coloring the vertices of the graph with colors 1, 2, and 3 (all vertices that have image 1 under ff are 'colored' 1, and so on); and such a coloring is proper if and only if there are no edges between vertices that have the same color.

In this question, we will explore ideas involving building up a DP-based solution for this problem for graphs of bounded treewidth using nice tree decompositions.

Let T(T,{Xt}t∈V(T))\mathcal{T}(T, \{X_t\}_{t \in V(T)}) be a rooted nice tree decomposition of GG. For every node t∈V(T)t \in V(T), let TtT_t denote the subtree of TT rooted at tt.

For every node x∈V(T)x \in V(T) and every function χ:Xx→[3]\chi : X_x \to [3], let f(x,χ)f(x, \chi) be defined as follows:

f(x,χ):=TRUEf(x, \chi) := \text{TRUE} if there exists a function σ:⋃β∈V(Tx)Xβ→[3]\sigma : \bigcup_{\beta \in V(T_x)} X_\beta \to [3] such that

  • ∀u∈Xx: (χ(u)=σ(u))\forall u \in X_x : \ \big(\chi(u) = \sigma(u)\big)
  • No two adjacent vertices in G[⋃β∈V(Tx)Xβ]G\left[\bigcup_{\beta \in V(T_x)} X_\beta\right] have the same image under σ\sigma.

Otherwise, f(x,χ):=FALSEf(x, \chi) := \text{FALSE}.

The intuition for these definitions is the following. Fix a node x∈V(T)x \in V(T). Then χ\chi describes a 3-coloring of the vertices in the bag XxX_x, which is not necessarily a proper 3-coloring. The function f(x,χ)f(x, \chi) describes if χ\chi can be extended to a proper 3-coloring of the vertices in the subtree of TT rooted at xx.

Now, let v∈V(G)v \in V(G). Let a,b∈V(T)a, b \in V(T) such that vv is introduced at aa, and bb is the child of aa.

Let θ:Xa→[3]\theta : X_a \to [3] be a function such that

∀y∈Xa∩NG(v):(θ(y)≠θ(v))\forall y \in X_a \cap N_G(v) : \quad \big(\theta(y) \neq \theta(v)\big)

In other words, θ\theta is a three-coloring of XaX_a which ensures that the color of vv is different from the color of any of its neighbors in XaX_a.

Let θ′:Xb→[3]\theta' : X_b \to [3] be defined as follows:

∀y∈Xb:θ′(y):=θ(y)\forall y \in X_b : \quad \theta'(y) := \theta(y)

Note that Xb=Xa∪{v}X_b = X_a \cup \{v\} and thus θ′\theta' is simply the projection of θ\theta on XbX_b.

Let w∈V(G)w \in V(G). Let c,d∈V(T)c, d \in V(T) such that ww is forgotten at cc, and dd is the child of cc.

In other words, Xc=Xd∖{w}X_c = X_d \setminus \{w\}.

Let ψ:Xc→[3]\psi : X_c \to [3] be a function. For every i∈[3]i \in [3], let ψi′:Xd→[3]\psi'_i : X_d \to [3] be defined as follows:

∀y∈Xd∖{w}:ψi′(y):=ψ(y)ψi′(w):=i\begin{aligned} \forall y \in X_d \setminus \{w\} : \quad & \psi'_i(y) := \psi(y) \\ & \psi'_i(w) := i \end{aligned}

To explain this, assume that ψ\psi is a given 3-coloring of the parent node XcX_c. Now we define three colorings that extend ψ\psi in the child node XdX_d. For a fixed color i∈[3]i \in [3], we are coloring every vertex in XdX_d other than ww in the same way that it was colored in XcX_c under ψ\psi, and we are coloring ww with color ii.

Let e,g,h∈V(T)e, g, h \in V(T) such that ee is a join node, and gg and hh are the children of ee, and let λ:Xe→[3]\lambda : X_e \to [3].

Based on the above data, answer the given subquestions.

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • A

    Yes

Question 24

+2 marksOne correct option

Suppose we are given an ILP which seeks to minimize an objective functions subject to constraints. We solve the LP relaxation and find an optimal solution with the objective evaluating to 54.3. What can you say about the original ILP?
Based on the above data, answer the given subquestions.

If the ILP is feasible, its optimal solution must be greater than or equal to 54.3

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 25

+2 marksOne correct option

Suppose we are given an ILP which seeks to minimize an objective functions subject to constraints. We solve the LP relaxation and find an optimal solution with the objective evaluating to 54.3. What can you say about the original ILP?
Based on the above data, answer the given subquestions.

If the ILP is feasible, its optimal solution must be less than or equal to 54.3.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 26

+2 marksOne correct option

Suppose we are given an ILP which seeks to minimize an objective functions subject to constraints. We solve the LP relaxation and find an optimal solution with the objective evaluating to 54.3. What can you say about the original ILP?
Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 27

+2 marksOne correct option

Suppose we are given an ILP which seeks to minimize an objective functions subject to constraints. We solve the LP relaxation and find an optimal solution with the objective evaluating to 54.3. What can you say about the original ILP?
Based on the above data, answer the given subquestions.

It is possible that the ILP’s optimal solution (if it exists) will also be 54.3.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 28

+2 marksOne correct option

Suppose we are given an ILP which seeks to minimize an objective functions subject to constraints. We solve the LP relaxation and find an optimal solution with the objective evaluating to 54.3. What can you say about the original ILP?
Based on the above data, answer the given subquestions.

The ILP is guaranteed to be feasible.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 29

+2 marksOne correct option

Consider the task of counting how many sequences of length nn exist consisting only of numbers 00, 11, and 22 such that each number occurs at least once. We will solve this by calculating the number of sequences which do not contain at least one of the numbers.

Let's denote by AiA_i (i=0,1,2)(i = 0, 1, 2) the set of sequences in which the digit ii does not occur. The formula of inclusion-exclusion on the number of "bad" sequences is given by:

∣A0∪A1∪A2∣=∣A0∣+∣A1∣+∣A2∣−∣A0∩A1∣−∣A0∩A2∣−∣A1∩A2∣+∣A0∩A1∩A2∣|A_0 \cup A_1 \cup A_2| = |A_0| + |A_1| + |A_2| - |A_0 \cap A_1| - |A_0 \cap A_2| - |A_1 \cap A_2| + |A_0 \cap A_1 \cap A_2|

Based on the above data, answer the given subquestions.

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

Correct answer

  • B

Question 30

+2 marksOne correct option

Consider the task of counting how many sequences of length nn exist consisting only of numbers 00, 11, and 22 such that each number occurs at least once. We will solve this by calculating the number of sequences which do not contain at least one of the numbers.

Let's denote by AiA_i (i=0,1,2)(i = 0, 1, 2) the set of sequences in which the digit ii does not occur. The formula of inclusion-exclusion on the number of "bad" sequences is given by:

∣A0∪A1∪A2∣=∣A0∣+∣A1∣+∣A2∣−∣A0∩A1∣−∣A0∩A2∣−∣A1∩A2∣+∣A0∩A1∩A2∣|A_0 \cup A_1 \cup A_2| = |A_0| + |A_1| + |A_2| - |A_0 \cap A_1| - |A_0 \cap A_2| - |A_1 \cap A_2| + |A_0 \cap A_1 \cap A_2|

Based on the above data, answer the given subquestions.

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

Correct answer

  • C

Question 31

+2 marksOne correct option

Consider the task of counting how many sequences of length nn exist consisting only of numbers 00, 11, and 22 such that each number occurs at least once. We will solve this by calculating the number of sequences which do not contain at least one of the numbers.

Let's denote by AiA_i (i=0,1,2)(i = 0, 1, 2) the set of sequences in which the digit ii does not occur. The formula of inclusion-exclusion on the number of "bad" sequences is given by:

∣A0∪A1∪A2∣=∣A0∣+∣A1∣+∣A2∣−∣A0∩A1∣−∣A0∩A2∣−∣A1∩A2∣+∣A0∩A1∩A2∣|A_0 \cup A_1 \cup A_2| = |A_0| + |A_1| + |A_2| - |A_0 \cap A_1| - |A_0 \cap A_2| - |A_1 \cap A_2| + |A_0 \cap A_1 \cap A_2|

Based on the above data, answer the given subquestions.

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

Correct answer

  • D

Question 32

+2 marksNumerical answer

Consider the task of counting how many sequences of length nn exist consisting only of numbers 00, 11, and 22 such that each number occurs at least once. We will solve this by calculating the number of sequences which do not contain at least one of the numbers.

Let's denote by AiA_i (i=0,1,2)(i = 0, 1, 2) the set of sequences in which the digit ii does not occur. The formula of inclusion-exclusion on the number of "bad" sequences is given by:

∣A0∪A1∪A2∣=∣A0∣+∣A1∣+∣A2∣−∣A0∩A1∣−∣A0∩A2∣−∣A1∩A2∣+∣A0∩A1∩A2∣|A_0 \cup A_1 \cup A_2| = |A_0| + |A_1| + |A_2| - |A_0 \cap A_1| - |A_0 \cap A_2| - |A_1 \cap A_2| + |A_0 \cap A_1 \cap A_2|

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 36

Question 33

+2 marksNumerical answer

Consider the task of counting how many sequences of length nn exist consisting only of numbers 00, 11, and 22 such that each number occurs at least once. We will solve this by calculating the number of sequences which do not contain at least one of the numbers.

Let's denote by AiA_i (i=0,1,2)(i = 0, 1, 2) the set of sequences in which the digit ii does not occur. The formula of inclusion-exclusion on the number of "bad" sequences is given by:

∣A0∪A1∪A2∣=∣A0∣+∣A1∣+∣A2∣−∣A0∩A1∣−∣A0∩A2∣−∣A1∩A2∣+∣A0∩A1∩A2∣|A_0 \cup A_1 \cup A_2| = |A_0| + |A_1| + |A_2| - |A_0 \cap A_1| - |A_0 \cap A_2| - |A_1 \cap A_2| + |A_0 \cap A_1 \cap A_2|

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 150

Question 34

+2 marksOne correct option

Based on the above data, answer the given subquestions.

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

Correct answer

  • B

Question 35

+2 marksOne correct option

Based on the above data, answer the given subquestions.

The final answer is

  1. A
  2. B
  3. C
Show answer

Correct answer

  • A

Question 36

+1 markOne correct option

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 37

+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 38

+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 39

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 40

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 41

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 42

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 43

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 44

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 45

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 46

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 47

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 48

+2 marksOne correct option

A graph is called a cluster graph if and only if it is a disjoint union of cliques. Recall that a clique is a graph where every vertex is adjacent to every other vertex.

The CLUSTER VERTEX DELETION problem is the following: Given an input graph GG and a parameter kk, does there exist a set SS of at most kk vertices of GG such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph.

In the DISJOINT CLUSTER VERTEX DELETION problem we are given an input graph GG, parameter kk and a set SS of vertices of GG of size k+1k+1 such that the subgraph induced on V(G)∖SV(G) \setminus S is a cluster graph. We need to find if there exists subset T⊂V(G)T \subset V(G) of size at most kk which is disjoint from SS such that the subgraph induced on V(G)∖TV(G) \setminus T is a cluster graph.

Determine, for each statement given, if it is true or false.

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 49

+3 marksOne correct option

In this problem you are given as input a graph T=(V,E)T = (V, E) that is a tree (that is, TT is undirected, connected, and acyclic). A perfect matching of TT is a subset F⊂EF \subset E of edges such that every vertex v∈Vv \in V is the endpoint of exactly one edge of FF.

Equivalently, FF matches each vertex of TT with exactly one other vertex of TT. For example, a path graph has a perfect matching if and only if it has an even number of vertices.

Consider the following two algorithms that attempt to decide whether or not a given tree has a perfect matching. The degree of a vertex in a graph is the number of edges incident to it.

Algorithm A:

text
1 While T has at least one vertex:
2 If T has no edges:
3 halt and output ”T has no perfect matching.”
4 Else:
5 Let v be a vertex of T with maximum degree.
6 Choose an arbitrary edge e incident to v.
7 Delete e and its two endpoints from T.
8 (end of while loop]
9 Halt and output ”T has a perfect matching.”

Algorithm B:

text
1 While T has at least one vertex:
2 If T has no edges:
3 halt and output ”T has no perfect matching.”
4 Else:
5 Let v be a vertex of T with minimum non-zero degree.
6 Choose an arbitrary edge e incident to v.
7 Delete e and its two endpoints from T.
8 (end of while loop]
9 Halt and output ”T has a perfect matching.”

Is either algorithm correct?

Hint: Recall that every tree with at least two vertices has at least one degree one vertex.

  1. A

    Neither algorithm always correctly determines whether or not a given tree graph has a perfect matching.

  2. B

    Both algorithms always correctly determine whether or not a given tree graph has a perfect matching.

  3. C

    Algorithm B always correctly determines whether or not a given tree graph has a perfect matching; algorithm A does not.

  4. D

    Algorithm A always correctly determines whether or not a given tree graph has a perfect matching; algorithm B does not.

Show answer

Correct answer

  • C

    Algorithm B always correctly determines whether or not a given tree graph has a perfect matching; algorithm A does not.

Question 50

+3 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 51

+3 marksOne correct option

Recall the max-flow problem: for a directed graph G(V,E)G(V, E) with non-negative capacities cec_e for every e∈Ee \in E and two special vertices ss (source, with no incoming edges) and tt (sink, with no outgoing edges), a flow in GG is an assignment f:E→R≥0f : E \rightarrow \mathbb{R}_{\geq 0} such that fe≤cef_e \leq c_e for every edge and for every vertex v∈V,∑(u,v)∈Ef((u,v))=∑(v,u)∈Ef((v,u))v \in V, \sum_{(u,v) \in E} f((u,v)) = \sum_{(v,u) \in E} f((v,u)). The task is to find a maximum flow ff i.e., a flow ff such that ∑(s,u)∈Ef((s,u))\sum_{(s,u) \in E} f((s,u)) is maximized.

Given an instance (G;s,t,c)(G; s, t, c), we attempt here to design a LP whose optimal value is equal to the maximum flow in the graph GG. There is a variable xuvx_{uv} for all (u,v)∈E(u, v) \in E. Note that for any pair of vertices that is not an edge, we do not introduce any variable corresponding to it.

max⁡∑uxut∀e=(u,v)∈E,xuv⩽ce∀v∉{s,t},∑uxuv=∑wxvw∀e=(u,v)∈E,xuv⩾0\begin{aligned} &\max \sum_u x_{ut} \\ &\forall e = (u,v) \in E, x_{uv} \leqslant c_e \\ &\forall v \notin \{s,t\}, \sum_u x_{uv} = \sum_w x_{vw} \\ &\forall e = (u,v) \in E, x_{uv} \geqslant 0 \end{aligned}

Is the LP above a valid formulation for computing the maximum flow in GG?

  1. A
  2. B
  3. C
Show answer

Correct answer

  • A

Question 52

+3 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 53

+3 marksOne correct option
  1. A

    Yes, this is true

  2. B

    No, the Careful 5-coloring problem is in P.

  3. C

    No, the Careful 5-coloring problem is NP-hard, but this has to be shown by reducing the problem to the standard 5COLOR problem.

Show answer

Correct answer

  • A

    Yes, this is true

Question 54

+2 marksOne correct option

We are given as input a set of n requests (e.g.. for the use of an classroom), with a known start time sis_i; and finish time tit_i for each request i. Assume that all start and finish times are distinct. Two requests conflict if they overlap in time – if one of them starts between the start and finish times of the other. Our goal is to select a maximum-cardinality subset of the given requests that contains no conflicts.

For example, given three requests consuming the intervals (0,3)(0, 3), (2,51)(2, 51), and (4,7)(4, 7), we want to return the first and third requests. We aim to design a greedy algorithm for this problem with the following form: At each iteration we select a new request ii, including it in the solution-so-far and deleting from future consideration all requests that conflict with ii.

Which of the following greedy rules is guaranteed to always compute an optimal solution?

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

Correct answer

  • C