Abstract
This paper determines upper bounds on the expected time complexity for a variety of parallel algorithms for undirected and directed random graph problems. For connectivity, biconnectivity, transitive closure, minimum spanning trees, and all pairs minimum cost paths, we prove the expected time to beO(log logn) for the CRCW PRAM (this parallel RAM machine allows resolution of write conflicts) andO(logn · log logn) for the CREW PRAM (which allows simultaneous reads but not simultaneous writes). We also show that the problem of graph isomorphism has expected parallel timeO(log logn) for the CRCW PRAM andO(logn) for the CREW PRAM. Most of these results follow because of upper bounds on the mean depth of a graph, derived in this paper, for more general graphs than was known before.
For undirected connectivity especially, we present a new probabilistic algorithm which runs on a randomized input and has an expected running time ofO(log logn) on the CRCW PRAM, withO(n) expected number of processors only.
Our results also improve known upper bounds on the expected space required for sequential graph algorithms. For example, we show that the problems of finding connected components, transitive closure, minimum spanning trees, and minimum cost paths have expected sequential spaceO(logn · log logn) on a deterministic Turing Machine. We use a simulation of the CRCW PRAM to get these expected sequential space bounds.
Similar content being viewed by others
References
Aleliunas, R., Karp, R. M., Lipton, R. J. Lovász, L., and Rackoff, C. Random Walks, Universal Traversal Sequences, and the Complexity of Maze Problems,Proc. 20th IEEE Symp. on Foundations of Computer Science, Puerto Rico, 1979, pp. 218–223.
Angluin, D., and L. G. Valiant, Fast Probabilistic Algorithms for Hamiltonian Paths and Matchings,J. Comput. System Sci.,18, 1979, 155–193.
Babai, L., and L. Kucera, Canonical Labelling of Graphs in Linear Average Time,Proc. 20th IEEE Symp. on Foundations of Computer Science, Puerto Rico, 1979, pp. 39–46.
Babai, L., Erdos, and S. M. Selkow, Random Graph Isomorphism,SIAM J. Comput.,9(3), 1980, 628–634.
Bollobas, B., The Evolution of Sparse Graphs, inGraph Theory & Combinatorics, Academic Press, London, 1984, pp. 35–57.
Bollobas, B., Extremal Graph Theory with Emphasis on Probabilistic Methods, inThe Evolution of Random Graphs, Regional Conference Series in Mathematics, No. 62, Conference Board of the Mathematical Sciences, pp. 37–43.
Bollobas, B.,Random Graphs, Academic Press, New York, 1985.
Borodin, A., and J. E. Hopcroft, Routing, Merging and Sorting on Parallel Models of Computation,Proc. 14th ACM Symp. on Theory of Computing, San Francisco, CA, 1982, pp. 338–344; also inJ. Comput. System Sci.,30, 1985, 130–145.
Chernoff, H., A Measure of Asymptotic Efficiency for Tests of a Hypothesis Based on the Sum of Observations,Ann. of Math. Statist.,23, 1952.
Chin, F., J. Lam, and T. Chen, Efficient Parallel Algorithms for Some Graph Problems,Comm. ACM,25(9), 1982, 659–665.
Cole, R., and U. Vishkin, Deterministic Coin Tossing and Accelerating Cascades: Micro and Macro Techniques of Designing Parallel Algorithms,Proc. 18th ACM Symp. on Theory of Computing, 1986, pp. 206–219; also inInform, and Control,70, 1986, 32–53.
Cook, S., Towards a Complexity Theory of Synchronous Parallel Computations, Paper presented at Specker Symp. on Logic and Algorithms, Zurich, February 5–11, 1980; alsoEnseign. Math.,27, 1981, 99–124.
Coppersmith D., P. Raghavan, and M. Tompa, Parallel Graph Algorithms that Are Efficient on Average,Proc. 28th IEEE Symp. on Foundations of Computer Science, 1987, pp. 260–269. Also inInform. Comput. J.,91, 1989, 318–333.
Dekel, E., D. Nassimi, and S. Sahni, Parallel Matrix and Graph Algorithms,SIAM J. Comput.,10(4), 1981, 657–675.
Erdos, P., and A. Renyi, On the Evolution of Random Graphs,Publ. Math. Inst. Hungar. Acad. Sci, 5A, 1960, 17–61.
Feller, W.,An Introduction to Probability Theory and Its Applications, vol. 1, 3rd edn., Wiley, New York, 1968.
Fortune, S., and J. Wyllie, Parallelism in Random Access Machines,Proc. 10th ACM Symp. on Theory of Computing, 1978, pp. 114–118.
Gazit, H., An Optimal Randomized Parallel Algorithm for Finding Connected Components in a Graph,Proc. 27th IEEE Symp. on Foundations of Computer Science, 1986, pp. 492–501.
Goldschlager, L., A Unified Approach to Models of Synchronous Parallel Machines,Proc. 10th ACM Symp. on Theory of Computing, May, 1978.
Hirschberg, D., A. Chandra, and D. Sarwate, Computing Connected Components on Parallel Computers,Comm. ACM,22(8), 1979, 461–464.
Ja′Ja′, J., Graph Connectivity Problems on Parallel Computers, TR GS-78-05, Department of Computer Science, Penn State University, PA, 1978.
Karp, R. M., The Probabilistic Analysis of Combinatorial Search Algorithms, inAlgorithms and Complexity: New Directions and Recent Results, J. F. Traub, ed., Academic Press, New York, 1976, pp. 1–19.
Karp, R. M., and M. Sipser, Maximum Matchings in Sparse Random Graphs,Proc. 22nd IEEE Symp. on Foundations of Computer Science, Nashville, TN, 1981, pp. 364–375.
Karp, R. M., and R. Tarjan, Linear Expected Time Algorithms for Connectivity Problems,Proc. 12th ACM Symp. on Theory of Computing, Los Angeles, CA, 1980, pp. 368–377.
Kucera, L., Parallel Computation and Conflicts in Memory Access,Inform. Process. Lett.,14(2), 1982, 93–96.
Lewis, H. R., and C. Papadimitriou, Symmetric Space Bounded Computation,Theoret. Comput. Sci.,19, 1982, 161–187.
Reif, J. H., Symmetric Complementation,Proc. 14th ACM Symp. on Theory of Computing, San Francisco, CA, May 1982(a), pp. 201–214; alsoJ. Assoc. Comput. Mach.,31, 1984, 401–421.
Reif, J. H., On the Power of Probabilistic Choice in Synchronous Parallel Computations,Proc. 9th Colloq. on Automata, Languages and Programming, Aarhus, Denmark, July 1982(b), pp. 442–456.
Reif, J. H., and P. Spirakis, “Random Matroids,”Proc. 12th ACM Symp. on Theory of Computing, Los Angeles, CA, 1980, pp. 385–347; also rewritten as Probabilistic Analysis of Random Extension-Rotation Algorithms, TR-28-81, Aiken Computer Laboratory, Harvard University, 1981.
Reif, J. H., and P. Spirakis,k-Connectivity in Random Undirected Graphs,J. Discrete Math.,54(2), 1985, 1–18.
Ruzzo, W., On Uniform Circuit Complexity,Proc. 20th IEEE Symp. on Foundations of Computer Science, 1979, pp. 312–318; alsoJ. Comput. System Sci.,22, 1981, 365–383. Ruzzo, W., Personal communication, 1982.
Savage, C., and J. Ja′Ja′, Fast, Efficient Parallel Algorithms for Some Graph Problems, Technical Report, Computer Studies, North Carolina State University, 1978.
Savage, C., and J. Ja′Ja′, Fast Efficient Parallel Algorithms for Some Graph Problems,SIAM J. Comput.,10(4), 1981, 682–691.
Savitch, W. J., Relationships Between Nondeterministic and Deterministic Tape Complexities,J. Comput. System Sci.,4(2), 1970, 177–192.
Schnorr, C. P., An Algorithm for Transitive Closure with Linear Expected Time,SIAM J. Comput.,7, 1978, 127–133.
Shamir, E., and E. Upfal,N-Processors Graphs Distributedly Achieve Perfect Matchings inO(log2 n) Beats,ACM SIGACT-SIGOPS Symp. on Principles of Distributed Computing, Ottawa, 1982, pp. 238–241.
Shiloah, Y., and U. Vishkin, Finding the Maximum, Merging and Sorting in a Parallel Computation Model,J. Algorithms,2(1), 1981, 88–102.
Shiloah, Y., and U. Vishkin, AnO(log n) Parallel Connectivity Algorithm,J. Algorithms,3(2), 1982, 128–148.
Spirakis, P., Probabilistic Algorithms, Algorithms with Random Inputs and Random Combinatorial Structures, Ph.D. Thesis, Harvard University, December 1981.
Wyllie, J., The Complexity of Parallel Computation, Ph.D. Thesis, Cornell University, 1979.
Author information
Authors and Affiliations
Additional information
Communicated by Greg N. Frederickson.
This research was supported by National Science Foundation Grant DCR-85-03251 and Office of Naval Research Contract N00014-80-C-0647.
This research was partially supported by the National Science Foundation Grants MCS-83-00630, DCR-8503497, by the Greek Ministry of Research and Technology, and by the ESPRIT Basic Research Actions Project ALCOM.
Rights and permissions
About this article
Cite this article
Reif, J., Spirakis, P. Expected parallel time and sequential space complexity of graph and digraph problems. Algorithmica 7, 597–630 (1992). https://doi.org/10.1007/BF01758779
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01758779