Você está na página 1de 27

Van Emde Boas Trees

Presented by: Lokesh N. Jaliminche(M.tech 1st year cse) Reg.no:-12MCS0058

Outline
Introduction Priliminary approaches Direct addressing Superimposing a binary tree structure Recursive structure Proto of van emde boas tree Van emde boas tree Some operations. comparisons

Introduction
This

was invented by a team led by Peter van Emde Boas in 1975. data structures that support the operations of a priority queue,binary heaps, red-black trees, Fibonacci heaps In each of these data structures, at least one important operation take O(log n) time van Emde Boas trees support the each of these operations, in O(log logn) Search O(log(logm)) Insert O(log(logm)) Delete O(log(logm))

Terminologies and assumptions


n = number of elements currently in set u = range of possible values.(size of universe. universe={0,1,2,3,4u-1) u= 2^k. for some integer k>=1 No duplicate elements are allowed.

Preliminary approaches Direct addressing

A binary tree imposed on bit vector

Superimposing tree of a constant height

Recursive structure
previously , we used a summary structure of size u^1/2 on top of bit vectore with each entry pointing to another stucture of size . Now, we make the structure recursive, shrinking the universe size by the square root at each level of recursion.

Proto of VEB

Proto of VEB

Follwing are some functions which helps us to find the position of elements within the tree

High(x) gives the index of xs cluster Low(x) gives the index of x within the cluster The function index(x,y) builds an element number from x and y and identify the position of x

Van Emde Boas Tree

Some operations
Finding MIN and MAX Member Insert Delete

When to use this tree structure


we

should not use a van Emde Boas tree when we perform only a small number of operations, since the time to create the data structure would exceed the time saved in the individual operations. use a simple data structure, such as an array or linked list, to represent a set with only a few elements

Some comparisons
Implementation Insert Extract-min Ease of programming

Sorted linked list Unsorted linked list Red/Black Tree

O(n) O(1) O(logn)

O(1) O(n) O(logn)

Easy Easy Hard

Binary Heap
Van Emde Boas Tree

O(logn)
O(log logn)

O(logn)
O(log logn)

Easy
VERY HARD

References
1.Introduction to algorithms third edition Thomas H Cormen.

Thank you

Você também pode gostar