lec31 - Suffix Trees String any sequence of characters....

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Suffix Trees String … any sequence of characters. Substring of string S … string composed of characters i through j , i <= j of S . S = cater => ate is a substring. car is not a substring. Empty string is a substring of S .
Background image of page 1

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

View Full DocumentRight Arrow Icon
Subsequence Subsequence of string S … string composed of characters i 1 < i 2 < … < i k of S . S = cater => ate is a subsequence. car is a subsequence. The empty string is a subsequence.
Background image of page 2
String/Pattern Matching You are given a source string S . Answer queries of the form: is the string p i a substring of S ? Knuth-Morris-Pratt (KMP) string matching. O(|S| + | p i |) time per query. O(n|S| + Σ i | p i |) time for n queries. Suffix tree solution. O(|S| + Σ i | p i |) time for n queries.
Background image of page 3

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

View Full DocumentRight Arrow Icon
String/Pattern Matching KMP preprocesses the query string p i , whereas the suffix tree method preprocesses the source string S . An application of string matching. Genome project. Databank of strings (gene sequences). Character set is ATGF . Determine if a “new” sequence is a substring of a databank sequence.
Background image of page 4
Definition Of Suffix Tree Compressed trie with edge information. Keys are the nonempty suffixes of a given string S . Nonempty suffixes of S = sleeper are: sleeper leeper eeper eper per , er , and r .
Background image of page 5

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

View Full DocumentRight Arrow Icon
String Matching & Suffixes p i is
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 24

lec31 - Suffix Trees String any sequence of characters....

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online