Algorithm Design | Approximation Algorithm | Vertex Cover Problem #algorithm #approximation

EduSyl
14 May 202423:38

Summary

TLDRThis video delves into the Vex Cover problem, a well-known NP-complete problem, and its solution using approximation algorithms. The presenter explains the concept of Vex Cover and its reduction to the Independent Set problem, highlighting the challenges faced when dealing with NP-complete problems. The focus is on finding the minimum number of vertices required to cover all edges in a graph. The script introduces an approximation algorithm called 'approx Vex Cover G', which iteratively selects edges and removes incident vertices until all edges are covered, aiming for a polynomial time solution that approximates the optimal answer. The video also discusses the time complexity and provides examples to illustrate the algorithm's process and its 2-approximation property, ensuring users understand how the algorithm performs in polynomial time but may yield solutions that are twice the size of the optimal.

Takeaways

  • πŸ“š The video discusses the Vertex Cover problem using approximation algorithms, a methodology for NP-complete problems.
  • πŸ” It suggests that for NP-complete problems, there are difficulties in finding polynomial-time solutions, and approximation algorithms offer a way to achieve near-optimal results.
  • 🎯 The goal of the Vertex Cover problem is to find the minimum number of vertices that cover all the edges in a graph, which is a part of NP-complete.
  • πŸ€” The script explains that taking all vertices as a cover is possible but not the minimum solution, which is the focus of the problem.
  • πŸ“˜ The presenter refers to the Cormen book for the algorithm, indicating that the content is based on established literature.
  • πŸ”§ The 'approxVortexCover G' algorithm is introduced, which iteratively selects an arbitrary edge and adds both vertices to the cover set, then removes all edges connected to these vertices.
  • ⏱️ The time complexity of the approximation algorithm is discussed as being proportional to the number of edges, which is polynomial time.
  • πŸ“‰ The script provides examples to illustrate the algorithm's process and how it arrives at an approximate solution, which may not always be optimal.
  • πŸ“ The concept of an 'approximation ratio' is introduced, with the example given having an approximation ratio of 2, meaning the solution is at most twice the size of the optimal solution.
  • πŸ“š A theorem is presented to prove that the approximation algorithm runs in polynomial time and achieves a 2-approximation of the optimal Vertex Cover.
  • πŸ’¬ The presenter encourages viewers to comment if they have doubts, indicating an interactive approach to education.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is discussing the Vertex Cover problem using approximation algorithms.

  • Why are approximation algorithms used for NP-complete problems?

    -Approximation algorithms are used for NP-complete problems because they can provide near-optimal solutions in polynomial time, which is not always achievable with exact solutions.

  • What is the Vertex Cover problem?

    -The Vertex Cover problem is a NP-complete problem where the goal is to find a minimum set of vertices such that each edge in the graph is incident to at least one vertex in the set.

  • What does the term 'approximation' mean in the context of the Vertex Cover problem?

    -In the context of the Vertex Cover problem, 'approximation' refers to the process of finding a solution that is nearly optimal, but not necessarily the absolute minimum, in polynomial time.

  • What is the significance of the term 'epsilon' in the approximation algorithm?

    -The term 'epsilon' in the approximation algorithm represents the degree to which the solution can deviate from the optimal solution. For example, a 2-approximation algorithm provides a solution that is at most twice the size of the optimal solution.

  • What is the time complexity of the approximation algorithm discussed in the video?

    -The time complexity of the approximation algorithm discussed in the video is O(e), where 'e' represents the number of edges in the graph.

  • How does the approximation algorithm select vertices for the Vertex Cover?

    -The approximation algorithm selects vertices for the Vertex Cover by arbitrarily choosing an edge and including both its endpoints in the cover set, then removing all edges incident to these vertices from the graph, and repeating the process until all edges are covered.

  • What is the difference between the optimal Vertex Cover and the approximate Vertex Cover?

    -The optimal Vertex Cover is the smallest possible set of vertices that covers all edges in the graph, while the approximate Vertex Cover is a solution that may be larger but can be found in polynomial time.

  • Why is the minimum number of vertices important in the Vertex Cover problem?

    -The minimum number of vertices is important because it represents the most efficient solution to the problem, using the least amount of resources to cover all edges.

  • How does the video script explain the proof that the approximation algorithm is a 2-approximation?

    -The script explains the proof by showing that for any edge 'a' in the graph, the optimal cover must include at least one of its endpoints, and the approximation algorithm includes both endpoints, thus ensuring that the approximation is at most twice the size of the optimal cover.

Outlines

00:00

πŸ“š Introduction to Approximation Algorithms for Vertex Cover Problem

This paragraph introduces the topic of the video, which is the Vertex Cover problem and its solution using approximation algorithms. The speaker explains that for NP-complete problems like Vertex Cover, where finding an exact solution can be difficult, approximation algorithms can be used to find a near-optimal solution. The video is aimed at those who have already seen previous videos on the topic, and it emphasizes the importance of understanding the basics, such as what a Vertex Cover is and how it relates to the Independent Set problem. The speaker also discusses the challenges of NP-complete problems and the three general approaches to tackling them: reducing problem size, focusing on special cases, or using approximation algorithms to achieve polynomial time complexity.

05:01

πŸ” Understanding the Vertex Cover Problem and Its Approximation

The speaker delves deeper into the Vertex Cover problem, explaining that the goal is to find the minimum number of vertices that, when selected, cover all the edges in the graph. The paragraph clarifies that while it's possible to select all vertices as a cover, the challenge lies in finding the most efficient, minimal cover. The speaker introduces the approximation algorithm 'approxVortexCover G' and explains its basic steps: starting with an empty set of vertices, selecting an arbitrary edge, adding its endpoints to the cover set, and then removing all edges connected to these endpoints from the graph. The process repeats until all edges are covered. The time complexity of this algorithm is discussed, highlighting that it's proportional to the number of edges (O(e)).

10:04

πŸ“˜ Example Walkthrough of the Approximation Algorithm

In this paragraph, the speaker provides a detailed example to illustrate how the approximation algorithm works. Using a graph with seven vertices and eight edges, the algorithm is applied step by step. The speaker explains the process of selecting arbitrary edges, adding their endpoints to the cover set, and then removing the relevant edges from the graph. The example demonstrates the algorithm's progress and how it builds up the vertex cover set, ultimately arriving at an approximate solution. The speaker emphasizes that while this example results in an approximation, the algorithm does not always yield the optimal solution.

15:04

πŸ”‘ Comparing Approximate and Optimal Vertex Covers

The speaker compares the concept of an approximate vertex cover with the optimal vertex cover. The paragraph explains that the optimal vertex cover is the minimal set of vertices that cover all edges, while the approximate cover, generated by the algorithm, may include more vertices. An example is used to show that the approximate cover may not be minimal but still covers all edges. The speaker discusses the importance of understanding the difference between the two and the trade-off between solution quality and computational efficiency. The explanation includes a step-by-step analysis of how the optimal cover might be determined and contrasts it with the approximate cover provided by the algorithm.

20:05

πŸ“š Theoretical Analysis of the Approximation Algorithm

This paragraph focuses on the theoretical analysis of the approximation algorithm for the Vertex Cover problem. The speaker presents a theorem that the approximation algorithm runs in polynomial time and is a 2-approximation algorithm, meaning that the solution it provides is at most twice the size of the optimal solution. The proof involves showing that for any edge, the optimal cover must include at least one of its endpoints, and therefore, the approximation algorithm, which includes both endpoints, will be no more than twice the size of the optimal cover. The speaker emphasizes the importance of understanding the theoretical guarantees provided by approximation algorithms and how they can be used to solve complex problems efficiently.

Mindmap

Keywords

πŸ’‘Vex Cover Problem

The Vex Cover Problem, also known as the Vertex Cover Problem, is a classic optimization problem in computer science and graph theory. It involves finding a set of vertices in a graph such that each edge of the graph is incident to at least one vertex in the set. The main theme of the video is to discuss an approximation algorithm for solving this NP-complete problem. The script mentions that the goal is to minimize the number of vertices selected to cover all edges, which is central to the problem's objective.

πŸ’‘Approximation Algorithm

An approximation algorithm is a type of algorithm used for solving NP-hard problems when finding an exact solution is computationally expensive or impractical. The script discusses using such algorithms for the Vex Cover Problem, as they can provide solutions that are 'nearly optimal' within polynomial time. The video explains that the approximation algorithm used can achieve a two-approximation, meaning the solution is at most twice the size of the optimal solution.

πŸ’‘NP-Complete

NP-Complete is a complexity class in computer science that includes problems which are at least as hard as the hardest problems in NP. The Vertex Cover Problem is mentioned as an NP-Complete problem in the script, indicating that it is a particularly challenging problem to solve optimally. The term is used to explain why approximation algorithms are considered for such problems.

πŸ’‘Independent Set

An independent set in graph theory is a set of vertices no two of which are adjacent. The script mentions that the Vertex Cover Problem can be related to finding an independent set, as they are complementary concepts. The video discusses how the Vex Cover Problem can be reduced to an independent set problem, which is a key concept in understanding the problem's complexity.

πŸ’‘Polynomial Time

Polynomial time refers to a class of algorithms where the running time can be described by a polynomial function of the size of the input. The script mentions the desirability of polynomial time algorithms, as they are considered efficient. The video discusses the approximation algorithm's ability to provide a solution in polynomial time, despite not being the optimal solution.

πŸ’‘Graph Theory

Graph theory is a branch of mathematics concerned with networks of points connected by lines, known as vertices and edges, respectively. The script uses concepts from graph theory to explain the Vertex Cover Problem, which is inherently a graph-based problem. The video discusses selecting vertices and edges, which are fundamental elements in graph theory.

πŸ’‘Optimal Solution

An optimal solution is a solution that is the best possible within the constraints of a problem. In the context of the script, the optimal solution for the Vertex Cover Problem would be the smallest set of vertices that covers all edges. The video discusses the approximation algorithm's goal to find a solution that is close to the optimal, specifically a two-approximation.

πŸ’‘Time Complexity

Time complexity is a measure of how long an algorithm takes in terms of the size of the input. The script refers to time complexity when discussing the efficiency of the approximation algorithm. The video mentions that the time complexity of the algorithm is proportional to the number of edges, which is crucial for understanding its efficiency.

πŸ’‘Arbitrary Edge

An arbitrary edge refers to any edge selected without any specific pattern or rule. The script uses the term 'arbitrary edge' to describe how the approximation algorithm selects edges from the graph. The video explains that the algorithm picks edges without any particular order, which is an important aspect of its approach.

πŸ’‘Vertex Cover Approximation

Vertex Cover Approximation refers to the process of finding a set of vertices that covers all edges in a graph, with the solution being an approximation of the optimal vertex cover. The script discusses an algorithm named 'approxVortexCover G' that performs this task. The video explains that this approximation is a key part of the algorithm's approach to solving the Vertex Cover Problem.

πŸ’‘Theorem

A theorem is a statement that has been proven on the basis of previously established statements, such as other theorems. In the script, a theorem is mentioned to prove that the approximation algorithm for the Vertex Cover Problem is a polynomial time 2-approximation algorithm. The video discusses the importance of proving the correctness and efficiency of the algorithm through the theorem.

Highlights

Introduction to the vertex cover problem and its approximation using an algorithmic approach.

Explanation of the vertex cover problem as part of NP-complete problems and the challenges associated with it.

Discussion on the three expected solutions for NP-complete problems, focusing on approximation algorithms.

Definition of polynomial time and its relevance to the approximation algorithm.

Introduction of the approximation algorithm as a method to achieve polynomial time solutions.

Explanation of the vertex cover problem in terms of minimizing the number of vertices selected.

Clarification that the vertex cover problem aims to find the minimum number of vertices, not all vertices.

Description of the algorithm 'approxVortexCover G' and its parameters.

Discussion on the time complexity of the approximation algorithm, which is proportional to the number of edges.

Explanation of the algorithm's process of selecting an arbitrary edge and updating the vertex set.

Illustration of the algorithm's execution with a simple graph example.

Introduction of the concept of optimal solutions and approximation values in the context of the vertex cover problem.

Explanation of the approximation factor and its significance in the approximation algorithm.

Presentation of a book example with seven vertices and eight edges to demonstrate the algorithm.

Discussion on the optimal vertex cover and how it compares to the approximation algorithm's results.

Proof that the approximation algorithm is a polynomial time 2-approximation algorithm.

Conclusion summarizing the understanding of the approximation algorithm for the vertex cover problem and its practical implications.

Transcripts

play00:00

hello everyone welcome to educ in this

play00:02

video we are going to discuss about Vex

play00:05

cover problem using approximation

play00:08

algorithm methodology okay so those who

play00:11

are new kindly watch the previous videos

play00:13

where we discussed about the deductions

play00:15

that time where we have already

play00:18

completed some of about the vortex cover

play00:20

problem to reducible to Independent set

play00:23

that time we discussed like what is

play00:25

Vortex cover in depth we have uh read

play00:28

that one as well as independent set also

play00:30

we have completed so let us start with

play00:32

that one like Vortex C problem so here

play00:36

uh the vertex C problem we are working

play00:38

with that uh so basically we are going

play00:41

to use the approximation algorithm the

play00:44

approximation algorithm especially is we

play00:47

using like we know when we are working

play00:49

for the NP complete problems uh we found

play00:52

like there are three uh difficulties

play00:55

there are many difficulties we are

play00:56

getting so there are three solutions we

play00:59

can expect as we have already completed

play01:01

in the introductory video that time we

play01:03

found either the space could be small or

play01:06

might be we can take the small example

play01:08

or the small uh categorical problems

play01:11

through which we can at least expect the

play01:13

polinomial time because this happens

play01:16

because of polinomial time though we are

play01:17

not getting the polinomial time that's

play01:20

why we reading this one okay like we are

play01:23

trying to reduce if it is not possible

play01:25

to reduce is there any other way to

play01:27

reduce towards the polinomial because

play01:29

polinomial is a typ time like you can

play01:30

say B go of n to the per K okay K

play01:33

represents the constant this is what the

play01:36

polinomial time so nothing I must not

play01:39

say that one like nothing in the world

play01:41

is poal but I must say something there

play01:44

is a way through which at least we can

play01:47

achieve the polinomial though we are

play01:49

getting it that's why we have different

play01:51

ways one of the ways are one of the ways

play01:55

you can say uh is your approximation

play01:58

algorithm so the approximation algorithm

play02:00

is a way that we have used here

play02:02

basically Vex cover is a part of NP

play02:06

complete so as I told you the first we

play02:09

have a solution like we can take a small

play02:11

one second as we have already discussed

play02:14

is you can say uh if similar or a

play02:18

special case of things we can focus like

play02:21

three sh some problems we can say

play02:24

through which at least we can expect the

play02:26

polom if both two cases which we have

play02:29

already studed if both two cases are not

play02:31

there like there is another way through

play02:33

which at least we can get nearly optimal

play02:36

result the near optimal result is

play02:38

approximation which we have already

play02:40

discussed in the previous videos okay so

play02:42

here in the vortex cover problem this

play02:44

this problem basically we are focusing

play02:46

Vortex cover in the sense like uh

play02:49

minimization of picking the notes like

play02:52

we will pick the minimum noes through

play02:54

which we must say like all the edges

play02:57

connected to the vortex which you have

play02:59

have selected is the vortex cover here

play03:03

Vortex cover that doesn't mean that only

play03:06

minimum you can take all the vertex as

play03:08

the vortex cover not an issue but the

play03:10

problem is if I take all the vertex in

play03:13

the graph that is also part of Vortex

play03:15

cover the minimum one is a part of the

play03:18

Vex cover here exactly what we are doing

play03:20

we are working for the minimum one that

play03:23

is where the problem we are occurring

play03:25

otherwise I must say like the E is the

play03:28

ages V is a vertices of a graph okay if

play03:32

I would like to say like it's it's

play03:34

definitely I must say big of fun to say

play03:38

vertex cover in what sense if I say all

play03:41

the vertices which you have is

play03:43

equivalent to the vertex cover that time

play03:46

I must say because all the vertices are

play03:48

covering means are connecting with the

play03:50

edges in general you can say I'm taking

play03:53

this example of a

play03:56

graph clear this is just a graph or you

play03:59

can say a tree I must still for a graph

play04:02

all vertices should be connected me

play04:04

there is a cycle must be present for a

play04:06

graph okay so if I would like to say the

play04:09

vortex cover I must say if I'm selecting

play04:12

all the vertices it's also part of

play04:14

Vortex cover but this is not exactly our

play04:18

Target is to find the Vex cover is

play04:20

minimum one whenever we are focusing on

play04:22

the minimum like the minimum means the

play04:26

number of vertices which you are

play04:28

selecting should be less

play04:30

clear if I'm selecting

play04:32

a this will be covered this will be

play04:35

covered clear if I'm

play04:38

selecting B this will be covered and

play04:41

this will be covered so what we have to

play04:44

do like out of this like there is a

play04:47

three vertices are there so if I'm

play04:50

picking this one so I must cover this

play04:52

one also so two vertices at least needed

play04:55

to complete or to say a minimum vertex

play04:58

cover clear this is what exactly we are

play05:00

targeting to find out so the Tex cover

play05:04

you can say the total is could be

play05:06

considered whenever you are considering

play05:08

total is this is a maximum Vex cover

play05:10

this is not our Target is the minimum

play05:13

size the minimum one whenever we are

play05:15

discussing that is a part of you that is

play05:18

our Target how to define the minimum

play05:21

number of edges to be considered as a

play05:23

part of vertex cover this is our Target

play05:26

okay minimum vertex cover I must write

play05:28

that one here

play05:31

minimum minimum number

play05:35

of AG uh

play05:38

vertices

play05:46

for vex

play05:50

cover this is our Target or a and

play05:54

objective you can say to find minimum

play05:57

number of vertices required or need

play05:59

needed for the vertex

play06:02

cover next uh I must tell you like I'm

play06:06

following the book for this problem I'm

play06:08

following uh Corman book you can follow

play06:10

that one the same to same I'm keeping

play06:12

the lines and wordings there so this is

play06:15

an algorithm you can say the algorithm

play06:17

name as approx Vortex cover G here C is

play06:21

a set you can say C stands for the

play06:26

set for keeping

play06:31

the

play06:34

vertices keeping the

play06:37

vertices next e Dash is a age which is

play06:42

equivalent to g dot represents while the

play06:45

number of edges clear until it is empty

play06:49

mean suppose as I have already given you

play06:52

the example so here this is one

play06:55

graph here the edges are three until the

play06:59

are three like we will run that one

play07:02

clear so from this we found uh it will

play07:06

run for big of e because V Loop we have

play07:09

included within that while loop we set

play07:12

until it is e means big of Fe the number

play07:14

of edges we are actually having that one

play07:17

we can say definitely it's a part of our

play07:21

complexity which we have already

play07:23

completed in our the the first the might

play07:26

be the complexity video that time we

play07:28

have completed uh to find out the term

play07:31

complexity so you can say until so we

play07:33

will return it Okay so until means we

play07:36

are just focusing on the number of edges

play07:38

so here as for the time complexity I

play07:41

must tell you the time complexity could

play07:43

be big of e why because the number of

play07:46

Ages we are focusing at here clear next

play07:50

once we started this one let

play07:53

U be on arbitrary edge of e Dash we just

play07:58

whenever we said e Dash e is skipping

play08:01

all the number of edges from the graph

play08:03

clear so then what we'll

play08:06

do c was previously is a set C was empty

play08:10

set this represents empty set okay of

play08:13

five like we include suppose UV suppose

play08:17

here is a I'm just writing this one a so

play08:21

a comma B both we will be keeping

play08:24

because from an age if the if I'm

play08:27

picking one age a will have two end

play08:30

points here is for that one A and B

play08:34

whenever I'm keeping this age so here it

play08:36

is written UV clear that UV is Union

play08:41

means we added to that the five which

play08:44

was previously

play08:46

there then

play08:49

remove from E Dash every Edge incident

play08:52

to either U or V means once I'm picking

play08:56

this one once I'm picking this one the

play08:59

two end points I have one and a and b so

play09:03

what I have to do I have to remove this

play09:05

one I have to remove this one what it is

play09:08

written I have to remove that one I'm

play09:10

just picking this one so written c c is

play09:14

a so we are expecting our Optimal

play09:17

Solutions first of all this C is

play09:19

approximation value the number of

play09:22

vertices are two if I'd like to say for

play09:25

this example the optimal optimal means

play09:29

what what should be the uh the answer

play09:31

what should be our expected answer clear

play09:33

means what should be the correct answer

play09:35

for us so we have already checked that

play09:38

one for optimal value either a AC CB

play09:42

anything we can take but at least two so

play09:45

for uh if this is C if I'm writing C

play09:48

star so C star could be the optimal uh

play09:51

solution or optimal uh number of or

play09:55

optimal set you can say if I'm picking

play09:58

also it keeps either a b or B comma C or

play10:04

a comma

play10:05

C so the optimal means whenever you

play10:09

focus on the vertex cover the number of

play10:12

vertices which you are going to pick is

play10:15

either AB BC anything you are taking so

play10:18

that should be two also here the

play10:20

approximation for this example as we

play10:23

have already covered in the previous

play10:25

video as an introduction for this graph

play10:28

for this graph we are saying one

play10:34

approximation one approximation means

play10:36

which is equivalent to the optimal

play10:40

answer optimal

play10:42

algorithm or optimal value for this

play10:45

example for this example we are

play10:48

expecting the one approximation where

play10:51

Epsilon is equivalent to zero means the

play10:53

extra which we are adding in 2 three

play10:56

whatever we are taking suppose for two 2

play10:59

approximation we must say epsilon is 1

play11:03

why because 1 + Epsilon we have already

play11:05

said in the approximation one that time

play11:08

we must say for approximation value if

play11:10

it is two means more than one suppose we

play11:14

have so that one more than one whatever

play11:18

is there so we can say it is Epsilon for

play11:20

us okay so uh we will be discussing with

play11:23

the example so for this example which we

play11:26

just have taken for our uh you know

play11:29

approach for this one we found one

play11:32

approximation for this one but this is

play11:33

not always correct okay next for the

play11:37

example you can say uh suppose this is

play11:39

example this is a book example I have

play11:41

kept here so a b c uh d e f g there are

play11:48

almost seven vertices we have with us

play11:52

and the ages is 1 2 3 4 5 6 7 8 okay

play11:56

there

play11:57

are 1 2 3 4 5 6 7 and 8 eight edes are

play12:02

there so what we are doing first we'll

play12:08

start

play12:09

arbitrarily eight means we will start

play12:11

with the while loop while loop will run

play12:13

for eight number of times because we

play12:15

need to remove all the elements all the

play12:18

edges the number of edges are eight so

play12:20

we will take all the eight up to in of

play12:23

five means zero up to up to eight we

play12:25

will run this is what it represents

play12:28

arbitrary written arbitrary Edge we are

play12:30

not always saying only this one will be

play12:33

picked or this one will be picked number

play12:36

wise no arbit you can take EF also but

play12:40

as for the book they have taken B to C

play12:43

okay so this age once this AG is

play12:45

selected line five which it says the C

play12:50

was previously five here C is previously

play12:54

five for this one C is B comma C the two

play12:59

elements we have included clear next As

play13:03

for six remove e- every incident means B

play13:08

to C which are connected we have to

play13:10

remove this one just dotted L says we

play13:13

are removing that one clear this is what

play13:16

the C value is I'm just writing C value

play13:20

here B and C node here arbitary again we

play13:26

have two options we have uh 1 2 3 3 4

play13:29

five there are four options we have

play13:32

because every others are we have already

play13:35

removed so here I as for the book they

play13:38

have taken E and F so once E and F is

play13:41

picked now C value will be previously it

play13:45

was B comma C why because here it is

play13:48

Union okay B comma c e comma F we are

play13:52

picking so now C value is

play13:54

updated only one we have to pick there

play13:58

is

play13:59

not no other ver edges are free then

play14:03

what we'll

play14:05

do we have to pick that one b c e f d

play14:12

then G this is our final uh you can say

play14:16

the vertex cover okay which is using the

play14:19

approximation algorithm or approximate

play14:21

vertex cover you can say this is our C

play14:23

value so uh this one is approximate Vex

play14:27

cover I can say us approximate so that

play14:30

that's why I'm just writing

play14:35

uh

play14:38

approximate vertex cover or ABC this one

play14:42

is AVC so which choose we have selected

play14:46

b c d e f g this is our uh number of

play14:52

nodes or number of vertices we have

play14:54

selected but for the optimal which is

play14:57

said as C star

play15:00

like if you say the optimal means the

play15:02

number of vertices which we are

play15:04

selecting wisely that should be minimum

play15:07

clear minimum means you can check

play15:09

suppose I'm picking B indirectly I'm

play15:11

removing this one clear if I'm keeping e

play15:15

I'm ring this one means I'm covering

play15:18

basically here no removing Concepts we

play15:20

should use we will cover when we are

play15:23

covering so I'm putting tick mark okay

play15:26

next if I'll pick D also uh Tex to be

play15:29

covered so here a part of cover we are

play15:33

supposed saying so for optimal

play15:35

indirectly what we are doing so you can

play15:38

check we can cover all the edges if I'm

play15:41

saying covering all the edges I'm just

play15:44

putting this Mark so you can take all

play15:47

the ages should be covered that's why we

play15:49

can say it's a Vortex cover so here

play15:51

optimally what exactly we are doing b e

play15:55

d this is not always a true but

play15:59

definitely I must say as we have already

play16:01

studied in the independent set that time

play16:03

you can compare one okay so if I would

play16:06

like to say a then a could at least keep

play16:10

this one if I'm keeping C so c will

play16:13

cover this one if I'm giving d d will

play16:17

cover this one but this age will be

play16:19

covered by at least one of the uh vertex

play16:23

that's why the problem will arise for

play16:25

the optimal one means what should be the

play16:27

best answer this is our best best one

play16:30

best or optimal you can

play16:33

say optimal

play16:36

value of vertex cover okay so is b d

play16:41

only clear those

play16:44

so the the problem is not that much hard

play16:48

to understand the way how we are doing

play16:50

the approximate value or approximation

play16:52

how we doing that one that is playing a

play16:55

vital Ro

play16:59

okay so I hope you understood here we

play17:01

are keeping 3 36 here our C value if I'm

play17:07

saying mode so it is six here if I'm

play17:10

doing the mode means the number of

play17:13

vertices here it is three so if you can

play17:16

say like which we have studied earlier

play17:19

is a row value so here is c c

play17:23

star which we must say two approximate

play17:25

value or two approximation

play17:31

to approximation okay this is what we

play17:34

have

play17:36

covered like the row value is two here

play17:39

and we must say it's approximation 2

play17:42

approximation so I hope you understood

play17:44

this one theorem I kept for you so here

play17:47

in the theorem basically how to prove it

play17:49

that matters a lot always so approximate

play17:52

cover is a polinomial time two is two

play17:55

approximation algorithm it it just shows

play17:58

whatever the appro oximation that you

play17:59

have done polinomial time exactly you're

play18:02

getting but that is two approximation

play18:04

means it is two times more than the

play18:07

optimal answers what should be the

play18:08

optimal answer is this one should be the

play18:10

optimal answer but it is two time more

play18:12

the approximation value which you got is

play18:14

two time more that's why it is two

play18:16

approximation clear so uh proof that

play18:19

whenever we are starting with a proof

play18:21

always you should remember what exactly

play18:23

we are representing like C represented

play18:25

as the set of vertices that you are

play18:28

getting through approximate vertex cover

play18:30

as we have already discussed that one

play18:32

clear and here they have introduced a a

play18:36

is just an age you can say here the

play18:37

cover and age is a has two end points

play18:41

okay like it has two end points so

play18:44

whenever we start with c c is optimal

play18:46

cover optimal Vortex cover you can say

play18:48

or optimal cover set of optimal Vortex

play18:51

cover which we have studied earlier

play18:53

clear so here this is the optimal vertex

play18:57

cover or best vertex cover you can say

play18:59

so it is three so like that but how to

play19:02

basically verify that one so whenever we

play19:04

say Vex is a minimum one means there is

play19:08

an end point of A and B suppose this is

play19:12

our a clear this is our a I am just

play19:15

changing that suppose C with d the

play19:18

naming convention I'm changing just try

play19:21

to understand suppose this is a we're

play19:24

having this one so there are two

play19:26

different end points we have for

play19:28

whenever we say say optimal we have to

play19:30

pick at least one if I'm saying

play19:32

approximate for approximate two end

play19:34

points have to be selected that is what

play19:36

the problem is clear whenever I must say

play19:40

keeping the optimal one optimal will

play19:43

keep at least C or or D any one of this

play19:47

but at least one this is what it is

play19:49

written clear optimal include at least

play19:52

one end point it is clearly mentioned so

play19:54

definitely a has two end points and here

play19:58

it will skip one that's why

play20:05

clip this C and this one first we'll

play20:09

cover up so this C whenever we discussed

play20:14

with C star

play20:17

and with a what exactly we should have

play20:20

to do like for the line

play20:24

four line four means here let youu be an

play20:30

arbitrary age we just picked arbitrary

play20:32

age which we discuss this one

play20:35

clear so next Once the arbitrary AE is

play20:39

being fixed so optimal cover we should

play20:42

have the optimal cover optimal cover at

play20:44

least we will pick one of them so

play20:47

whenever we should say the one of them

play20:49

we are picking up so this condition will

play20:51

satisfy once it is satisfied next C

play20:55

which is the approximate value c will

play20:58

keep the both the end points clear both

play21:02

the end point it should have to keep

play21:04

that's why it cover up with Cal to 2 a

play21:09

means there are two different end points

play21:11

we have So based on that we will pick

play21:14

this one if you equate if you equate

play21:17

this to like

play21:19

3.2 35.2 35.3 if you're going for

play21:23

equation so what you'll get it like c

play21:26

equal to 2 a

play21:29

this is what exactly you got in 3.5

play21:32

earlier 35.3 so you just equate with the

play21:35

previous equation definitely you'll get

play21:39

uh this C is less than equal to 2 C star

play21:43

means earlier you were just keeping this

play21:46

was our like for C I must

play21:49

tell U

play21:51

First for this example means there is

play21:54

two edges uh sorry one edge with two

play21:57

vertices

play21:58

so c will keep definitely we studied

play22:01

earlier like two end points C and D okay

play22:06

so C star will be picking at least one

play22:09

of them either C or D anything

play22:15

or D clear so if I'm saying this one so

play22:19

it represents two because the number of

play22:22

uh vertices are this one and for C

play22:27

star it is one it's a basic simple

play22:30

example that through which we can

play22:32

understand so definitely it is two times

play22:36

uh more you know C uh that's why you can

play22:39

say C is less than equal to 2 into 1 why

play22:45

you are saying uh less than might be it

play22:48

is somehow the problem could be the what

play22:52

exactly you getting suppose 1.5 instead

play22:54

of 1.5 you you might expect that one so

play22:57

it is some somehow nearly equivalent to

play22:59

two-way approximation that's why we are

play23:03

saying in this order clear I hope it is

play23:06

clearly understood by you where we are

play23:09

getting the approximation through which

play23:11

uh we we have completed the

play23:13

approximation on Vex cover and we are

play23:15

getting in polinomial time but the

play23:17

polinomial time is two two approximation

play23:20

algorithm two times the optimal answer

play23:23

we are expect uh we are getting but our

play23:26

expectation should be exactly one

play23:28

approxim

play23:29

but we are getting two approximation

play23:30

this is what we have completed of the I

play23:33

hope it is clearly understood by you if

play23:35

any doubt please comment below thank you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Vex CoverApproximation AlgorithmNP-CompleteGraph TheoryOptimizationEducational VideoAlgorithm MethodologyPolynomial TimeVertex SelectionOptimal Solution