Advertisement
Guest User

asd_Sett_2018

a guest
Jun 20th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. if(VAL[u] % 2 == 1)
  2. return false;
  3.  
  4. for each v€V do
  5. c[v] = bianco
  6. count[v] = 0
  7.  
  8. for each v€V do
  9. if(c[v] == bianco)
  10. DFS_Visit(G, s, VAL, count)
  11.  
  12. for each v€V do
  13. if(count[v] > 1 && (VAL[v] % 2 == 1)) then
  14. return false;
  15. else if (count[v] <= 1 && (VAL[v] % 2 == 0) ten
  16. return false;
  17.  
  18.  
  19. return true;
  20.  
  21. -------------------------------------------
  22.  
  23. DFS_Visit(G, s, VAL, count)
  24. c[s] = grigio
  25.  
  26. for each t€Adj[s] do
  27. if(c[t] == bianco) then
  28. DFS_Visit(G, t, VAL, count)
  29. else if (c[t] == grigio)
  30. count[t]++;
  31. count[s]++;
  32.  
  33. c[s] = nero
  34. count[s]++
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement