Re: An algorithm with Minimum vertex cover without considering its performance




eKo1 wrote:
Perhaps I'm not understanding what a vertex cover is. I thought a
vertex cover was just the set of all vertices which are incident to
edges in E. I guess I'll have to research what a vertex cover is in
more detail.

Let V' be a subset of V. V' is a vertex cover if it satisfies the
following test:

E' = Ø
for each v in V'
for each edge e in E
if v is incident to e then
add e to E'
end if
end for
end for
if |E| = |E'| then
return true // V' is a vertex cover
end if
return false

Would this be correct?

.