Computing Frequency Dominators and Related Problems

  • Loukas Georgiadis
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5369)


We consider the problem of finding frequency dominators in a directed graph with a single source vertex and a single terminal vertex. A vertex x is a frequency dominator of a vertex y if and only if in each source to terminal path, the number of occurrences of x is at least equal to the number of occurrences of y. This problem was introduced in a paper by Lee et al. [11] in the context of dynamic program optimization, where an efficient algorithm to compute the frequency dominance relation in reducible graphs was given. In this paper we show that frequency dominators can be efficiently computed in general directed graphs. Specifically, we present an algorithm that computes a sparse (O(n)-space), implicit representation of the frequency dominance relation in O(m + n) time, where n is the number of vertices and m is the number of arcs of the input graph. Given this representation we can report all the frequency dominators of a vertex in time proportional to the output size, and answer queries of whether a vertex x is a frequency dominator of a vertex y in constant time. Therefore, we get the same asymptotic complexity as for the regular dominators problem. We also show that, given our representation of frequency dominance, we can partition the vertex set into regions in O(n) time, such that all vertices in the same region have equal number of appearances in any source to terminal path. The computation of regions has applications in program optimization and parallelization.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)zbMATHGoogle Scholar
  2. 2.
    Alstrup, S., Husfeldt, T., Rauhe, T.: Marked ancestor problems. In: Proc. 39th IEEE Symp. on Foundations of Computer Science, p. 534Google Scholar
  3. 3.
    Ball, T.: What’s in a region?: or computing control dependence regions in near-linear time for reducible control flow. ACM Lett. Program. Lang. Syst. 2(1-4), 1–16 (1993)CrossRefGoogle Scholar
  4. 4.
    Buchsbaum, A.L., Georgiadis, L., Kaplan, H., Rogers, A., Tarjan, R.E., Westbrook, J.R.: Linear-time algorithms for dominators and other path-evaluation problems. SIAM Journal on Computing (to appear),
  5. 5.
    Carter, L., Ferrante, J., Thomborson, C.: Folklore confirmed: reducible flow graphs are exponentially larger. In: Proc. 30th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, pp. 106–114 (2003)Google Scholar
  6. 6.
    Gabow, H.N., Bentley, J.L., Tarjan, R.E.: Scaling and related techniques for geometry problems. In: Proc. 16th ACM Symp. on Theory of Computing, pp. 135–143 (1984)Google Scholar
  7. 7.
    Gabow, H.N., Tarjan, R.E.: A linear-time algorithm for a special case of disjoint set union. Journal of Computer and System Sciences 30(2), 209–221 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Georgiadis, L., Tarjan, R.E.: Finding dominators revisited. In: Proc. 15th ACM-SIAM Symp. on Discrete Algorithms, pp. 862–871 (2004)Google Scholar
  9. 9.
    Georgiadis, L., Tarjan, R.E., Werneck, R.F.: Finding dominators in practice. Journal of Graph Algorithms and Applications (JGAA) 10(1), 69–94 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Johnson, R., Pearson, D., Pingali, K.: The program structure tree: computing control regions in linear time. SIGPLAN Not 29(6), 171–185 (1994)CrossRefGoogle Scholar
  11. 11.
    Lee, B., Resnick, K., Bond, M.D., McKinley, K.S.: Correcting the dynamic call graph using control-flow constraints. In: Krishnamurthi, S., Odersky, M. (eds.) CC 2007. LNCS, vol. 4420, pp. 80–95. Springer, Heidelberg (2007); Full paper appears as technical report TR-06-55, The University of Texas at Austin, Department of Computer Sciences (2006)CrossRefGoogle Scholar
  12. 12.
    Lengauer, T., Tarjan, R.E.: A fast algorithm for finding dominators in a flowgraph. ACM Transactions on Programming Languages and Systems 1(1), 121–141 (1979)CrossRefzbMATHGoogle Scholar
  13. 13.
    Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM Journal on Computing 1(2), 146–159 (1972)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Tarjan, R.E.: Testing flow graph reducibility. In: Proceedings of the Fifth Annual ACM Symposium on Theory of Computing, pp. 96–107 (1973)Google Scholar
  15. 15.
    Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. Journal of the ACM 22(2), 215–225 (1975)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Tarjan, R.E.: Edge-disjoint spanning trees and depth-first search. Acta Informatica 6(2), 171–185 (1976)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Tarjan, R.E., van Leeuwen, J.: Worst-case analysis of set union algorithms. Journal of the ACM 31(2), 245–281 (1984)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Zhang, L.: Personal communication (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Loukas Georgiadis
    • 1
  1. 1.Hewlett-Packard LaboratoriesPalo AltoUSA

Personalised recommendations