• Tidak ada hasil yang ditemukan

Approximation Algorithms

N/A
N/A
Protected

Academic year: 2024

Membagikan "Approximation Algorithms"

Copied!
37
0
0

Teks penuh

(1)

Approximation Algorithms

Lecture 3

(2)

Evaluation Policy

3 Assignments, one each at the end of Feb, March, April: 15% each Attendance and surprise quizzes: 15%

Endsem: 40%

(3)

Last Time

Dual Rounding

Weak Duality Theorem Strong Duality Theorem

Complementary Slackness Condition Primal Dual Method

(4)

Today

Dual Fitting for Weighted Set Cover

Randomized Rounding for Weighted Set Cover

Basics of probability and analyzing randomized algorithms

(5)

Today

Dual Fitting for Weighted Set Cover

Randomized Rounding for Weighted Set Cover

Basics of probability and analyzing randomized algorithms

Problem Definition (Recall)

Universe , a family of subsets of

Set has weight for all Output a collection of

(6)

Greedy Algorithm (Part of reading exercise)

for all

while is not a set cover

for all

Theorem: The greedy algorithm is an approximation for weighted set cover,

where is the -th

Harmonic number.

(7)

Greedy Algorithm (Part of reading exercise)

for all

while is not a set cover

for all

Theorem: The greedy algorithm is an approximation for weighted set cover,

where is the -th

Harmonic number.

Next: A different analysis for the above algorithm using the dual LP

(8)

Dual LP

(9)

Let denote the maximum cardinality among the sets in

Theorem: The greedy algorithm gives an -approximation to the weighted set cover.

Guarantee strictly better than whenever

Proof of Theorem

We first construct a dual solution, i.e, set values for for

Assume that element is covered for the first time when set was added to the cover

We set

(10)

Let denote the maximum cardinality among the sets in

Theorem: The greedy algorithm gives an -approximation to the weighted set cover.

Guarantee strictly better than whenever

Proof of Theorem

We first construct a dual solution, i.e, set values for for

Assume that element is covered for the first time when set was added to the cover

We set

(11)
(12)
(13)
(14)

Let denote the maximum cardinality among the sets in

Theorem: The greedy algorithm gives an -approximation to the weighted set cover.

Guarantee strictly better than whenever

Proof of Theorem

We first construct a dual solution, i.e, set values for for

Assume that element is covered for the first time when set was added to the cover

We set

This is a feasible dual solution!

(15)

Consider set and its dual constraint:

Elements are covered for the first time in different iterations Let denote the overall number of iterations of the greedy algo.

Let be elements that got covered for the first time in -th iteration

Let be the number of elements in that are uncovered at the beginning of -th iteration:

(16)

Consider set and its dual constraint:

Elements are covered for the first time in different iterations Let denote the overall number of iterations of the greedy algo.

Let be elements that got covered for the first time in -th iteration

Let be the number of elements in that are uncovered at the beginning of -th iteration:

(17)

Let be the set added by the greedy algorithm in -th iteration

Then for each

Now, for each by the greedy property

(18)

Let be the set added by the greedy algorithm in -th iteration

Then for each

Now, for each by the greedy property

(19)

We proved that the dual solution is feasible

Can we say anything about the quality of the solution of the greedy algorithm based on this dual solution?

(20)

We proved that the dual solution is feasible

Can we say anything about the quality of the solution of the greedy algorithm based on this dual solution?

(21)
(22)

Randomized Rounding

Based on a random process determined by an optimal solution of the primal LP

(23)

Randomized Rounding Algorithm

Determine an optimal solution to the primal LP

For each :

Consider a coin with Heads probability

Toss the coin times independently of each other If any of the tosses shows up Heads, then

Output as the set cover

(24)

Randomized Rounding Algorithm

Determine an optimal solution to the primal LP

For each :

Consider a coin with Heads probability

Toss the coin times independently of each other If any of the tosses shows up Heads, then

Output as the set cover

(25)

Randomized Rounding Algorithm

Determine an optimal solution to the primal LP

For each :

Consider a coin with Heads probability

Toss the coin times independently of each other If any of the tosses shows up Heads, then

Output as the set cover

Theorem: The algorithm is a -approximation algorithm that produces a set cover with high

probability

(26)

What is the probability that the algorithm outputs a set cover?

What is the probability that a specific element is not covered?

Need a language to answer these questions concretely!

(27)

Brief Intro to Probability

The probability space associated with a random process is defined by:

Sample space = Set of outcomes of the random process Set of allowable events; each event is a subset of

A probability function satisfying:

For any event , we have

For any countable sequence of events we have

Two events and are independent iff

(28)

What is the probability that the algorithm outputs a set cover?

What is the probability that a specific element is not covered?

(29)
(30)

What is the probability that there exists some element that is not covered?

Union Bound: For a countable sequence of events

(31)

What is the probability that there exists some element that is not covered?

Union Bound: For a countable sequence of events

(32)

What is the weight of the set system output?

Need the concept of random variables, which are functions Expected value of , denoted

Linearity of expectations:

For a constant and a random variable , we have

What is the expected weight of the set system output?

(33)

if is included in the output and otherwise, for Weight of set system output

Expected weight =

is included in output + is not included in output]

(34)

if is included in the output and otherwise, for Weight of set system output

Expected weight =

is included in output + is not included in output]

(35)

We want the expected weight, conditioned on the event that the set

Conditional Probability: For two events and , we have

Conditional Expectation:

Let be the event that the set system output is a set cover

(36)

We want the expected weight, conditioned on the event that the set

Conditional Probability: For two events and , we have

Conditional Expectation:

Let be the event that the set system output is a set cover

(37)

Referensi

Dokumen terkait