|
|
#1 (permalink) | |
|
I JUST got here.
Join Date: Oct 2009
Posts: 1
![]() |
#65 ETS Practice -- Search tree of graph
Hi all. I'm looking at #65 in the latest ETS practice exam; it reads:
Quote:
SPOILER: E and I just don't understand why condition II is necessarily true. I'm thinking I can construct a simple counterexample where node n is the parent of u and v, with u being the left child and v being the right child. A preorder traversal visits the nodes in order: n,u,v, making pre(u) < pre(v). There is no edge between u and v in the tree, but this tree could be derived from a complete graph of the three nodes, with the starting point for the search being node n, allowing the edge (u,v) to exist in G but not in T. What am I missing?Thanks! -Stacy P.S. Are the questions generally increasing in difficulty as you go through the exam, or did I just lose my mojo for the second half of this test? Last edited by Aniviel : 2009 October 7th at 06:20 AM. Reason: Added P.S. |
|
|
|
|
|
|
#2 (permalink) |
|
Eager!
Join Date: May 2008
Posts: 39
![]() |
Case-I can proved to be false.
Case-II: I believe that your example proves it false. I am not even sure, case-III is true either. Consider a tree Root=W left(w)=x; right(w)=u left(u)=y;right(u)=z left(z)=a;right(z)=v In this case u = grandparent of v. Pre(u)<Pre(v); w= the lowest common ancestor and u!=w Thoughts ? |
|
|
|
|
|
#3 (permalink) | |
|
Mountain Goat
Join Date: Oct 2009
Posts: 3
![]() |
Quote:
V = { n,u,v} & G = { nu, nv, uv }, the DFS tree of this graph will have the edges {nu, uv} i.e 'v' will be reached via 'u' and not via 'n'. Since this DFS tree has the edge 'uv', it does not satisfy the condition stated in the problem. Intuitively: The fact that (uv) is an edge in the graph, but does not appear in the tree implies that 'v' was visited through some child of 'u' ( 'u' was visited before 'v', since we are told that pre('u') < pre(v) ). Condition III follows from II. Best, Zorth. |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Contact TestMagic TestMagic Forums Archive Privacy Statement
TestMagic Locations
Legal
Privacy
SEO by vBSEO 3.2.0
Copyright © 2009 TestMagic
Ad Management by RedTyger