# assign3 - Algorithms in the Real World(15-853 Fall 09...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Algorithms in the Real World (15-853), Fall 09 Assignment #3 Due: 15 October 09 You are not permitted to look at solutions of previous year assignments. You can work together in groups, but all solutions have to be written up individually. Problem 1: Suffix Trees (10pt) Consider a suffix tree build over a text string S of length n . Describe how to augment Suffix trees to support each of the following types of queries. 1. FindBefore(P,e) : find a string P in S starting at any position before e , if one exists. This should run in O ( | P | ) time and the space for the augmented data should be O ( n ). I briefly described this in class. 2. FindClosest(P,s,e) : find the string P in S that starts before s . If P appears multiple times before s , it must return the closest one to s . This should run in O ( | P | log n ) time and the space for the augmented data should be at most O ( n 2 ). If you can reduce the time or space, you can get extra credit (if described concisely and clearly). Notethe time or space, you can get extra credit (if described concisely and clearly)....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

assign3 - Algorithms in the Real World(15-853 Fall 09...

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

View Full Document
Ask a homework question - tutors are online