Lably
Skip to content

Van Emde Boas tree

Tree data structure

  • 11 min read
  • 4 chapters

Related on Lably

Through Big O notation and Word (computer architecture)

The standard vEB tree has an unideal space efficiency of O(M). For example, for storing 32-bit integers (i.e., when m=32), it requires M=232 bits of storage. To resolve this, vEB trees can be modified to achieve O(nlog⁡M) space, or similar data structures with equivalent asymptotic time efficiency and space efficiency of O(n) (where n is the number of stored elements) can be used.

Supported operations

A vEB tree supports the operations of an ordered associative array, which includes the usual associative array operations along with two more order operations, FindNext and FindPrevious:

  • Insert: insert a key/value pair with an m-bit key
  • Delete: remove the key/value pair with a given key
  • Lookup: find the value associated with a given key
  • FindNext: find the key/value pair with the smallest key which is greater than a given k
  • FindPrevious: find the key/value pair with the largest key which is smaller than a given k

A vEB tree also supports the operations Minimum and Maximum, which return the minimum and maximum element stored in the tree respectively. These both run in O(1) time, since the minimum and maximum element are stored as attributes in each tree.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication