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

Van Emde Boas Tree

Embed Size (px)

DESCRIPTION

this is presentation on van emde boas tree which helps in understanding concepts related to this tree

Citation preview

Page 1: Van Emde Boas Tree

Van Emde Boas Trees

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

Page 2: Van Emde Boas Tree

Outline IntroductionPriliminary approaches Direct addressing Superimposing a binary tree structure Recursive structure Proto of van emde boas treeVan emde boas treeSome operations.comparisons

Page 3: Van Emde Boas Tree

IntroductionThis 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))

Page 4: Van Emde Boas Tree

Terminologies and assumptionsn = number of elements

currently in setu = range of possible values.(size

of universe.universe={0,1,2,3,4……u-1)u= 2^k. for some integer k>=1No duplicate elements are

allowed.

Page 5: Van Emde Boas Tree

Preliminary approaches Direct addressing

Page 6: Van Emde Boas Tree

A binary tree imposed on bit vector

Page 7: Van Emde Boas Tree

Superimposing tree of a constant height

Page 8: Van Emde Boas Tree
Page 9: Van Emde Boas Tree

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.

Page 10: Van Emde Boas Tree

Proto of VEB

Page 11: Van Emde Boas Tree

Proto of VEB

Page 12: Van Emde Boas Tree

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

High(x) gives the index of x’s 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

Page 13: Van Emde Boas Tree

Van Emde Boas Tree

Page 14: Van Emde Boas Tree
Page 15: Van Emde Boas Tree
Page 16: Van Emde Boas Tree
Page 17: Van Emde Boas Tree

Some operations Finding MIN and MAX MemberInsertDelete

Page 18: Van Emde Boas Tree
Page 19: Van Emde Boas Tree
Page 20: Van Emde Boas Tree
Page 21: Van Emde Boas Tree
Page 22: Van Emde Boas Tree
Page 23: Van Emde Boas Tree
Page 24: Van Emde Boas Tree

When to use this tree structurewe 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

Page 25: Van Emde Boas Tree

Some comparisons

Implementation

Insert Extract-min Ease of programming

Sorted linked list

O(n) O(1) Easy

Unsorted linked list

O(1) O(n) Easy

Red/Black Tree O(logn) O(logn) Hard

Binary Heap O(logn) O(logn) Easy

Van Emde Boas Tree

O(log logn) O(log logn) VERY HARD

Page 26: Van Emde Boas Tree

References

1.Introduction to algorithms third edition

Thomas H Cormen.

Page 27: Van Emde Boas Tree

Thank you