Property testing
Property testing is a field of theoretical computer science, concerned with the design of super-fast algorithms for approximate decision making, where the decision refers to properties or parameters of huge objects.
A property testing algorithm for a decision problem is an algorithm whose query complexity is much smaller than the instance size of the problem. Typically, property testing algorithms are used to determine whether some combinatorial structure satisfies some property, or is "far" from having this property, using only a small number of "local" queries to the object.
For example, the following promise problem admits an algorithm whose query complexity is independent of the instance size :
Property testing algorithms are central to the definition of probabilistically checkable proofs, as a probabilistically checkable proof is essentially a proof that can be verified by a property testing algorithm.
Definition and variants
Formally, a property testing algorithm with query complexity and proximity parameter for a decision problem is a randomized algorithm that, on input makes at most queries to and behaves as follows:- If is in, then the algorithm accepts with probability at least 2/3.
- If is -far from, then the algorithm rejects with probability at least 2/3.
A property testing algorithm is said to have one-sided error if it satisfies the stronger condition that the accepting probability for instances is 1 instead of 2/3.
A property testing algorithm is said be non-adaptive if it performs all its queries before it "observes" any answers to previous queries. Such an algorithm can be viewed as operating in the following manner. First the algorithm receives its input. Before looking at the input, using its internal randomness, the algorithm decides which symbols of the input are to be queried. Next, the algorithm observes these symbols. Finally, without making any additional queries, the algorithm decides whether to accept or reject the input.
Features and limitations
The main efficiency parameter of a property testing algorithm is its query complexity, which is the maximum number of input symbols inspected over all inputs of a given length. Computer scientists are interested in designing algorithms whose query complexity is as small as possible. In many cases, the running time of property testing algorithms is sublinear in the instance length. Typically, the goal is first to make the query complexity as small as possible as a function of the instance size, and then study the dependency on the proximity parameter.Unlike other complexity-theoretic settings, the asymptotic query complexity of property testing algorithms is affected dramatically by the representation of instances. For example, when, the problem of testing bipartiteness of dense graphs admits an algorithm of constant query complexity. In contrast, sparse graphs on vertices require property testing algorithms of query complexity.
The query complexity of property testing algorithms grows as the proximity parameter becomes smaller for all non-trivial properties. This dependence on is necessary, as a change of fewer than symbols in the input cannot be detected with constant probability using fewer than queries. Many interesting properties of dense graphs can be tested using query complexity that depends only on and not on the graph size. However, the query complexity can grow enormously fast as a function of. For example, for a long time, the best known algorithm for testing whether a graph does not contain any triangle had a query complexity which is a tower function of, and only in 2010 was this improved to a tower function of. One of the reasons for this enormous growth in bounds is that many of the positive results for property testing of graphs are established using the Szemerédi regularity lemma, which also has tower-type bounds in its conclusions. The connection of property testing to the Szemerédi regularity lemma and related graph removal lemmas is elaborated on below.
Testing graph properties
For a graph with vertices, the notion of distance we will use is the edit distance. That is, we say that the distance between two graphs is the smallest such that one can add and/or delete edges and get from the first graph to the second. Under a reasonable representation of graphs, this is equivalent to the earlier Hamming distance definition.To make precise the general notions of property testing in the context of graphs, we say a tester for graph property should distinguish with at least two-thirds probability between the cases of satisfying and the cases where is -far in edit distance from satisfying. The tester can access some oracle to query whether a pair of vertices has an edge between them in or not. The query complexity is the number of such oracle queries. Say the tester has one-sided error if it has false positives and not false negatives, i.e. if satisfies, the tester always outputs the correct answer.
We can only differentiate between graphs that satisfy versus those far from, as opposed to satisfying versus not satisfying. In the latter case, consider two graphs: satisfying and not satisfying by changing only a few edges. One example is testing triangle-freeness with a graph with exactly one triangle and having one of these edges removed. Then, the tester cannot tell them apart unless it queries every edge, which it cannot do.
Short history
The field of graph property testing was first introduced by Goldreich, Goldwasser, and Ron. In their seminal paper published in 1998, an abstract graph partition problem is analyzed and some testers provided. These include as special cases several important graph properties like bipartiteness, k-colorability, having a large clique, and having a large cut. In particular, the natural algorithms that sample a subgraph and check whether it satisfy the property are all correct, albeit with perhaps-suboptimal query complexities.Since then, several related discoveries have been made
- In 1992, Alon, Duke, Lefmann, Rödl, and Yuster showed that for every graph ', the property of not containing ' as a subgraph is testable.
- In 1999, Alon, Fischer, Krivelevich, and Szegedy showed that for every graph ', the property of not containing ' as an induced subgraph subgraph is testable.
- In 2005, Alon and Shapira showed that any monotone graph property is testable with one-sided error.
- In 2008, Alon and Shapira exhibited testers with one-sided error for all hereditary graph properties. They also characterized properties that are easy to test. Namely, these natural properties are semi-hereditary. These statements will be clarified below.
Testing hereditary graph properties
A graph property is hereditary if it is preserved under deletion of vertices, or equivalently, if it is preserved under taking induced subgraphs. A few important hereditary properties are '-freeness, -colorability, and planarity. All hereditary properties are testable.The proof relies on a version of the graph removal lemma for infinite families of induced subgraphs. The query complexity using this regularity approach is large due to the tower function bound in the Szemerédi regularity lemma'''.
Oblivious testers
Informally, an oblivious tester is oblivious to the size of the input. For a graph property, it is an algorithm that takes as input a parameter and graph, and then runs as a property testing algorithm on for the property with proximity parameter that makes exactly queries to.Crucially, the number of queries an oblivious tester makes is a constant dependent only on and not the size of the input graph. In complete analogy with property testing algorithms, we can talk about oblivious testers with one-sided error.
Testing semi-hereditary graph properties
We can contrive some graph properties for which a tester must access the number of vertices.In this case, the tester cannot even differentiate which property to test unless it knows the number of vertices. There are many examples of such unnatural properties. In fact, the characterization of graph properties testable by an oblivious tester with one-sided error leads to a class of natural properties.
Trivially, hereditary properties are also semi-hereditary. This characterization partially answers the converse to the other Alon & Shapira theorem above: the properties that are easy to test properties are almost hereditary. In the same paper, they showed that
Examples: testing some graph properties
In this section, we will give some natural oblivious testing algorithms with one-sided error for triangle-freeness, bipartiteness, and -colorability. They are natural in the sense that we follow the natural idea of randomly sampling some subset of vertices of ' and checking whether the graph property holds on the subgraph spanned by ' by brute-force search. We have one-sided error since these properties are actually hereditary: if ' satisfy the property, so must the induced subgraph spanned by ', so our tester always accepts.For triangle-freeness, the tester is an application of the triangle removal lemma. In particular, it tells us that if graph ' is -far from being triangle-free, then there is a constant so that has at least triangles.
Example.
- Given graph, choose a random set '
For bipartiteness and -colorability, let be the desired upper bound on error probability for the following testers. Note that query complexity should not be confused with running time. The latter is often exponential due to a lack of polynomial time decision algorithm to test the property on the induced subgraph. We instead check by brute-force search.
Example.of vertices.
- Given graph, choose a random set '
For every pair of vertices in ', query whether they are adjacent in. It accepts if the induced subgraph of on ' is bipartite and rejects otherwise.
Example.
- Given graph, choose a random set ' of vertices.
- For every pair of vertices in ', query if they are adjacent in.
- It accepts if the induced subgraph of on is k-colorable and rejects otherwise.