31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

void D.evert(vertex v) makes v the new root of its tree.<br />

vertex D.lca(vertex v, vertex w)<br />

returns the lowest common ancestor of v and w or nil.<br />

Precondition: v and w are not nil.<br />

4. Implementation<br />

Dynamic Trees are implemented using binary trees with the randomized balancing scheme<br />

by Aragon and Seidel. Each operation takes O(log 2 n) amortized expected time except<br />

for make which takes constant time. n is the current number of nodes.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!