Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. is(V, E, k)
  2. {
  3. count = 0;
  4. for each v in V {
  5. choose x[v] in { 0 , 1 };
  6. count = count + x[v];
  7. }
  8. if (count < k) {
  9. failure;
  10. }
  11.  
  12. for each u in V such that x[u] == 1 {
  13. for each v in V such that x[v] == 1 {
  14. if muchia {u,v} apartine E {
  15. failure;
  16. }
  17. }
  18. }
  19. success;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement