{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_851S10_assn04

# MIT6_851S10_assn04 - algorithm for computing the suﬃx...

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

6.851 Advanced Data Structures (Spring’10) Prof. Erik Demaine Dr. Andr´ e Schulz TA: Aleksandar Zlateski Problem 4 Due: Thursday, Mar. 4 Be sure to read the instructions on the assignments section of the class web page. Analysis partition trees. Prove that Matouˇ sek’s theorem on the crossing number of fine par- titions implies a O ( n 2 1 + ε ) query time for partition trees for 2d halfspace counting. Hint: Choose as size of the fine partition r = 2( c 2) (1 ) , where c r is the bound for the crossing number. Speed up with LCP array. Suppose we have a data structure RMQ, that stores an indexed sequence of integers { a 1 , a 2 , . . . , a n } . A query rmq ( i , j ) returns the index of the smallest element of the subsequence { a i , . . . , a j } in O (1) time. RMQ can be build in O ( n ) time. 1. Show how to compute the LCP array using an RMQ data structure along

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: algorithm for computing the suﬃx array in linear time. In particular, show how to compute an entry of the LCP in O (1) time if we have the knowledge of the LCP array of the diﬀerence cover T ˜ . 2. Use the RMQ data structure and the LCP array to speed up the search in a suﬃx array from O ( | P | log | T | ) to O ( | P | + log | T | ). 1 MIT OpenCourseWare http://ocw.mit.edu 6.851 Advanced Data Structures Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms ....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

MIT6_851S10_assn04 - algorithm for computing the suﬃx...

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

View Full Document
Ask a homework question - tutors are online