Top Banner
Approximation Algorithm: The Vertex-cover Problem Sudipta Saha Shubha 1205014 Repon Kumar Roy 1205002 Motivational Problem Approximation Algorithm: The Vertex-cover Problem Sudipta Saha Shubha 1205014 Repon Kumar Roy 1205002 Department of Computer Science and Engineering Bangladesh University of Engineering and Technology December 24, 2015
46

2-Approximation Vertex Cover

Feb 19, 2017

Download

Education

Kowshik Roy
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

MotivationalProblem

Approximation Algorithm: The Vertex-coverProblem

Sudipta Saha Shubha 1205014Repon Kumar Roy 1205002

Department of Computer Science and EngineeringBangladesh University of Engineering and Technology

December 24, 2015

Page 2: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

MotivationalProblem

Table of Contents

1 Motivational Problem

Page 3: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

MotivationalProblem

Motivational Problem : Modeling in Graph

Page 4: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

MotivationalProblem

Formal Definition of Vertex Cover Problem

A vertex cover of an undirected graph

G = (V ,E ) is a subset V ′ ∈ V such that

if (u, v) is an edge of G , then either

u ∈ V ′ or v ∈ V ′(or both).

The vertex-cover problem is to find a

vertex cover of minimum size in a given

undirected graph. We call such a vertex

cover an optimal vertex cover.

Page 5: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

MotivationalProblem

Formal Definition of Vertex Cover Problem

A vertex cover of an undirected graph

G = (V ,E ) is a subset V ′ ∈ V such that

if (u, v) is an edge of G , then either

u ∈ V ′ or v ∈ V ′(or both).

The vertex-cover problem is to find a

vertex cover of minimum size in a given

undirected graph. We call such a vertex

cover an optimal vertex cover.

Page 6: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

MotivationalProblem

Formal Definition of Vertex Cover Problem

A vertex cover of an undirected graph

G = (V ,E ) is a subset V ′ ∈ V such that

if (u, v) is an edge of G , then either

u ∈ V ′ or v ∈ V ′(or both).

The vertex-cover problem is to find a

vertex cover of minimum size in a given

undirected graph. We call such a vertex

cover an optimal vertex cover.

Page 7: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

MotivationalProblem

A Solution may be . . .

Page 8: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

Way to Solution . . .

Time Complexity is O(2n × n)Time Complexity is exponential oninputNP-complete problem

Page 9: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

Way to Solution . . .

Time Complexity is O(2n × n)

Time Complexity is exponential oninputNP-complete problem

Page 10: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

Way to Solution . . .

Time Complexity is O(2n × n)Time Complexity is exponential oninput

NP-complete problem

Page 11: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Way to Solution . . .

Time Complexity is O(2n × n)Time Complexity is exponential oninputNP-complete problem

Page 12: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Way to Solution . . .

A language L ⊆ {0, 1}∗ isNP-complete if1. L ∈ NP , and2. L′ ≤p L for every L′ ∈ NP .

Page 13: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Way to Solution . . .

Can be solved using dynamicprogramming in polynomial timewhen input graph is a tree.

Page 14: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Way to Solution . . .

Needs approximation algorithm forgeneral graphWe call an algorithm that returnsnear-optimal solutions anapproximation algorithm

Page 15: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Way to Solution . . .

Needs approximation algorithm forgeneral graph

We call an algorithm that returnsnear-optimal solutions anapproximation algorithm

Page 16: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Way to Solution . . .

Needs approximation algorithm forgeneral graphWe call an algorithm that returnsnear-optimal solutions anapproximation algorithm

Page 17: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Table of Contents

2 The Approximate Algorithm

3 Applications

4 Some Questions

Page 18: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Simulation

Page 19: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Simulation

Page 20: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Simulation

Page 21: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Simulation

Page 22: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Simulation

Page 23: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Time Complexity

O(V + E )

Page 24: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation

We say that an algorithm for a problem has anapproximation ratio of ρ(n) if, for any input ofsize n, the cost X of the solution produced bythe algorithm is within a factor of ρ(n) of thecost X ∗ of an optimal solution:

max( XX ∗ ,

X ∗

X )≤ ρ(n).

Page 25: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation(Is it a Vertex-Cover?)

Page 26: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation

We need to prove that |X | ≤ 2|X ∗|We will first prove that |X ∗| ≥ |Y |

Page 27: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation

We need to prove that |X | ≤ 2|X ∗|

We will first prove that |X ∗| ≥ |Y |

Page 28: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation

We need to prove that |X | ≤ 2|X ∗|We will first prove that |X ∗| ≥ |Y |

Page 29: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation(|X ∗| ≥ |Y |)

Page 30: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation(|X ∗| ≥ |Y |) : AnotherSubset of Arbitrary Edges

Page 31: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation(|X ∗| ≥ |Y |) : AnotherSubset of Arbitrary Edges

Page 32: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation(|X ∗| ≥ |Y |) : AnotherSubset of Arbitrary Edges

Page 33: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation(|X ∗| ≥ |Y |) : AnotherSubset of Arbitrary Edges

Page 34: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation

Now we will prove that, |X | = 2|Y |

Page 35: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation(|X | = 2|Y |)

Page 36: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Proof of 2-Approximation

|X | = 2|Y ||Y | ≤ |X ∗|So,|X | ≤ 2|X ∗|thereby proving 2-Approximation

Page 37: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Table of Contents

2 The Approximate Algorithm

3 Applications

4 Some Questions

Page 38: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Applications

Selecting Optimal Position of Security

Cameras.

Setting of ATM booths Optimally.

For Bipartitle Graph, Maximum

Matiching = Minimum Vertex Cover.

Page 39: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Applications

Selecting Optimal Position of Security

Cameras.

Setting of ATM booths Optimally.

For Bipartitle Graph, Maximum

Matiching = Minimum Vertex Cover.

Page 40: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Applications

Selecting Optimal Position of Security

Cameras.

Setting of ATM booths Optimally.

For Bipartitle Graph, Maximum

Matiching = Minimum Vertex Cover.

Page 41: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Applications

Selecting Optimal Position of Security

Cameras.

Setting of ATM booths Optimally.

For Bipartitle Graph, Maximum

Matiching = Minimum Vertex Cover.

Page 42: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Table of Contents

2 The Approximate Algorithm

3 Applications

4 Some Questions

Page 43: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Some Questions

Is there any graph where this

approximate algorithm always gives

twice the size of optimal solution?

How about repeatedly selecting a

vertex of highest degree, and removing

all of its incident edges?

Page 44: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Some Questions

Is there any graph where this

approximate algorithm always gives

twice the size of optimal solution?

How about repeatedly selecting a

vertex of highest degree, and removing

all of its incident edges?

Page 45: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Some Questions

Is there any graph where this

approximate algorithm always gives

twice the size of optimal solution?

How about repeatedly selecting a

vertex of highest degree, and removing

all of its incident edges?

Page 46: 2-Approximation Vertex Cover

ApproximationAlgorithm:

TheVertex-coverProblem

Sudipta SahaShubha1205014

Repon KumarRoy 1205002

TheApproximateAlgorithm

Applications

SomeQuestions

Thanks and Questions are Welcome