# Fun with Sub-linear Time Algorithms

DOI: 10.1007/978-3-540-72914-3_3

- Cite this paper as:
- Trevisan L. (2007) Fun with Sub-linear Time Algorithms. In: Crescenzi P., Prencipe G., Pucci G. (eds) Fun with Algorithms. FUN 2007. Lecture Notes in Computer Science, vol 4475. Springer, Berlin, Heidelberg

## Abstract

Provided that one is willing to use randomness and to tolerate an approximate answer, many computational problems admit ultra-fast algorithms that run in less than linear time in the length of the input. In many interesting cases, even algorithms that run in *constant* time are known, whose efficiency depends only on the accuracy of the approximation and not on the length of the inputs.

Algorithms for graph problems on *dense graphs* are especially efficient and simple. I will describe an algorithm that estimates the size of the maximum cut in a dense graph, and its specialization to the task of distinguishing bipartite dense graphs from dense graphs that are “far from bipartite.” Results “explaining” the simplicity of such algorithms will also be discussed.

Some sublinear-time algorithms are also known for graph problems in *sparse graphs*, but they are typically more elaborate. I will describe a simple but very clever algorithm that approximates the number of connected components of a given graph, and its generalization to the problem of approximating the weight of the minimum spanning tree of a given weighted graph. The algorithm runs in time dependent only on the maximum degree, the required quality of approximation, and the range of weights, but the running time is independent of the number of vertices.