Randomized rounding

This article may be confusing or unclear to readers. Please help us clarify the article. There might be a discussion about this on the talk page. (May 2010) (Learn how and when to remove this template message)

|

In computer science and operations research, randomized rounding[1] is a widely used approach for designing and analyzing approximation algorithms.[2][3]

Many combinatorial optimization problems are computationally intractable to solve exactly (to optimality). For such problems, randomized rounding can be used to design fast (polynomial time) approximation algorithms—that is, algorithms that are guaranteed to return an approximately optimal solution given any input.

The basic idea of randomized rounding is to convert an optimal solution of a relaxation of the problem into an approximately-optimal solution to the original problem. The resulting algorithm is usually analyzed using the probabilistic method.

## Contents

* 1 Overview
* 2 Example: the set cover problem
* 2.1 Computing the fractional solution
* 2.2 Randomized rounding step
* 2.2.1 Lemma (approximation guarantee for rounding scheme)
* 2.2.2 Proof
* 2.3 Derandomization using the method of conditional probabilities
* 2.3.1 Bounding the conditional probability of failure
* 2.3.2 Keeping the conditional probability of failure below 1
* 2.4 Randomized-rounding algorithm for set cover
* 2.4.1 lemma (approximation guarantee for algorithm)
* 2.4.2 proof
* 2.5 Remarks
* 3 Comparison to other applications of the probabilistic method
* 4 See also
* 5 References
* 6 Further reading

## Overview

The basic approach has three steps:

1. Formulate the problem to be solved as an integer linear program (ILP).
2. Compute an optimal fractional solution x to the linear programming relaxation (LP) of the ILP.
3. Round the fractional solution x of the LP to an integer solution x′ of the ILP.

(Although the approach is most commonly applied with linear programs, other kinds of relaxations are sometimes used. For example, see Goemans' and Williamson's semidefinite programming-based Max-Cut approximation algorithm.)

In the first step, the challenge is to choose a suitable integer linear program. Familiarity with linear programming, in particular modelling using linear programs and integer linear programs, is required. For many problems, there is a natural integer linear program that works well, such as in the Set Cover example below. (The integer linear program should have a small integrality gap; indeed randomized rounding is often used to prove bounds on integrality gaps.)

In the second step, the optimal fractional solution can typically be computed in polynomial time using any standard linear programming algorithm.

In the third step, the fractional solution must be converted into an integer solution (and thus a solution to the original problem). This is called rounding the fractional solution. The resulting integer solution should (provably) have cost not much larger than the cost of the fractional solution. This will ensure that the cost of the integer solution is not much larger than the cost of the optimal integer solution.

The main technique used to do the third step (rounding) is to use randomization, and then to use probabilistic arguments to bound the increase in cost due to the rounding (following the probabilistic method from combinatorics). Therein, probabilistic arguments are used to show the existence of discrete structures with desired properties. In this context, one uses such arguments to show the following:

Given any fractional solution x of the LP, with positive probability the randomized rounding process produces an integer solution x′ that approximates x according to some desired criterion.

Finally, to make the third step computationally efficient, one either shows that x′ approximates x with high probability (so that the step can remain randomized) or one derandomizes the rounding step, typically using the method of conditional probabilities. The latter method converts the randomized rounding process into an efficient deterministic process that is guaranteed to reach a good outcome.

## Example: the set cover problem

The following example illustrates how randomized rounding can be used to design an approximation algorithm for the set cover problem. Fix any instance ⟨c,𝒮⟩ of set cover over a universe 𝒰.

### Computing the fractional solution

For step 1, let IP be the standard integer linear program for set cover for this instance.

For step 2, let LP be the linear programming relaxation of IP, and compute an optimal solution x* to LP using any standard linear programming algorithm. This takes time polynomial in the input size. The feasible solutions to LP are the vectors x that assign each set s∈𝒮 a non-negative weight xs, such that, for each element e∈𝒰, x′ covers e—the total weight assigned to the sets containing e is at least 1, that is,

∑s∋exs≥1.

The optimal solution x* is a feasible solution whose cost

∑s∈𝒮c(S)xs*

is as small as possible. Note that any set cover 𝒞 for 𝒮 gives a feasible solution x (where xs=1 for s∈𝒞, xs=0 otherwise). The cost of this 𝒞 equals the cost of x, that is,

∑s∈𝒞c(s)=∑s∈𝒮c(s)xs.

In other words, the linear program LP is a relaxation of the given set-cover problem.

Since x* has minimum cost among feasible solutions to the LP, the cost of x* is a lower bound on the cost of the optimal set cover.

### Randomized rounding step

In step 3, we must convert the minimum-cost fractional set cover x* into a feasible integer solution x′ (corresponding to a true set cover). The rounding step should produce an x′ that, with positive probability, has cost within a small factor of the cost of x*.Then (since the cost of x* is a lower bound on the cost of the optimal set cover), the cost of x′ will be within a small factor of the optimal cost.

As a starting point, consider the most natural rounding scheme:

For each set s∈𝒮 in turn, take x's=1 with probability min⁡(1,xs*), otherwise take x's=0.

With this rounding scheme, the expected cost of the chosen sets is at most ∑sc(s)xs*, the cost of the fractional cover. This is good. Unfortunately the coverage is not good. When the variables xs* are small, the probability that an element e is not covered is about

∏s∋e1−xs*≈∏s∋eexp⁡(−xs*)=exp⁡(−∑s∋exs*)≈exp⁡(−1).

So only a constant fraction of the elements will be covered in expectation.

To make x′ cover every element with high probability, the standard rounding scheme first scales up the rounding probabilities by an appropriate factor λ>1. Here is the standard rounding scheme:

Fix a parameter λ≥1. For each set s∈𝒮 in turn,
take x's=1 with probability min⁡(λxs*,1), otherwise take x's=0.

Scaling the probabilities up by λ increases the expected cost by λ, but makes coverage of all elements likely. The idea is to choose λ as small as possible so that all elements are provably covered with non-zero probability. Here is a detailed analysis.

* * *

#### Lemma (approximation guarantee for rounding scheme)

Fix λ=ln⁡(2|𝒰|). With positive probability, the rounding scheme returns a set cover x′ of cost at most 2ln⁡(2|𝒰|)c⋅x* (and thus of cost O(log⁡|𝒰|) times the cost of the optimal set cover).

(Note: with care the O(log⁡|𝒰|) can be reduced to ln⁡(|𝒰|)+O(log⁡log⁡|𝒰|).)

#### Proof

The output x′ of the random rounding scheme has the desired properties as long as none of the following "bad" events occur:

1. the cost c⋅x′ of x′ exceeds 2λc⋅x*, or
2. for some element e, x′ fails to cover e.

The expectation of each x's is at most λxs*. By linearity of expectation, the expectation of c⋅x′ is at most ∑sc(s)λxs*=λc⋅x*. Thus, by Markov's inequality, the probability of the first bad event above is at most 1/2.

For the remaining bad events (one for each element e), note that, since ∑s∋exs*≥1 for any given element e, the probability that e is not covered is

∏s∋e(1−min⁡(λxs*,1))<∏s∋eexp⁡(−λxs*)=exp⁡(−λ∑s∋exs*)≤exp⁡(−λ)=1/(2|𝒰|).

(This uses the inequality 1+z≤ez, which is strict for z≠0.)

Thus, for each of the |𝒰| elements, the probability that the element is not covered is less than 1/(2𝒰).

By the union bound, the probability that one of the 1+|𝒰| bad events happens is less than 1/2+|𝒰|/(2𝒰)=1. Thus, with positive probability there are no bad events and x′ is a set cover of cost at most 2λc⋅x*. QED

### Derandomization using the method of conditional probabilities

The lemma above shows the existence of a set cover of cost O(log⁡(|𝒰|)c⋅x*). In this context our goal is an efficient approximation algorithm, not just an existence proof, so we are not done.

One approach would be to increase λ a little bit, then show that the probability of success is at least, say, 1/4. With this modification, repeating the random rounding step a few times is enough to ensure a successful outcome with high probability.

That approach weakens the approximation ratio. We next describe a different approach that yields a deterministic algorithm that is guaranteed to match the approximation ratio of the existence proof above. The approach is called the method of conditional probabilities.

The deterministic algorithm emulates the randomized rounding scheme: it considers each set s∈𝒮 in turn, and chooses x's∈{0,1}. But instead of making each choice randomly based on x*, it makes the choice deterministically, so as to keep the conditional probability of failure, given the choices so far, below 1.

#### Bounding the conditional probability of failure

We want to be able to set each variable x's in turn so as to keep the conditional probability of failure below 1. To do this, we need a good bound on the conditional probability of failure. The bound will come by refining the original existence proof. That proof implicitly bounds the probability of failure by the expectation of the random variable

F=c⋅x′2λc⋅x*+|𝒰(m)|,

