Abstract
The generalized topological sorting problem takes as input a positive integer k and a directed, acyclic graph with some vertices labeled by positive integers, and the goal is to label the remaining vertices by positive integers in such a way that each edge leads from a lower-labeled vertex to a higher-labeled vertex, and such that the set of labels used is exactly {1,...,k}. Given a generalized topological sorting problem, we want to compute a solution, if one exists, and also to test the uniqueness of a given solution. The best previous algorithm for the generalized topological sorting problem computes a solution, if one exists, and tests its uniqueness in O(n log log n+m) time on input graphs with n vertices and m edges. We describe improved algorithms that solve both problems in linear time O(n+m).
Supported by the ESPRIT Basic Research Actions Program of the EC under contract No. 7141 (project ALCOM II). Part of the research was carried out while both authors were with the Universität des Saarlandes.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Gabow, H. N., and Tarjan, R. E. (1985), A Linear-Time Algorithm for a Special Case of Disjoint Set Union, J. Comput. System Sci. 30, pp. 209–221.
Hagerup, T., and Rülling, W. (1986), A Generalized Topological Sorting Problem, in Proc. 2nd Aegean Workshop on Computing, Springer Lecture Notes in Computer Science, Vol. 227, pp. 261–270.
Lengauer, T, and Mehlhorn, K. (1984), The HILL System: A Design Environment for the Hierarchical Specification, Compaction, and Simulation of Integrated Circuit Layouts, in Proc. Conference on Advanced Research in VLSI, MIT, pp. 139–149.
Lipski, W., Jr., and Preparata, F. P. (1981), Efficient Algorithms for Finding Maximum Matchings in Convex Bipartite Graphs and Related Problems, Acta Inform. 15, pp. 329–346.
Valiant, L. G. (1976), Relative Complexity of Checking and Evaluating, Inform. Process. Lett. 5, pp. 20–23.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hagerup, T., Maas, M. (1993). Generalized topological sorting in linear time. In: Ésik, Z. (eds) Fundamentals of Computation Theory. FCT 1993. Lecture Notes in Computer Science, vol 710. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57163-9_23
Download citation
DOI: https://doi.org/10.1007/3-540-57163-9_23
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57163-6
Online ISBN: 978-3-540-47923-9
eBook Packages: Springer Book Archive