Testing triangle-freeness in general graphs

Noga Alon, Tali Kaufman, Michael Krivelevich, Dana Ron
2006 Proceedings of the seventeenth annual ACM-SIAM symposium on Discrete algorithm - SODA '06  
In this paper we consider the problem of testing whether a graph is triangle-free, and more generally, whether it is H-free, for a fixed subgraph H. The algorithm should accept graphs that are triangle-free and reject graphs that are far from being triangle-free in the sense that a constant fraction of the edges should be removed in order to obtain a triangle-free graph. The algorithm is allowed a small probability of error. This problem has been studied quite extensively in the past, but the
more » ... cus was on dense graphs, that is, when d = Θ(n), where d is the average degree in the graph and n is the number of vertices. Here we study the complexity of the problem in general graphs, that is, for varying d. In this model a testing algorithm is allowed to ask neighbor queries (i.e., "what is the i-th neighbor of vertex v"), vertex-pair queries (i.e., "is there an edge between vertices v and u"), and degree queries (i.e., "what is the degree of vertex v"). Our main finding is a lower bound of Ω(n 1/3 ) on the necessary number of queries that holds for every d < n 1−ν(n) , where ν(n) = o(1). Since when d = Θ(n) the number of queries sufficient for testing has been known to be independent of n, we observe an abrupt, threshold-like behavior of the complexity of testing around n. This lower bound holds for testing H-freeness of every non-bipartite subgraph H. Additionally, we provide sub-linear upper bounds for testing triangle-freeness that are at most quadratic in the stated lower bounds, and we describe a transformation from certain one-sided error lower bounds for testing subgraph-freeness to two-sided error lower bounds. Finally, in the course of our analysis we show that dense random Cayley graphs behave like quasi-random graphs in the sense that relatively large subsets of vertices have the "correct" edge density. The result for subsets of this size cannot be obtained from the known spectral techniques that only supply such estimates for much larger subsets. Property Testing is the study of the following type of computational tasks. Let P be some predetermined property, where we shall be interested in properties of combinatorial nature. The task is to distinguish quickly and reliably between input objects possessing property P and input objects that are "far" from having P , where distance is measured in some appropriately defined quantitative sense. In order to fulfill this task, the testing algorithm is given query access to a description of the input object O, adhering to some pre-agreed upon format; the algorithm's complexity is measured by the number of queries it asks before reaching a reliable decision. A testing algorithm is expected to query a sublinear portion of the input; hence, randomness plays an essential role in developing property testing algorithms. Property testing was defined by Rubinfeld and Sudan [RS96], who focused on testing algebraic properties. Goldreich, Goldwasser and Ron [GGR98] initiated the study of combinatorial property testing, and in particular considered testing properties of graphs. Since then, the field has progressed enormously, with many papers devoted to it, where one of the main focuses is on testing graph properties. An interested reader is invited to consult the surveys [Fis01, Ron01] for more details. In this work we consider the problem of testing subgraph-freeness, and in particular trianglefreeness, in general graphs. Let n denote the number of vertices in the graph, let d denote the average degree, and let d max denote the maximum degree. Given a distance parameter > 0, we would like to design an algorithm that distinguishes with high probability between the case that the graph contains no triangles and the case in which more than · dn edges should be removed so that no triangles remain. To this end we allow the algorithm query access to the graph. In particular, for any vertex of its choice, the algorithm may ask for the degree of the vertex, it may ask to get the i-th neighbor of the vertex for every i ≤ n (if the vertex has less than i neighbors then a null answer is returned), and it may ask whether there is an edge between any two vertices. 1 Subgraph-freeness, and more specifically, triangle-freeness, is one of the most basic problems studied in property testing. The interest in this problem is both due to the fact that triangle-freeness is a fundamental and simple graph property, and it is due to the relation between triangle-freeness and the study of dense sets of integers with no three-term arithmetic progression. Dense graphs. Most of the focus in previous works was on testing triangle-freeness in dense graphs, that is, when d = Θ(n). For this class of graphs the most appropriate input graph representation is the graph adjacency matrix, and a testing algorithm is allowed to query whether (u, v) is an edge of an input graph G, where u, v ∈ V (G) (the so called vertex-pair queries). The authors of [AFKS00] showed that it is possible to test triangle-freeness in dense graphs using a number of queries that is independent of n, and has a tower-type behavior in 1/ . Alon [Alo02] proved that a super-polynomial dependence on 1/ is necessary for testing subgraph-freeness of all non-bipartite subgraphs. When the fixed subgraph is bipartite then O(1/ ) queries suffice [Alo02] . It is also observed in [Alo02] (and much earlier, though implicitly, in [RS76] ) that the problem of testing triangle-freeness is intimately related to the famous (and very hard) problem of the existence of dense sets of integers without a three-term arithmetic progression. Alon's lower bound, which was proved for one-sided error algorithms, was extended in [AS04b] to two-sided error algorithms. Other related results include [AS04a]. Bounded-Degree graphs. In the other extreme, an input graph is assumed to have its maximum degree bounded by an absolute constant d max = O(1). In such a case, the input graph is usually represented by an array of incidence lists of all of its vertices (of length at most d max each); accordingly, a testing algorithm queries the i-th neighbor of a vertex v, where 1 ≤ i ≤ d max (the so called neighbor queries). As was observed in [GR02], in this case O(1/ ) queries suffice for testing triangle-freeness. More generally, O(d τ / ) queries suffice for testing H-freeness in graphs with maximum degree O(d), where τ is the diameter of H.
doi:10.1145/1109557.1109589 fatcat:fiyk5xzq2vgmnasqn2wrbu6lja