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

Info icon This 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 .
Image of page 1

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

View Full Document Right 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.
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.
Image of page 3

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

View Full Document Right 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.
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 .
Image of page 5

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern