We address the problem of approximating the distance of bounded degree and general sparse graphs from having some predetermined graph property
. Namely, we are interested in sublinear algorithms for estimating the fraction of edges that should be added to / removed from a graph so that it obtains
. This fraction is taken with respect to a given upper bound
on the number of edges. In particular, for graphs with degree bound
. To perform such an approximation the algorithm may ask for the degree of any vertex of its choice, and may ask for the neighbors of any vertex.
The problem of estimating the distance to having a property was first explicitly addressed by Parnas et. al. (
). In the context of graphs this problem was studied by Fischer and Newman (
) in the dense-graphs model. In this model the fraction of edge modifications is taken with respect to
, and the algorithm may ask for the existence of an edge between any pair of vertices of its choice. Fischer and Newman showed that every graph property that has a testing algorithm in this model with query complexity that is independent of the size of the graph, also has a distance-approximation algorithm with query complexity that is independent of the size of the graph.
In this work we focus on bounded-degree and general sparse graphs, and give algorithms for all properties that were shown to have efficient testing algorithms by Goldreich and Ron (
). Specifically, these properties are
-edge connectivity, subgraph-freeness (for constant size subgraphs), being a Eulerian graph, and cycle-freeness. A variant of our subgraph-freeness algorithm approximates the size of a minimum vertex cover of a graph in sublinear time. This approximation improves on a recent result of Parnas and Ron (