Documentation

CslibFrontier.Computability.Complexity.Classes.AverageCase.Ensemble

Distribution ensembles for average-case complexity #

An ensemble D : Cslib.Complexity.Ensemble is a family of distributions D.dist n on binary words, where D.dist n is supported on words of length exactly n. This is the ensemble notion of Bogdanov and Trevisan, §2.1 specialized to distributions on {0,1}^n, the setting of their uniform ensemble U and of the compression argument in their Claim 20; the length n is then available to algorithms as the length of the input. The source also allows D_n to be supported on words of several lengths; such ensembles are not modelled here, and no reindexing bridge is provided.

Two efficiency classes of ensembles are defined.

The uniform ensemble Cslib.Complexity.Ensemble.uniform lies in both classes.

Main definitions #

Main results #

References #

An ensemble of distributions on binary words, the n-th supported on words of length n Bogdanov and Trevisan, §2.1.

noncomputable def Cslib.Complexity.Ensemble.cdf (D : Ensemble) (x : List Bool) :

The cumulative distribution D_{|x|}({y : y ≤ x}) of an ensemble, ordering words of the same length by their binary value (equivalently, lexicographically: Cslib.BitString.binaryValue_le_iff_le).

The probability D_{|x|}({y : y < x}) of the words of length |x| below x.

The cumulative distribution is the probability below x plus that of x.

Nothing lies below a word of value 0.

Below a word of nonzero value lies the cumulative distribution of its predecessor.

The cumulative distribution at x is at most the probability below any later word of the same length.

Polynomial-time computable ensembles Bogdanov and Trevisan, Definition 2: the cumulative distribution is a ratio of two naturals, each computable in polynomial time from x and written in binary.

Polynomial-time samplable ensembles Bogdanov and Trevisan, Definition 1: a native strict-PPT program, given n in unary, samples exactly D.dist n.

The uniform ensemble U = {U_n}, with U_n uniform on {0,1}^n.

A word has probability 2^{-|x|} under the uniform ensemble.

The uniform cumulative distribution of x is (binaryValue x + 1) / 2^{|x|}.

The words of length N with value below K ≤ 2^N have uniform probability K / 2^N.

The uniform ensemble is polynomial-time computable.

The uniform ensemble is polynomial-time samplable.