Tree partition

Related Links: National Team Paper 2009: paint Zichao "divide and conquer algorithm in the path of the tree in question"

Dotted rule:

First, select a point unrooted tree into a rooted tree, and then recursively processing each child a tree to the root of the root of his son.

Side partition:

Select an edge in the tree, the tree is divided into two disjoint original tree recursive processing.

Split path:

This is mainly the heavy chain split.

Points in \ (size_i \) of \ (I \) is the size of the sub-tree root. If \ (size_v \) to \ (u \) son \ (size \) the largest of the chain \ ((u, v) \ ) is a heavy chain and light chain otherwise.

After this split, the following three properties:

Property 1: If \ ((u, v) \ ) as a light side, the \ (size_v \ le \ frac { size_u} {2} \)

Property 2: the number from the root to a point on the side of the light path is not greater than \ (O (log N) \ )

Property 3: We call a path to re-route, if and only if it is composed entirely of heavy side. Then for each point do not exceed the path to the root \ (O (log N) \ ) strip edges and light \ (O (log N) \ ) two heavy path.

Guess you like

Origin www.cnblogs.com/QAQAQ/p/10993302.html