# Testing Acyclicity of Directed Graphs in Sublinear Time

- First Online:

## Abstract

This paper initiates the study of testing properties of directed graphs. In particular, the paper considers the most basic property of directed graphs - acyclicity. Because the choice of representation affects the choice of algorithm, the two main representations of graphs are studied. For the adjacency matrix representation, most appropriate for dense graphs, a testing algorithm is developed that requires query and time complexity of O(l/∈^{2}), where ∈ is a distance parameter *independent* of the size of the graph. The algorithm, which can probe the adjacency matrix of the graph, accepts every graph that is acyclic, and rejects, with probability at least 2/3, every graph whose adjacency matrix should be modified in at least *e* fraction of its entries so that it become acyclic. For the incidence list representation, most appropriate for sparse graphs, an Ω(V 1/3) lower bound is proved on the number of queries and the time required for testing, where V is the set of vertices in the graph. These results stand in contrast to what is known about testing acyclicity in *undirected* graphs.

## Preview

Unable to display preview. Download preview PDF.

### References

- 1.N. Alon, E. Fischer, M. Krivelevich, and M Szegedy. Efficient testing of large graphs. In
*Proceedings of the Fortieth Annual Symposium on Foundations of Computer Science*, pages 656–666, 1999.Google Scholar - 2.N. Alon, M. Krivelevich, I. Newman, and M Szegedy. Regular languages are testable with a constant number of queries. In
*Proceedings of the Fortieth Annual Symposium on Foundations of Computer Science*, pages 645–655, 1999.Google Scholar - 3.S. Arora, A. Frieze, and H. Kaplan. A new rounding procedure for the assignment problem with applications to dense graph arrangement problems. In
*37th Annual Symposium on Foundations of Computer Science*, pages 21–30. IEEE, 14–16 October 1996.Google Scholar - 4.S. Arora, C. Lund, R. Motwani, M. Sudan, and M. Szegedy. Proof verification and intractability of approximation problems. In
*Proceedings of the Thirty-Third Annual Symposium on Foundations of Computer Science*, pages 14–23, 1992.Google Scholar - 5.S. Arora and S. Safra. Probabilistic checkable proofs: A new characterization of NP. In
*Proceedings of the Thirty-Third Annual Symposium on Foundations of Computer Science*, pages 1–13, 1992.Google Scholar - 6.L. Babai, L. Fortnow, L. Levin, and M. Szegedy. Checking computations in polylogarithmic time. In
*Proceedings of the Twenty-Third Annual ACM Symposium on Theory of Computing*, pages 21–31, 1991.Google Scholar - 7.L. Babai, L. Fortnow, and C. Lund. Non-deterministic exponential time has two-prover interactive protocols.
*Computational Complexity*, 1(1):3–40, 1991.MATHCrossRefMathSciNetGoogle Scholar - 8.M. Bender and D. Ron. Testing acyclicity of directed graphs in sublinear time. Full version of this paper. Available from http://www.eng.tau.ac.il/danar, 2000.
- 9.B. Berger and P. W. Shor. Tight bounds for the maximum acyclic subgraph problem.
*Journal of Algorithms*, 25(1):1–18, October 1997.Google Scholar - 10.M. Blum, M. Luby, and R. Rubinfeld. Self-testing/correcting with applications to numerical problems.
*Journal of the Association for Computing Machinery*, 47:549–595, 1993.MATHMathSciNetGoogle Scholar - 11.Y. Dodis, O. Goldreich, E. Lehman, S. Raskhodnikova, D. Ron, and A. Samorodnitsky. Improved testing algorithms for monotonocity. In
*Proceedings of RANDOM99*, 1999.Google Scholar - 12.F. Ergun, S. Kannan, S. R. Kumar, R. Rubinfeld, and M. Viswanathan. Spotcheckers. In
*Proceedings of the Thirty-Second Annual ACM Symposium on the Theory of Computing*, pages 259–268, 1998.Google Scholar - 13.G. Even, J. Naor, B. Schieber, and M. Sudan. Approximating minimum feedback sets and multicuts in directed graphs.
*Algorithmica*, 20, 1998.Google Scholar - 14.U. Feige, S. Goldwasser, L. Lovász, S. Safra, and M. Szegedy. Approximating clique is almost NP-complete.
*Journal of the Association for Computing Machinery*, 43(2):268–292, 1996.MATHGoogle Scholar - 15.A. Frieze and R. Kannan. Quick approximations of matrices. An extended abstract of some of this work appeared in FOCS96 under the title: The Regularity Lemma and approximation schemes for dense problems, 1997.Google Scholar
- 16.P. B. Gibbons and Y. Matias. New sampling-based summary statistics for improving approximate query answers.
*SIGMOD Record: Proc. ACM SIGMOD Int. Conf. Management of Data*, 27(2):331–342, 2–4 June 1998.Google Scholar - 17.P. B. Gibbons and Y. Matias. Synopsis data structures for massive data sets.
*DI-MACS: Series in Discrete Mathematics and Theoretical Computer Science: Special Issue on External Memory Algorithms and Visualization*, A, 1999. to appear.Google Scholar - 18.M. Goemans and D. Williamson. Primal-dual approximation algorithms for feedback problems in planar graphs.
*Combinatorica*, 18, 1998.Google Scholar - 19.O. Goldreich, S. Goldwasser, E. Lehman, D. Ron, and A. Samordinsky. Testing monotonicity. To appear in
*Combinatorica*. A preliminary (and weaker) version of this work appeared in FOCS98, 1999.Google Scholar - 20.O. Goldreich, S. Goldwasser, and D. Ron. Property testing and its connection to learning and approximation.
*Journal of the Association for Computing Machinery*, 45(4):653–750, 1998. An extended abstract appeared in FOCS96.MATHMathSciNetGoogle Scholar - 21.O. Goldreich and D. Ron. Property testing in bounded degree graphs. In
*Proceedings of the Thirty-First Annual ACM Symposium on the Theory of Computing*, pages 406–415, 1997.Google Scholar - 22.O. Goldreich and D. Ron. A sublinear bipartite tester for bounded degree graphs. In
*Proceedings of the Thirty-Second Annual ACM Symposium on the Theory of Computing*, 1998. To appear in*Combinatorica*.Google Scholar - 23.R. Hassin and S. Rubinstein. Approximations for the maximum acyclic subgraph problem.
*Information Processing Letters*, 51(3):133–140, August 1994.Google Scholar - 24.D. S. Hochbaum and D. B. Shmoys. Using dual approximation algorithms for scheduling problems: Theoretical and practical results.
*Journal of the Association for Computing Machinery*, 34(1):144–162, January 1987.Google Scholar - 25.D. S. Hochbaum and D. B. Shmoys. A polynomial approximation scheme for machine scheduling on uniform processors: Using the dual approximation approach.
*SI AM Journal on Computing*, 17(3):539–551, 1988.MATHCrossRefMathSciNetGoogle Scholar - 26.V. Kann.
*On the Approximability of NP-Complete Optimization Problems*. PhD thesis, Department of Numberical Analysis and Computer Science, Royal Institute of Technology, Stockholm, 1992.Google Scholar - 27.R. M. Karp. Reducibility among combinatorial problems. In R. E. Miller and J. W. Thatcher, editors,
*Complexity of Computer Computations*, pages 85–103, New York, 1972. Plenum Press.Google Scholar - 28.M. Kearns and D. Ron. Testing problems with sub-learning sample complexity. In
*Proceedings of the Eleventh Annual ACM Conference on Computational Learning Theory*, pages 268–277, 1998.Google Scholar - 29.C. Papadimitriou and M. Yannakakis. Optimization, approximization and complexity classes.
*Journal of Computer and System Sciences*, 43:425–440, 1991.MATHCrossRefMathSciNetGoogle Scholar - 30.M. Parnas and D. Ron. Testing the diameter of graphs. In
*Proceedings of Random99*, pages 85–96, 1999.Google Scholar - 31.R. Rubinfeld. Robust functional equations and their applications to program testing. In
*Proceedings of the Thirty-Fifth Annual Symposium on Foundations of Computer Science*, 1994.Google Scholar - 32.R. Rubinfeld and M. Sudan. Robust characterization of polynomials with applications to program testing.
*SIAM Journal on Computing*, 25(2):252–271, 1996.MATHCrossRefMathSciNetGoogle Scholar - 33.P. D. Seymour. Packing directed circuits fractionally.
*Combinatorica*, 15, 1995.Google Scholar