Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-rkxrd Total loading time: 0 Render date: 2024-07-22T03:31:37.737Z Has data issue: false hasContentIssue false

5 - Introduction to Suffix Trees

from II - Suffix Trees and Their Uses

Published online by Cambridge University Press:  23 June 2010

Dan Gusfield
Affiliation:
University of California, Davis
Get access

Summary

A suffix tree is a data structure that exposes the internal structure of a string in a deeper way than does the fundamental preprocessing discussed in Section 1.3. Suffix trees can be used to solve the exact matching problem in linear time (achieving the same worst-case bound that the Knuth-Morris-Pratt and the Boyer–Moore algorithms achieve), but their real virtue comes from their use in linear-time solutions to many string problems more complex than exact matching. Moreover (as we will detail in Chapter 9), suffix trees provide a bridge between exact matching problems, the focus of Part I, and inexact matching problems that are the focus of Part III.

The classic application for suffix trees is the substring problem. One is first given a text T of length m. After O(m), or linear, preprocessing time, one must be prepared to take in any unknown string S of length n and in O(n) time either find an occurrence of S in T or determine that S is not contained in T. That is, the allowed preprocessing takes time proportional to the length of the text, but thereafter, the search for S must be done in time proportional to the length of S, independent of the length of T. These bounds are achieved with the use of a suffix tree. The suffix tree for the text is built in O(m) time during a preprocessing stage; thereafter, whenever a string of length O(n) is input, the algorithm searches for it in O(n) time using that suffix tree.

Type
Chapter
Information
Algorithms on Strings, Trees and Sequences
Computer Science and Computational Biology
, pp. 89 - 93
Publisher: Cambridge University Press
Print publication year: 1997

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.

  • Introduction to Suffix Trees
  • Dan Gusfield, University of California, Davis
  • Book: Algorithms on Strings, Trees, and Sequences
  • Online publication: 23 June 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574931.007
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.

  • Introduction to Suffix Trees
  • Dan Gusfield, University of California, Davis
  • Book: Algorithms on Strings, Trees, and Sequences
  • Online publication: 23 June 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574931.007
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.

  • Introduction to Suffix Trees
  • Dan Gusfield, University of California, Davis
  • Book: Algorithms on Strings, Trees, and Sequences
  • Online publication: 23 June 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511574931.007
Available formats
×