Quiz Space

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

Question 1

+2 marksOne correct option
  1. A

    At each iteration, pick the remaining request with the fewest number of conflicts with other remaining requests (breaking ties arbitrarily).

  2. B

    At each iteration, pick the remaining request with the earliest start time.

  3. C

    At each iteration, pick the remaining request with the earliest finish time.

  4. D

    At each iteration, pick the remaining request which requires the least time (i.e., has the smallest value of ti — si) (breaking ties arbitrarily).

Question 2

+2 marksOne correct option
  1. A
  2. B
  3. C
  4. D
  5. E
  6. F

Question 3

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

50 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Advanced Algorithms End Term 1 Sept 2024 Set QDB1 paper

The IIT Madras BS Advanced Algorithms (Advanced Algorithms) End Term paper sat on 1 Sept 2024, in the May 2024 term, set QDB1: 53 questions for 100 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureAdvanced Algorithms End Term 1 Sept 2024 Set QDB1 at a glance
TermMay 2024 term
SubjectAdvanced Algorithms
Course codeBSCS4021
Questions53
Marks100
Duration180 min
MCQ42
Numerical8
MSQ3
Official paperIIT M DEGREE AN EXAM QDB3 01 Sep 2024
Negative markingNo negative marking.
Updated

Other sets that day

Same End Term, other subjects

More Advanced Algorithms