Advertisement
daniele2013

grafo 23/6/16

Jul 6th, 2016
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Algo (G,u,p)
  2.   For each v € V
  3.     Color(v) = b
  4.   Return fun (G,u, p)
  5.  
  6.  
  7. Fun (G, u, p)
  8.   color[u] = Grigio
  9.   flag = false
  10.   If L(u) == p
  11.     Return true
  12.   For each v € adj (u)
  13.     If color(v) == Grigio
  14.       flag = false
  15.     Else if color(v) == Bianco
  16.       flag = fun (G, v, p)
  17.   color[u] = Nero
  18.   return flag
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement