chapter 2chapter 2 greedy algorithms and local search introduction •a greedy algorithm builds a...

73
CHAPTER 2 Greedy algorithms and Local search

Upload: others

Post on 26-Sep-2020

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

CHAPTER 2 Greedy algorithms and Local search

Page 2: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Introduction

• A greedy algorithm builds a solution step by step: Each time

going for the option that gives the most profit or smallest cost at

that step. It stops when a feasible solution is found.

• A local search algorithm starts with a feasible solution and

changes the solution step by step: Each time selecting an

improved solution in the neighborhood of the current solution.

It stops when no local improvement is possible.

Page 3: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Instance: Set V of n points in a metric space. Integer k.

Solution: S ⊆ V with |S|=k

Cost: maxj∈ V dist(j,S) ( dist(j,S):= mins∈S dist(j,s) )

Goal: Find a solution of minimum cost.

k=3

Page 4: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Instance: Set V of n points in a metric space. Integer k.

Solution: S ⊆ V with |S|=k

Cost: maxj∈ V dist(j,S) ( dist(j,S):= mins∈S dist(j,s) )

Goal: Find a solution of minimum cost.

k=3

Page 5: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Instance: Set V of n points in a metric space. Integer k.

Solution: S ⊆ V with |S|=k

Cost: maxj∈ V dist(j,S) ( dist(j,S):= mins∈S dist(j,s) )

Goal: Find a solution of minimum cost.

k=3

j dist(j,S)

Page 6: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Instance: Set V of n points in a metric space. Integer k.

Solution: S ⊆ V with |S|=k

Cost: maxj∈ V dist(j,S) ( dist(j,S):= mins∈S dist(j,s) )

Goal: Find a solution of minimum cost.

k=3

Connect each to its nearest center

Page 7: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Greedy: Pick the first center arbitrarily. Next, always choose the point

that is furthest away from the set of centers already chosen.

k=3

Page 8: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Greedy: Pick the first center arbitrarily. Next, always choose the point

that is furthest away from the set of centers already chosen.

k=3

Page 9: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Greedy: Pick the first center arbitrarily. Next, always choose the point

that is furthest away from the set of centers already chosen.

k=3

Page 10: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Theorem: Greedy is a 2-approximation algorithm.

Proof: Let S*, r* be, respectively, optimal solution and its value.

All points are within distance r* from S*

Page 11: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Proof (cont.):

Take any v∈ V. There must be an s*∈ S* with dist(v,s*) ≤ r*.

If there is an s∈ S with dist(s,s*) ≤ r*. Then OK by triangle inequality.

What if no such s?

v

≤ r*

≤ r* s

s*

Page 12: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Proof (cont.):

Another Greedy solution:

Page 13: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Proof (cont.):

Another Greedy solution:

Page 14: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Proof (cont.):

Another Greedy solution:

Page 15: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Proof (cont.):

Can not use the same argument here.

There must be a center ji with at least 2

centers from S within radius r*.

No Greedy center in here.

v ji

Page 16: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Proof (cont.):

Can not use the same argument here.

There must be a center ji with at least 2

centers from S within radius r*.

No Greedy center in here.

v ji

≤ 2r*

Page 17: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Proof (cont.):

• j was picked after j’.

• j had maximum distance to the chosen centers when it was picked.

• Any point has distance ≤ 2r* to S.

v ji

≤ 2r* j’

j

Page 18: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Theorem Greedy is not better than a 2-approximation.

Proof See example.

OPT

Possible Greedy solution

Page 19: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Theorem There is no α-approximation algorithm for any α < 2, unless P=NP.

Proof By a reduction from the Dominating Set problem. (Next slides)

Page 20: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

1

Dominating Set

Similar to Vertex Cover. 3

4

2

1

5

2

5

Vertex Cover:

Any edge has an endpoint in I

Dominating Set:

Any vertex is in I or has a neighbour in I.

I={1,3,4}

I={3,5}

3

4

Page 21: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Dominating Set

Fact: Dominating Set is NP-complete (Somebody once proved this).

Corollary: There is no α-approximation algorithm for any α < 2, unless P=NP.

Proof: Let G=(V,E) be an instance of DS. Is OPT≤ k? This can be answered if

we would have an α-approximation algorithm ALG for k-center with α < 2.

cij=1 cij=2

OPTDS≤ k

Dominating Set instance (DS) k-center instance (kc)

OPTkc=1 ALG≤ αOPTkc < 2 ALG=1

OPTDS> k OPTkc=2 ALG=2

Page 22: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Traveling Salesman Problem

The current best known results for

the Mona Lisa TSP are:

Tour: 5,757,191

Lower Bound: 5,757,084

Gap: 107 (0.0019%)

$1,000 prize to the first person to

find a tour shorter than 5,757,191.

Source:

http://www.math.uwaterloo.ca/tsp/data/ml/monalisa.html

Page 23: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Traveling Salesman Problem

Page 24: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Traveling Salesman Problem

TSP Metric (Δ-inequality) Non-metric

Symmetric

Asymmetric

3 2

4

1 2

4

2

1 2

1

3

2

2

1 2

1

3

7

No α-approx.

Section 2.4

O(log n) -approx.

Exercise 1.3

No α-approx.

Section 2.4

A special case of Symmetric metric TSP is Euclidean TSP

(Pictures on previous slides)

1.5-approx.

Section 2.4

Page 25: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Traveling Salesman Problem

Theorem For TSP without the triangle inequality assumption, there does

not exist an α-approximation algorithm for any α ≥ 1, provided P≠NP.

Proof (next slide) Follows from a reduction from Hamiltonian Cycle (HC).

We show that, if there exists an α-approximation algorithm ALG with α≥1,

then the HC problem can be solved in polynomial time.

Page 26: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Traveling Salesman Problem

Fact The Hamiltonian Cycle problem is NP-complete

(Somebody once proved this)

Corrolary For TSP without the triangle inequality assumption, there does

not exist an α-approximation algorithm for any α ≥ 1, provided P≠NP.

G=(V,E), |V|=n TSP-instance.

HC? Yes.

cij=1

cij=K (large number)

OPTTSP=n ALG≤ αn

HC? No OPTTSP≥ K+n-1 ALG≥ K+n-1 Take K ≥ αn

ALG ≥ αn+1

Page 27: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Traveling Salesman Problem

Three algorithms for metric symmetric TSP:

• Double tree

• Nearest addition

• Christofides’ algorithm

Page 28: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 29: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 30: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 31: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 32: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 33: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 34: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 35: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 36: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 37: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 38: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Prim’s Minimum Spanning Tree (MST) algorithm:

Start with any point. Keep adding the point that is nearest to the already

chosen points.

Page 39: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Algorithm Double Tree:

1. Find an MST

2. Double the edges

3. Find an Euler tour

4. Cut short

Page 40: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Algorithm Double Tree:

1. Find an MST

2. Double the edges

3. Find an Euler tour

4. Cut short

Page 41: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Algorithm Double Tree:

1. Find an MST

2. Double the edges

3. Find an Euler tour

4. Cut short

Page 42: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Algorithm Double Tree:

1. Find an MST

2. Double the edges

3. Find an Euler tour

4. Cut short

k-center

Euler tour: 1,2,3,4,5,4,3,6,7,6,8,9,8,6,3,2,1

1 2

5

4

3

8

9

7

6

Page 43: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Algorithm Double Tree:

1. Find an MST

2. Double the edges

3. Find an Euler tour

4. Cut short

k-center

TSP tour: 1,2,3,4,5, 4,3,6,7,6,8,9,8,6,3,2,1

1 2

5

4

3

8

9

7

6

Page 44: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Theorem Double Tree is a 2-approximation algorithm

Proof [1] running time. OK

[2] Feasible OK

[3] Ratio:?

