; Randomized Algorithms and Probabilistic Methods
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out
Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

Randomized Algorithms and Probabilistic Methods

VIEWS: 2 PAGES: 2

  • pg 1
									ETH Zurich                                                                                        HS 2007
Institute of Theoretical Computer Science                                                       Handout 10
Prof. Dr. Angelika Steger
Reto Spöhel




           Randomized Algorithms and Probabilistic Methods



Exercise 1
Consider the following algorithm for solving the 2-Sat problem. The input is a satisfiable 2-Sat formula
with variable set {x1 , . . . , xn }.

 (1) Start with the assignment α(xi ) = 0, for 1 ≤ i ≤ n.
 (2) Repeat the following loop until all clauses are satisfied:
        – Choose an arbitrary clause C that is not satisfied.
        – Choose uniformly at random one of the literals in C and switch its value in α.
 (3) Return α.

Show that the expected number of repetitions of the loop in step (2) is at most n2 .


Exercise 2
Somebody has r umbrellas, which he uses either in the morning, when going from home to his office, or
in the evening, when leaving the office and going home. Every time it is raining, he takes an umbrella
with him if one is available.
Supposing that it rains in the morning/evening with probability p independently from the past, determine
the fraction of time in which the person has to go through the rain without an umbrella (because, e.g.,
it rains in the evening and all r umbrellas are at home).
Hint: Most of the states of the resulting Markov chain have the same probability in the stationary distri-
bution. Make an educated guess which states these are to find the stationary distribution without excessive
calculations.


Exercise 3
Let Xt be the sum of t independent throws of a six-sided die. Prove that for k ≥ 6
                                                                     1
                                    lim Pr[Xt is divisible by k] =     .
                                    t→∞                              k




                                                                           (please turn over)
Challenge Exercise
The challenge exercises are significantly harder than the normal exercises. Solving them usually requires
not only mastery of the topics covered in the lecture, but also creative thinking. They will not be discussed
in the exercise sessions, and there will be no written solutions.
The first correct solution to each challenge exercise will be awarded a book prize! Solutions can be handed
in anytime to Reto Spöhel (CAB H36.1, rspoehel@inf.ethz.ch). Of course, you are only allowed to hand
in solutions you came up with yourself !
Urn Solitaire
Before you is an urn containing some green balls and some red ones (at least one of each). In Round 1 of
this game, you draw a ball blindly and note its color. You then continue to draw balls (always randomly)
until you get one of the other color; that one is then returned to the urn.
Round 2 and successive rounds are repetitions of Round 1. You play until the urn is empty; if the last
ball drawn is green, you win.
How many green balls and how many red balls should you start with in the urn to maximize your
probability of winning?




Discussion of the homework on 11/12/2007.

								
To top