Prove that the amortized cost of a top-down splay is O(logN).
Read moreTextbook Solutions for Data Structures and Algorithm Analysis in Java
Question
Suppose that in the linear-time suffix array construction algorithm, instead ofconstructing three groups, we construct seven groups, using for k = 0, 1, 2,3, 4, 5, 6Sk = < S[7i + k]S[7i + k + 1]S[7i + k + 2] ... S[7i + k + 6] for i = 0, 1, 2, ...>a. Show that with a recursive call to S3S5S6, we have enough information to sortthe other four groups S0, S1, S2, and S4.b. Show that this partitioning leads to a linear-time algorithm
Solution
The first step in solving 12 problem number 10 trying to solve the problem we have to refer to the textbook question: Suppose that in the linear-time suffix array construction algorithm, instead ofconstructing three groups, we construct seven groups, using for k = 0, 1, 2,3, 4, 5, 6Sk = < S[7i + k]S[7i + k + 1]S[7i + k + 2] ... S[7i + k + 6] for i = 0, 1, 2, ...>a. Show that with a recursive call to S3S5S6, we have enough information to sortthe other four groups S0, S1, S2, and S4.b. Show that this partitioning leads to a linear-time algorithm
From the textbook chapter Advanced Data Structures
and Implementation
you will find a few key concepts needed to solve this.
Visible to paid subscribers only
Step 3 of 7)Visible to paid subscribers only
full solution