Advertisement
Davencode

Untitled

Jan 8th, 2022
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. ALGO(G1,G2,s,v)
  2. INIT(G1,G2)
  3. dfs_visit(G1,s,c1)
  4. if(c1[v]=nero)then
  5. if(dfs_visit_ciclo(G1,v,c2))then
  6. return false // prima condizione se non soddisfatta
  7. dfs_visit(G2,s,c1)
  8. if(c1[v]=nero)then
  9. if(dfs_visit_ciclo(G2,v,c2))then
  10. c3[v]=nero
  11. if(dfs_visit_ciclo(G2,s,c3)then
  12. return false //seconda condizione se non soddisfatta
  13. return true
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement