ACM Home Page
Please provide us with feedback. Feedback
On finding lowest common ancestors in trees
Full text PdfPdf (722 KB)
Source Annual ACM Symposium on Theory of Computing archive
Proceedings of the fifth annual ACM symposium on Theory of computing table of contents
Austin, Texas, United States
Pages: 253 - 265  
Year of Publication: 1973
Authors
Sponsors
ACM: Association for Computing Machinery
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 24,   Downloads (12 Months): 97,   Citation Count: 8
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/800125.804056
What is a DOI?

ABSTRACT

Trees in an n node forest are to be merged according to instructions in a given sequence, while other instructions in the sequence ask for the lowest common ancestor of pairs of nodes. We show that any sequence of O(n) instructions can be processed “on line” in O(n log n) steps on a random access computer. If we can accept our answer “off-line”, that is, no answers need to be produced until the entire sequence of instructions has been seen seen, then we may perform the task in O(n G(n)) steps, where G(n) is the number of times we must apply log2 to n to obtain a number less than or equal to zero. A third algorithm solves a problem of intermediate complexity. We require the answers on line, but we suppose that all tree merging instructions precede the information requests. This algorithm requires O(n log log n) time. We apply the first on line algorithm to a problem in code optimization, that of computing immediate dominators in a reducible flow graph. We show how this computation can be performed in O(n log n) steps.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
J. E. Hopcroft and J. D. Ullman, "Set Merging Algorithms," Submitted to SIAM J. Computing.
3
 
4
 
5
6
7
 
8
J. Cocke and R. E. Miller, "Some Analysis Techniques for Optimizing Computer Programs," Proc. Second International Conference on System Sciences, Honolulu, Hawaii, 1969.
9
 
10
J. D. Ullman, "Fast Algorithms for the Elimination of Common Subexpressions," Technical Report TR-106, Department of Electrical Engineering, Computer Sciences Laboratory, March, 1972. Also in Proc. IEEE 13th Annual Symposium on Switching and Automata Theory, October, 1972.
 
11
K. Kennedy, "A Global Flow Analysis Algorithm," International J. Computer Mathematics, 3:1 (December 1971), 5-16.
 
12
M. S. Hecht and J. D. Ullman, "Flow Graph Reducibility," SIAM. J. Computing, 1:2 (June 1972), 188-202.
 
13
R. E. Tarjan, "Testing Flow Graph Reducibility," Department of Computer Science, Cornell University, Ithaca, N.Y.

CITED BY  8

Collaborative Colleagues:
A. V. Aho: colleagues
J. E. Hopcroft: colleagues
J. D. Ullman: colleagues