Cost of the Eulertour is 2cost(T) < 2OPT. Shortcutting does not increase

the length since triangle inequality holds.

k-center

Lemma

Let T be an MST and OPT the value of the smallest TSP tour.

Then cost(T) < OPT.

Proof Take an optimal TSP tour and remove one edge. This

gives a spanning tree. The cost of this tree is no more than

cost(T).

Page 45: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 46: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 47: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 48: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 49: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 50: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 51: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 52: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 53: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 54: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 55: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 56: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 57: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 58: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 59: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 60: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Nearest addition:

1. Start with a tour on 2 points

2. Keep adding the nearest point.

Page 61: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Theorem Nearest Addition is a 2-approximation algorithm

Proof [1] running time. OK

[2] Feasible OK

[3] Ratio:

The algorithm behaves exactly like Prim’s MST algorithm:

The edges defining the minimum distance, together form an MST.

k-center

i

j

k

Page 62: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

Theorem Nearest Addition is a 2-approximation algorithm

Proof [1] running time. OK

[2] Feasible OK

[3] Ratio:

By triangle inequality: cjk ≤ cji + cik cjk – cik ≤ cji

Cost in this step: cij + cjk – cik ≤ 2cij. Total cost ≤ 2cost(MST) ≤ 2OPT.

k-center

i

j

k

Page 63: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Christofides’ Algorithm

1. Find a minimum spanning tree T

2. Find a minimum matching M for the odd-degree vertices in T

3. Add M to T

4. Find an Euler tour

5. Cut short

Page 64: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Christofides’ Algorithm

1. Find a minimum spanning tree T

2. Find a minimum matching M for the odd-degree vertices in T

3. Add M to T

4. Find an Euler tour

5. Cut short

Page 65: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Christofides’ Algorithm

1. Find a minimum spanning tree T

2. Find a minimum matching M for the odd-degree vertices in T

3. Add M to T

4. Find an Euler tour

5. Cut short

Page 66: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Christofides’ Algorithm

1. Find a minimum spanning tree T

2. Find a minimum matching M for the odd-degree vertices in T

3. Add M to T

4. Find an Euler tour

5. Cut short

Page 67: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Christofides’ Algorithm

1. Find a minimum spanning tree T

2. Find a minimum matching M for the odd-degree vertices in T

3. Add M to T

4. Find an Euler tour

5. Cut short

1 2

5

4

3

8

9

7

6

Euler tour: 1,2,3,4,5,3,6,7,6,8,9,1

Page 68: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Christofides’ Algorithm

1. Find a minimum spanning tree T

2. Find a minimum matching M for the odd-degree vertices in T

3. Add M to T

4. Find an Euler tour

5. Cut short

1 2

5

4

3

8

9

7

6

Short cut: 1,2,3,4,5,3,6,7,6,8,9,1

Page 69: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Theorem

Christofides’ Algorithm is a 1.5-approximation algorithm

Proof

[1] Time? MST and Matching can be found in polynomial time.

[2] Feasible. OK

[3] Cost of TSP is at most the cost of the Euler tour.

Cost of Euler tour is cost(T)+cost(M)

Know: cost(T) < OPT.

Claim: cost(M) ≤ OPT/2.

Page 70: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Theorem

Christofides’ Algorithm is a 1.5-approximation algorithm

Proof

Claim: cost(M) ≤ OPT/2.

OPT

Page 71: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Theorem

Christofides’ Algorithm is a 1.5-approximation algorithm

Proof

Claim: cost(M) ≤ OPT/2.

≤ OPT

Page 72: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or

k-center

Theorem

Christofides’ Algorithm is a 1.5-approximation algorithm

Proof

Claim: cost(M) ≤ OPT/2.

Two matchings.

Both have cost ≥ cost(M)

OPT ≥ 2cost(M)

Page 73: CHAPTER 2CHAPTER 2 Greedy algorithms and Local search Introduction •A greedy algorithm builds a solution step by step: Each time going for the option that gives the most profit or