where

𝒰(m)={e:∏s∋e(1−x's)=1}

is the set of elements left uncovered at the end.

The random variable F may appear a bit mysterious, but it mirrors the probabilistic proof in a systematic way. The first term in F comes from applying Markov's inequality to bound the probability of the first bad event (the cost is too high). It contributes at least 1 to F if the cost of x′ is too high. The second term counts the number of bad events of the second kind (uncovered elements). It contributes at least 1 to F if x′ leaves any element uncovered. Thus, in any outcome where F is less than 1, x′ must cover all the elements and have cost meeting the desired bound from the lemma. In short, if the rounding step fails, then F≥1. This implies (by Markov's inequality) that E[F] is an upper bound on the probability of failure. Note that the argument above is implicit already in the proof of the lemma, which also shows by calculation that E[F]<1.

To apply the method of conditional probabilities, we need to extend the argument to bound the conditional probability of failure as the rounding step proceeds. Usually, this can be done in a systematic way, although it can be technically tedious.

So, what about the conditional probability of failure as the rounding step iterates through the sets? Since F≥1 in any outcome where the rounding step fails, by Markov's inequality, the conditional probability of failure is at most the conditional expectation of F.

Next we calculate the conditional expectation of F, much as we calculated the unconditioned expectation of F in the original proof. Consider the state of the rounding process at the end of some iteration t. Let S(t) denote the sets considered so far (the first t sets in 𝒮). Let x(t) denote the (partially assigned) vector x′ (so xs(t) is determined only if s∈S(t)). For each set s∉S(t), let ps=min⁡(λxs*,1) denote the probability with which x's will be set to 1. Let 𝒰(t) contain the not-yet-covered elements. Then the conditional expectation of F, given the choices made so far, that is, given x(t), is

E[F|x(t)]=∑s∈S(t)c(s)x's+∑s∉S(t)c(s)ps2λc⋅x*+∑e∈𝒰(t)∏s∉S(t),s∋e(1−ps).

Note that E[F|x(t)] is determined only after iteration t.

#### Keeping the conditional probability of failure below 1

To keep the conditional probability of failure below 1, it suffices to keep the conditional expectation of F below 1. To do this, it suffices to keep the conditional expectation of F from increasing. This is what the algorithm will do. It will set x's in each iteration to ensure that

E[F|x(m)]≤E[F|x(m−1)]≤⋯≤E[F|x(1)]≤E[F|x(0)]<1

(where m=|𝒮|).

In the tth iteration, how can the algorithm set x's′ to ensure that E[F|x(t)]≤E[F|S(t−1)]? It turns out that it can simply set x's′ so as to minimize the resulting value of E[F|x(t)].

To see why, focus on the point in time when iteration t starts. At that time, E[F|x(t−1)] is determined, but E[F|x(t)] is not yet determined \
 it can take two possible values depending on how x's′ is set in iteration t. Let E(t−1) denote the value of E[F|x'(t−1)]. Let E0(t) and E1(t), denote the two possible values of E[F|x(t)], depending on whether x's′ is set to 0, or 1, respectively. By the definition of conditional expectation,

E(t−1)=Pr⁡[x's′=0]E0(t)+Pr⁡[x's′=1]E1(t).

Since a weighted average of two quantities is always at least the minimum of those two quantities, it follows that

E(t−1)≥min⁡(E0(t),E1(t)).

Thus, setting x's′ so as to minimize the resulting value of E[F|x(t)] will guarantee that E[F|x(t)]≤E[F|x(t−1)]. This is what the algorithm will do.

In detail, what does this mean? Considered as a function of x's′ (with all other quantities fixed) E[F|x(t)] is a linear function of x's′, and the coefficient of x's′ in that function is

cs′2λc⋅x*−∑e∈s′∩𝒰t−1∏s∉S(t),s∋e(1−ps).

Thus, the algorithm should set x's′ to 0 if this expression is positive, and 1 otherwise. This gives the following algorithm.

### Randomized-rounding algorithm for set cover

input: set system 𝒮, universe 𝒰, cost vector c

output: set cover x′ (a solution to the standard integer linear program for set cover)

1. Compute a min-cost fractional set cover x* (an optimal solution to the LP relaxation).
2. Let λ<-ln⁡(2|𝒰|). Let ps<-min⁡(λxs*,1) for each s∈𝒮.
3. For each s′∈𝒮 do:
1. Let 𝒮<-𝒮−{s′}.  (𝒮 contains the not-yet-decided sets.)
2. If  cs′2λc⋅x*>∑e∈s′∩𝒰∏s∈𝒮,s∋e(1−ps)

then set x's<-0,
else set x's<-1 and 𝒰<-𝒰−s′.
(𝒰 contains the not-yet-covered elements.)
4. Return x′.

#### lemma (approximation guarantee for algorithm)

The algorithm above returns a set cover x′ of cost at most 2ln⁡(2|𝒰|) times the minimum cost of any (fractional) set cover.

#### proof

The algorithm ensures that the conditional expectation of F, E[F|x(t)], does not increase at each iteration. Since this conditional expectation is initially less than 1 (as shown previously), the algorithm ensures that the conditional expectation stays below 1. Since the conditional probability of failure is at most the conditional expectation of F, in this way the algorithm ensures that the conditional probability of failure stays below 1. Thus, at the end, when all choices are determined, the algorithm reaches a successful outcome. That is, the algorithm above returns a set cover x′ of cost at most 2ln⁡(2|𝒰|) times the minimum cost of any (fractional) set cover.

### Remarks

In the example above, the algorithm was guided by the conditional expectation of a random variable F. In some cases, instead of an exact conditional expectation, an upper bound (or sometimes a lower bound) on some conditional expectation is used instead. This is called a pessimistic estimator.

## Comparison to other applications of the probabilistic method

The randomized rounding step differs from most applications of the probabilistic method in two respects:

1. The computational complexity of the rounding step is important. It should be implementable by a fast (e.g. polynomial time) algorithm.
2. The probability distribution underlying the random experiment is a function of the solution x of a relaxation of the problem instance. This fact is crucial to proving the performance guarantee of the approximation algorithm 
 that is, that for any problem instance, the algorithm returns a solution that approximates the optimal solution for that specific instance. In comparison, applications of the probabilistic method in combinatorics typically show the existence of structures whose features depend on other parameters of the input. For example, consider Turán's theorem, which can be stated as "any graph with n vertices of average degree d must have an independent set of size at least n/(d+1). (See this for a probabilistic proof of Turán's theorem.) While there are graphs for which this bound is tight, there are also graphs which have independent sets much larger than n/(d+1). Thus, the size of the independent set shown to exist by Turán's theorem in a graph may, in general, be much smaller than the maximum independent set for that graph.

## See also

* Method of conditional probabilities
* Randomized rounding without solving the linear program.[4][5]

## References

1. ↑ Raghavan, Prabhakar; Tompson, Clark D. (1987), "Randomized rounding: A technique for provably good algorithms and algorithmic proofs", Combinatorica 7 (4): 365–374, doi:10.1007/BF02579324, http://techreports.lib.berkeley.edu/accessPages/CSD-85-242.html .
2. ↑ Randomized algorithms. Cambridge University Press. 1995-08-25. ISBN 978-0-521-47465-8. https://books.google.com/books?id=QKVY4mDivBEC&q=randomized+rounding.
3. ↑ Vazirani, Vijay (2002-12-05). Approximation algorithms. Springer Verlag. ISBN 978-3-540-65367-7. https://books.google.com/books?id=EILqAmzKgYIC&q="randomized+rounding".
4. ↑ Young, Neal E. (2002). "Randomized Rounding without Solving the Linear Program". arXiv:cs/0205036.
5. ↑ Young, Neal. "Oblivious randomized rounding". https://algnotes.info/on/obliv/.

* Raghavan, Prabhakar (1988), "Probabilistic construction of deterministic algorithms: approximating packing integer programs", Journal of Computer and System Sciences 37 (2): 130–143, doi:10.1016/0022-0000(88)90003-7 .

## Further reading

* Althöfer, Ingo (1994), "On sparse approximations to randomized strategies and convex combinations", Linear Algebra and Its Applications 199: 339–355, doi:10.1016/0024-3795(94)90357-3
* Hofmeister, Thomas; Lefmann, Hanno (1996), "Computing sparse approximations deterministically", Linear Algebra and Its Applications 240: 9–19, doi:10.1016/0024-3795(94)00175-8
* Lipton, Richard J.; Young, Neal E. (1994), "Simple strategies for large zero-sum games with applications to complexity theory", STOC '94: Proceedings of the twenty-sixth annual ACM symposium on theory of computing, New York, NY: ACM, pp. 734–740, doi:10.1145/195058.195447, ISBN 978-0-89791-663-9

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Randomized rounding. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Randomized_rounding&oldid=4155478"