0% found this document useful (0 votes)
27 views2 pages

Exam 3 1

Uploaded by

jagadishyedla76
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

Exam 3 1

Uploaded by

jagadishyedla76
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CS6013: Advanced Data Structures and Algorithms

Exam III (out of 20 marks)


(Date: 28 Nov 2022. Timing: 5:30 pm to 7:30 pm)

Instructions
ˆ No need to prove the correctness of your algorithm, unless the question explicitly asks you to
prove it.

ˆ Most questions have a page limit mentioned in square brackets against them. You are expected
to complete your answers within the allowed number of pages. Your answers should be neat and
clean.

Problem Set
1. We run the matching-based 2-approximation  algorithm for computing a minimum vertex cover
of the complete graph Kn (it has all the n2 edges) on n > 100 vertices. Which of the following
statements is necessarily true?

(a) The algorithm produces a vertex cover of size exactly twice the optimal.
(b) The algorithm produces an optimal vertex cover.
(c) The algorithm produces a non-optimal vertex cover.
(d) The algorithm produces a vertex cover with at most one more vertex than in an optimal
cover.

2 marks [1 line answer]

2. Consider Karger’s min-cut algorithm being run on a graph G with 22 vertices and 31 edges that
has a single minimum cut. Which of the following is the tightest lower bound on the probability
that the minimum cut is still present after 5 steps?
67
(a) 100
136
(b) 231
53
(c) 100
167
(d) 231

2 marks [1 line answer]

3. A college has N students X1 , X2 , . . . , XN , M departments D1 , D2 , . . . , DM , and P societies


S1 , S2 , . . . , SP . Each student is enrolled in exactly one department, and is a member of exactly
one society. You can assume that every department has at least one student enrolled in it and
every society has at least one student who is its member. The college has a student association
(like your gymkhana) with exactly one member from each society. However, the society members
have to be chosen in such a way that the student association has at most Qk members from any
department Dk . Design an algorithm to answer (yes or no) whether such a student association
can be formed or not given the society memberships and the departments of the students. You
must model the problem as a maximum flow problem. 8 marks [1 page].

1
4. You are given a stream of songs lasting for t1 , t2 , t3 , . . . , tn seconds. You have two write-once
devices D1 and D2 , each capable of storing songs of total duration T seconds. When the i-th
song starts, you have three options: (i) copy the song to D1 , (ii) copy the song to D2 , or (iii)
discard the song. The copy of a song to a device is allowed only when there is enough memory
left in that device. Assume that the individual song durations ti are known to you beforehand,
Pn
and these durations satisfy ti ≤ T for all i, and ti ≤ 2T . Your goal is to maximize the
i=1
total copy time in the two output devices together. To that effect, you run the following greedy
algorithm. Derive a tight approximation ratio of the algorithm. Prove that the approximation
ratio is tight.
for i = 1, 2, 3, . . . , n (in that order)
{
If D1 can accommodate the i-th song, copy the i-th song to D1 ,
else if D2 can accommodate the i-th song, copy the i-th song to D2 ,
else discard the i-th song, and continue.
}
5+3=8 marks [1 page].

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy