Accname
2D-Graphics enthusiast
- Reaction score
- 1,462
Hi guys.
I need an algorithm which solves the minimum vertex cover problem deterministicly.
I need a definitely correct result, no approximation.
Has somebody a good suggestion how I write it in java?
I thought of something like this:
But I have a problem with the "every set of vertices S of size i" part. How would I make it at least a little bit efficient.
Thanks guys.
I need an algorithm which solves the minimum vertex cover problem deterministicly.
I need a definitely correct result, no approximation.
Has somebody a good suggestion how I write it in java?
I thought of something like this:
Code:
for i in [0...vertexCount]
for every set of vertices S of size i
if S is a vertex cover
return i
end
end
end
Thanks guys.