Distributional problems and the classes AvgP, HeurP and DistNP #
A distributional problem L : Cslib.Complexity.DistProblem pairs a language of binary words with
an ensemble (Cslib.Complexity.Ensemble) Bogdanov and Trevisan, §2.1.
This file defines the deterministic average-case classes of Bogdanov and Trevisan,
§2.2.
- An errorless heuristic scheme (
Cslib.Complexity.DistProblem.IsErrorlessScheme, Bogdanov and Trevisan, Definition 6) receives an instancexand a unary confidence parameterk, outputssome bor the failure symbolnone, never answers wrongly on the support of the ensemble, and fails with probability at most1/(k+1)on every length.AvgPis the class of distributional problems with a polynomial-time errorless scheme Bogdanov and Trevisan, Definition 8. - A heuristic scheme (
Cslib.Complexity.DistProblem.IsHeuristicScheme) may answer wrongly, with probability at most1/(k+1);HeurPis the class of distributional problems with a polynomial-time heuristic scheme Bogdanov and Trevisan, Definition 11. - For a failure bound
δ : ℕ → ℝ≥0∞,AvgDeltaP δandHeurDeltaP δare the classesAvg_δ PandHeur_δ Pof problems solved by a single polynomial-time errorless, respectively heuristic, algorithm with failure probability at mostδ non lengthnBogdanov and Trevisan, Definitions 9 and 11; heuristic algorithms are Bogdanov and Trevisan, Definition 10. DistNPpairsNPlanguages with polynomial-time computable ensembles andSampNPwith polynomial-time samplable ensembles Bogdanov and Trevisan, §2.1.
Conventions #
The source parameterizes a scheme by a failure bound δ > 0 and allows running time polynomial in
n / δ. Here δ = 1/(k+1) with k written in unary, so "polynomial in n and k" is the same
resource bound up to polynomial change. Schemes are total functions computed in polynomial time on
all inputs, the standard convention after clocking. Correctness is required only on the support of
the ensemble: an instance of probability zero carries no constraint, as in the source.
The source's AvgP is the errorless-heuristic class; Levin's original formulation through the
moments E[t(x)^ε] of a running time is equivalent to it on instances of positive probability
Bogdanov and Trevisan, Proposition 7, and is not formalized here.
Main definitions #
Cslib.Complexity.DistProblem, with the predicatesCslib.Complexity.DistProblem.IsErrorlessScheme,Cslib.Complexity.DistProblem.IsHeuristicScheme,Cslib.Complexity.DistProblem.IsErrorlessAlgorithmandCslib.Complexity.DistProblem.IsHeuristicAlgorithm.Cslib.Complexity.AvgP,Cslib.Complexity.HeurP,Cslib.Complexity.AvgDeltaP,Cslib.Complexity.HeurDeltaP,Cslib.Complexity.DistNP,Cslib.Complexity.SampNP.
Main results #
Cslib.Complexity.mem_AvgP_of_mem_P: a language inPis inAvgPunder every ensemble.Cslib.Complexity.AvgP_subset_HeurP: errorless schemes yield heuristic schemes.Cslib.Complexity.AvgP_subset_AvgDeltaP: an errorless scheme run with confidenceq(n)is an errorless algorithm with failure1/(q(n)+1); similarlyCslib.Complexity.HeurP_subset_HeurDeltaP.Cslib.Complexity.AvgDeltaP_subset_HeurDeltaP.
References #
A distributional problem: a language of binary words together with an ensemble of distributions on instances Bogdanov and Trevisan, §2.1.
The language to decide.
- ens : Ensemble
The distribution of instances of each length.
A is a polynomial-time errorless heuristic scheme for L
Bogdanov and Trevisan, Definition 6, with failure bound δ = 1/(k+1)
for the unary parameter k: on the support it never answers wrongly, and on every length it fails
(outputs none) with probability at most 1/(k+1).
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime A (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encUnary) (Turing.MultiTapeTM.encOption Turing.MultiTapeTM.encBool)
The scheme runs in time polynomial in
|x|andk. - correct (n : ℕ) (x : List Bool) (k : ℕ) (b : Bool) : x ∈ (L.ens.dist n).support → A (x, k) = some b → (b = true ↔ x ∈ L.lang)
Every answer given on the support is correct.
- failure_le (n k : ℕ) : (L.ens.dist n).toOuterMeasure {x : List Bool | A (x, k) = none} ≤ (↑(k + 1))⁻¹
The failure probability on length
nis at most1/(k+1).
A is a polynomial-time heuristic scheme for L
Bogdanov and Trevisan, Definition 11: on every length it answers wrongly
with probability at most 1/(k+1) for the unary parameter k.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime A (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encUnary) Turing.MultiTapeTM.encBool
The scheme runs in time polynomial in
|x|andk. - error_le (n k : ℕ) : (L.ens.dist n).toOuterMeasure {x : List Bool | ¬(A (x, k) = true ↔ x ∈ L.lang)} ≤ (↑(k + 1))⁻¹
The error probability on length
nis at most1/(k+1).
A is a polynomial-time errorless heuristic algorithm for L with failure probability δ
Bogdanov and Trevisan, Definition 9.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime A Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encOption Turing.MultiTapeTM.encBool)
The algorithm runs in polynomial time.
- correct (n : ℕ) (x : List Bool) (b : Bool) : x ∈ (L.ens.dist n).support → A x = some b → (b = true ↔ x ∈ L.lang)
Every answer given on the support is correct.
The failure probability on length
nis at mostδ n.
A is a polynomial-time heuristic algorithm for L with error probability δ
Bogdanov and Trevisan, Definition 10.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime A Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBool
The algorithm runs in polynomial time.
The error probability on length
nis at mostδ n.
AvgP: distributional problems with a polynomial-time errorless heuristic scheme
Bogdanov and Trevisan, Definition 8.
HeurP: distributional problems with a polynomial-time heuristic scheme
Bogdanov and Trevisan, Definition 11.
Avg_δ P: distributional problems with a polynomial-time errorless heuristic algorithm of
failure probability δ Bogdanov and Trevisan, Definition 9.
Heur_δ P: distributional problems with a polynomial-time heuristic algorithm of error
probability δ Bogdanov and Trevisan, Definition 11.
DistNP: NP languages with polynomial-time computable ensembles
Bogdanov and Trevisan, §2.1.
SampNP: NP languages with polynomial-time samplable ensembles
Bogdanov and Trevisan, §2.1.
A language decidable in polynomial time is in AvgP under every ensemble.
Errorless heuristic schemes yield heuristic schemes: answer false on failure.
An errorless heuristic scheme run with confidence parameter q(n) on length n is an
errorless heuristic algorithm with failure probability 1/(q(n)+1).
A heuristic scheme run with confidence parameter q(n) on length n is a heuristic algorithm
with error probability 1/(q(n)+1).
Errorless heuristic algorithms yield heuristic algorithms with the same failure bound.