Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- is(V, E, k)
- {
- count = 0;
- for each v in V {
- choose x[v] in { 0 , 1 };
- count = count + x[v];
- }
- if (count < k) {
- failure;
- }
- for each u in V such that x[u] == 1 {
- for each v in V such that x[v] == 1 {
- if muchia {u,v} apartine E {
- failure;
- }
- }
- }
- success;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement