|
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
|
|
|
|
|
|
|
|
Stephen Alstrup , Cyril Gavoille , Haim Kaplan , Theis Rauhe, Nearest common ancestors: a survey and a new distributed algorithm, Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures, August 10-13, 2002, Winnipeg, Manitoba, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|