lec23

# lec23 - 6.851: Advanced Data Structures Spring 2010 Lecture...

This preview shows pages 1–3. Sign up to view the full content.

6.851: Advanced Data Structures Spring 2010 Lecture 23 — May 4, 2010 Prof. Erik Demaine Scribe: Mart´ ı Bol´ ıvar, heavily edited by Sarah Eisenstat 1 Overview In the last lecture we introduced the concept of implicit, succinct, and compact data structures, and gave examples for succinct binary tries, as well as showing the equivalence of binary tries, rooted ordered trees, and balanced parenthesis expressions. Succinct data structures were introduced which solve the rank and select problems. In this lecture we introduce compact data structures for suﬃx arrays and suﬃx trees. Recall the problem that we are trying to solve. Given a text T over the alphabet Σ, we wish to preprocess T to create a data structure. We then want to be able to use this data structure to search for a pattern P , also over Σ. A suﬃx array is an array containing all of the suﬃxes of T in lexicographic order. In the interests of space, each entry in the suﬃx array stores an index in T , the start of the suﬃx in question. To ﬁnd a pattern P in the suﬃx array, we perform binary search on all suﬃxes, which gives us all of the positions of P in T . 2 Survey In this section, we give a brief survey of results for compact suﬃx arrays. Recall that a compact data structure uses O ( OPT ) bits, where OPT is the information-theoretic optimum. For a suﬃx array, we need | T | lg | Σ | bits just to store the text T . Grossi and Vitter 2000 [3] Suﬃx array in ± 1 ε + O (1) ² | T | lg | Σ | bits, with query time O | P | log ε | Σ | | T | + | output | · log ε | Σ | | T | ! We will follow this paper fairly closely in our discussion today. Ferragina and Manzini 2000 [1] The space required is 5 H k ( T ) | T | + o ( | T | ) + O ³ | T | ε · | Σ | O ( | Σ | ) ´ bits, for all ﬁxed values of k . H k ( T ) is the k th -order empirical entropy, or the regular entropy conditioned on knowing the previous k characters. More formally: H k ( T ) = X | w | = k Pr { w occurs } · H 0 (characters following an occurrence of w in T ) . 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Note that because we’re calculating this in the empirical case, Pr { w occurs } = # of occurrences of w | T | . For this data structure, query time is O ( | P | + | output | · lg ε | T | ) . Sadakane 2003 [5] Space in bits is 1 ε H 0 ( T ) | T | + O ( | T | lg lg | Σ | + | Σ | lg | Σ | ) , and query time is O ( | P | lg | T | + | output | lg ε | T | ) . Note that this bound is more like a suﬃx array, due to the multiplicative log factor. Grossi, Gupta, Vitter 2003 [2] This is the only known succinct result. Space in bits is H k ( T ) · | T | + O ± | T | lg | Σ | · lg lg | T | lg | T | ² , and query time is O ( | P | lg | Σ | + lg o (1) | T | ) .
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/20/2012 for the course CS 6.849 taught by Professor Erikdemaine during the Fall '10 term at MIT.

### Page1 / 7

lec23 - 6.851: Advanced Data Structures Spring 2010 Lecture...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online