I had a problem in my class quiz to write a non determinstic algorithm for Vertex Cover. We discussed about the solution with our instructor and he told that the level indeterminancy should not be too high. It should be sensibly good.
I am confused about what question should I ask to non-deterministic computer ?
Asked
Active
Viewed 526 times
0
![](../../users/profiles/5128663.webp)
Laschet Jain
- 674
- 1
- 8
- 21
-
Do you need the algorithm to be any good? It's simple enough to take the brute-force deterministic algorithm and throw some non-determinism in there somewhere. – user2357112 supports Monica Nov 24 '15 at 21:02
-
Can you please tell how do we do it..I'm totally confused about what type of question should I ask ? The only question in my knowledge is simply is the problem statement itself. – Laschet Jain Nov 24 '15 at 21:04
-
@user2357112 Do you have any way other than this? – Laschet Jain Nov 24 '15 at 21:20
1 Answers
1
The obvious question is "which vertex next"?
A simple greedy approximation algorithm for vertex cover repeatedly chooses the vertex with the most uncovered adjacent vertices.
A simple non-deterministic approximation algorithm for vertex cover repeatedly chooses the next vertex randomly, but with the probability assigned to each vertex proportional to its number of uncovered adjacent vertices. Do that over and over again, remembering the best solution so far.
![](../../users/profiles/5483526.webp)
Matt Timmermans
- 36,921
- 2
- 27
- 59
-
How many times should I loop it..I mean when will your algorithm terminate. – Laschet Jain Nov 25 '15 at 07:46
-
I dunno. You just have to decide when enough is enough. Maybe when you've done 20 iterations without finding a significant improvement, or something like that. I would do experiments on random graphs to decide a reasonable cutoff criteria. – Matt Timmermans Nov 25 '15 at 13:25
-