Go backward to Parents and Children Go up to Top Go forward to Example |
Definition: A node x is a leaf, if it does not have children:
x is leaf in T : <=> x in V /\ ~exists y: y is child of x in T where V = T0.
A node x is an ancestor of y if there is a path from x to y in T:
x is ancestor of y in T : <=> exists p: p is path in T /\ p is path from x to y.
y is then called a descendant of x:
y is descendant of x in T : <=> x is ancestor of y in T.