Sparse language


In computational complexity theory, a sparse language is a formal language such that the complexity function, counting the number of strings of length n in the language, is bounded by a polynomial function of n. They are used primarily in the study of the relationship of the complexity class NP with other classes. The complexity class of all sparse languages is called SPARSE.
Sparse languages are called sparse because there are a total of 2n strings of length n, and if a language only contains polynomially many of these, then the proportion of strings of length n that it contains rapidly goes to zero as n grows. All unary languages are sparse. An example of a nontrivial sparse language is the set of binary strings containing exactly k 1 bits for some fixed k; for each n, there are only Binomial coefficient| strings in the language, which is bounded by nk.

Relationships to other complexity classes

SPARSE contains TALLY, the class of unary languages, since these have at most one string of any one length. Although not all languages in P/poly are sparse, there is a polynomial-time Turing reduction from any language in P/poly to a sparse language.
Fortune showed in 1979 that if any sparse language is co-NP-complete, then P = NP;
Mahaney used this to show in 1982 that if any sparse language is NP-complete, then P = NP.
A simpler proof of this based on left-sets was given by Ogihara and Watanabe in 1991.
Mahaney's argument does not actually require the sparse language to be in NP, so there is a sparse NP-hard set if and only if P = NP.
Further, ENE if and only if there exist sparse languages in NP that are not in P.
There is a Turing reduction from an NP-complete language to a sparse language if and only if.
In 1999, Jin-Yi Cai and D. Sivakumar, building on work by Ogihara, showed that if there exists a sparse P-complete problem, then L = P.