Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-2pzkn Total loading time: 0 Render date: 2024-05-11T13:45:53.799Z Has data issue: false hasContentIssue false

3 - Balanced Search Trees

Published online by Cambridge University Press:  25 January 2011

Peter Brass
Affiliation:
City College, City University of New York
Get access

Summary

In the previous chapter, we discussed search trees, giving find, insert, and delete methods, whose complexity is bounded by O(h), where h is the height of the tree, that is, the maximum length of any path from the root to a leaf. But the height can be as large as n; in fact, a linear list can be a correct search tree, but it is very inefficient. The key to the usefulness of search trees is to keep them balanced, that is, to keep the height bounded by O(log n) instead of O(n). This fundamental insight, together with the first method that achieved it, is due to Adel'son-Vel'skiĭ and Landis (1962), who in their seminal paper invented the height-balanced tree, now frequently called AVL tree. The height-balanced tree achieves a height bound h ≤ 1.44 log n + O(1). Because any tree with n leaves has height at least log n, this is already quite good. There are many other methods that achieve similar bounds, which we will discuss in this chapter.

Height-Balanced Trees

A tree is height-balanced if, in each interior node, the height of the right subtree and the height of the left subtree differ by at most 1. This is the oldest balance criterion for trees, introduced and analyzed by G.M. Adel'son-Vel'skiĭ and E.M. Landis (1962), and still the most popular variant of balanced search trees (AVL trees). A height-balanced tree has necessarily small height.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2008

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Balanced Search Trees
  • Peter Brass, City College, City University of New York
  • Book: Advanced Data Structures
  • Online publication: 25 January 2011
  • Chapter DOI: https://doi.org/10.1017/CBO9780511800191.004
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Balanced Search Trees
  • Peter Brass, City College, City University of New York
  • Book: Advanced Data Structures
  • Online publication: 25 January 2011
  • Chapter DOI: https://doi.org/10.1017/CBO9780511800191.004
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Balanced Search Trees
  • Peter Brass, City College, City University of New York
  • Book: Advanced Data Structures
  • Online publication: 25 January 2011
  • Chapter DOI: https://doi.org/10.1017/CBO9780511800191.004
Available formats
×