Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Rules of a Quantum World by Strand Life Scien... 417 views
- Strand genomics features in CIO review by Strand Life Scien... 1417 views
- Introduction to statistics ii by Strand Life Scien... 476 views
- Converting High Dimensional Problem... by Strand Life Scien... 575 views
- 75V Constant On-Time PFET Buck Swit... by element14 672 views
- Introduction to statistics by Strand Life Scien... 455 views

1,553 views

1,399 views

1,399 views

Published on

No Downloads

Total views

1,553

On SlideShare

0

From Embeds

0

Number of Embeds

2

Shares

0

Downloads

11

Comments

0

Likes

1

No embeds

No notes for slide

- 1. Least Common Ancestors in Constant Time
- 2. Motivation: GO Analysis on the Dendrogram
- 3. GO Analysis on Dendrogram• For each GO term • Pull out the skeleton sub- tree for this term • Test for significance only at the nodes of this skeleton tree• How does one pull out the skeleton sub-tree in time proportional to the size of that subtree?
- 4. LCA Queries• Preprocess the tree in linear time, so..• Given two nodes, the least common ancestor can be returned in O(1) time
- 5. LCA Queries on a Line Graph• Rank nodes in order from top to bottom• Take the min of the two ranks
- 6. Linearizing a Tree• Label each node with its distance from the root• Euler Tour to linearize nodes in an array (size 2n)Find the node with the least label in this range
- 7. The Range Minimum Problem• Given an array of size 2n, preprocess it in linear time so…• Given a range, the min item in that range can be returned in O(1) time
- 8. Divide and Conquer• Split into blocks at various levels of granularity – For each block, compute all prefix and suffix mins – Total space/preprocessing time O(nlog n)
- 9. Query Handling• Given the query range – Determine the granularity level at which this range straddles adjacent blocks • First bit diff in O(1) time – Look up the appropriate prefix/suffix mins in each block • Look up precomputed tables in O(1) time
- 10. Reducing Preprocessing Time• Consider blocks of size Δ=log n/3• Two blocks are said to be equivalent if all within-block queries return the same min-index for the two blocks• How many equivalence classes are +1-1+1-1-1-1-1+1-1+1 there: – Recall Euler Tour, adjacent nos differ in +/-1, so 2Δ = n1/3 – For each distinct class and each of the possible log2n/9 queries precompute answers and store – This takes time O(n1/3 log2n) = O(n)
- 11. Overall Preprocessing• Compute the O(n1/3 log2n) data structure for blocks of size =log n/3 – Within block queries can be answered using this• Create a new array of size 2n/(log n/3) = 6n/log n by replacing each block by just its minimum item• Preprocess this array as before, but now in O(n) time and space because the size of this array is just O(n/log n).

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment