Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALGO(G,X,u,v)
- INIT(G)
- dfs_visit(G,u,c1)
- for each x in X do
- if c1[x]=nero then
- dfs_visit(G,v,c1)
- if c1[v]=nero then
- dfs_visit(GT,v,c2)
- for each x in X do
- if c2[v]=nero then
- dfs_visit(GT,x,c2)
- if c1[v]=nero && c2[u]=nero then
- return true
- return false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement