This preview shows pages 1–3. Sign up to view the full content.
6.851: Advanced Data Structures
Spring 2010
Lecture 13 – Thursday, March 18, 2010
Prof. Erik Demaine
Scribe: David Charlton
1
Overview
This lecture covers two methods of decomposing trees into smaller subtrees: Separator Decompo
sition and ART / leaftrimmingdecomposition. The latter is applied to solve the marked ancestor
problem and the decremental connectivity problem on trees.
2
Tree decompositions
This course covers several ways of decomposing trees:
•
Preferred paths: Rearranges a balanced tree to have a less balanced but nicer structure. We
saw this in Tango trees, and will use it again when we cover linkcut trees.
•
Heavylight: Decomposes any tree (including an unbalanced one) into paths so that every
leaftoroot path hits only log
n
“heavy paths” (this means we can compress the heavy paths
to get a balanced tree). This will also be used in linkcut trees.
•
Separator decomposition: Rearranges any tree into a balanced tree by recursively splitting it
into subtrees of roughly equal size.
•
ART/leaftrimming decomposition: Split the tree into “bottom” subtrees having
≤
lg
n
leaves
and a “top” subtree consisting of the full tree with the bottom trees removed.
This lecture covers the latter two decompositions, with some applications and open problems.
3
Separator theorem on trees
A typical separator theorem on graphs would give a small set of vertices that splits the graph into
balanced components. In the case of trees, we can do even better, as shown by this classic result
of Camille Jordan [Jor69]:
Theorem 1
(Jordan, 1869)
.
Any tree on
n
vertices has a vertex whose removal leaves connected
components of size at most
n/
2
.
Proof.
Consider any vertex
v
. If
v
does not divide the tree into components of size
≤
n/
2, then it
is adjacent to a node of size
> n/
2, so take one step into that subtree and recurse (see Figure 1,
where the recursion proceeds from
v
to
u
).
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document >n/2
v
u
<n/2
Figure 1: A wrong choice of
v
results in an adjacent subtree having more than
n/
2 vertices. We
change
v
to
u
, the root of the largest subtree adjacent to
v
, and recurse.
This process will never cross the same edge twice, since a single tree edge can’t have
> n/
2 nodes
on both sides, so we will ±nd the desired separator vertex in at most
n
iterations (in fact, at most
n/
2, since we can’t start at distance more than
n/
2 from the target).
3.1
Separator decomposition
The separator decomposition is de±ned recursively: given an input tree, apply Theorem 1 to get a
balanced cut, and make the selected node
v
the root of a new tree. Remove
v
from the tree and
recurse on the components to get the child subtrees. The resulting decomposition is a new tree
on the same vertices with height at most log
n
. The decomposition will generally have di²erent
topology than the input: see the example in Figure 2.
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 01/20/2012 for the course CS 6.849 taught by Professor Erikdemaine during the Fall '10 term at MIT.
 Fall '10
 ErikDemaine
 Data Structures

Click to edit the document details