Sunteți pe pagina 1din 1

R

IS

UN

FR 6.2 Informatik

E R SIT

I N F O R M A T I K

SA

Universitat
des
Saarlandes

IV

A VIE N

Dr. Surender Baswana

WS 2004/5

Exercises for Randomized Algorithms


4. Assignment

Due : In the first week following the vacation

Be very rigorous in your arguments. Specify any probability Lemma/Theorem explicitly before you use it.
Exercise 1 (4)
Hiring Problem Professor Dixon needs to hire a new research assistant. She has arranged interviews with n applicants and would like to base her decision solely on their qualifications. Unfortunately, university regulations
require that after each interview she immediately rejects or offers the position to the applicant.
Professor Dixon decides to adopt the strategy of selecting a positive integer k < n, interviewing and then
rejecting first k applicants, and hiring the first applicant thereafter who is better qualified than all preceding
applicants. If the best qualified applicant is among the first k interviewed, she will hire the nth applicant.
a) What is the probability (in terms of k and n) that Dixon will select the best qualified applicant ?
Hint : Suppose best qualified applicant is at ith place. Try to formulate a condition in terms of the i 1
preceding candidates so that Dixon will select the best qualified person. Use conditional probability to
compute the corresponding probability.
b) What value of k would maximize the chances of selecting the best qualified person?
Exercise 2 (4)
In a weighted graph, size of a cut is the sum of weights of the edges of the cut. Consider the min-cut problem
in weighted graphs. Describe how would you modify the Contract algorithm to this case. Give full details of
the algorithm and its analysis.
Hint : Use weighted sampling instead of uniform sampling.
Exercise 3 (1,2)
An independent set in a graph is a set of vertices with no edges connecting them. Consider the following
algorithm for computing an independent set of a graph (with no isolated vertex) :
Let v1 ; v2 ;    ; vn be a permutation of the entire set of vertices. We form a set S as follows : Add vertex vi to
S if none of its neighbor precede it in the given permutation.
a) Show that finally the set S will be an independent set.
b) If we begin with a random permutation of vertices, show that the expected size of the set S is
where dv denotes the degree of vertex v .

P2

1
v V dv

Exercise 4 (4)
Design a linear time algorithm for computing a 3-spanner of size O (n3=2 ) for a given undirected weighted
graph on n vertices. Give all details of the algorithm and its analysis.
Hint : Try to modify the algorithm we discussed in the class. You need to change only those steps in which we
add the edges to spanner. The remaining algorithm remains the same.

S-ar putea să vă placă și