Documentation

CslibFrontier.Computability.Complexity.Classes.FPAUS

Fully polynomial almost uniform samplers #

Jerrum, Valiant and Vazirani's generator may return none. Every successful output belongs to the witness set. Its individual probability approximates a common positive reference mass φ(x) multiplicatively, and the probability of success is at least one half on nonempty instances [JerrumValiantVazirani1986, §6, p. 181]. Time is polynomial in the instance length and the unary precision q. The total-variation estimates below are used in the reductions between this generator and approximate counting.

Main definitions #

Main results #

References #

The uniform law on the witnesses W, as some w; the point mass at none when there are none.

structure Cslib.Complexity.IsFPAUS {α : Type} (enc : α ↪ List Bool) (W : α → Finset (List Bool)) (S : α → ℕ → ProbComp (Option (List Bool))) :

A fully polynomial almost uniform generator in the sense of Jerrum, Valiant and Vazirani [JerrumValiantVazirani1986, §6, p. 181]. The unary input q asks for dyadic relative error ε = 2 ^ (-(q+1)). Every positive tolerance below one admits a smaller such tolerance with q = O(log (1/ε)). The common reference mass may depend on the instance.

def Cslib.Complexity.FPAUS {α : Type} (enc : α ↪ List Bool) :
Set (α → Finset (List Bool))

The witness families with a fully polynomial almost uniform sampler, on instances encoded by enc.

Point masses of the ideal law on successful outputs.

Nonempty witness sets have no ideal failure mass.

The probability that the uniform witness lies in E is the relative number of witnesses in E.

theorem Cslib.Complexity.closeTo_uniformWitness_of_le {μ : PMF (Option (List Bool))} {W : Finset (List Bool)} {ε : ℝ} (hε : 0 ≤ ε) (hle : ∀ v ∈ W, ENNReal.ofReal ((1 - ε) / ↑W.card) ≤ μ (some v)) (hempty : W = ∅ → ∀ (v : List Bool), μ (some v) = 0) :

Closeness to the uniform witness law from pointwise lower bounds. A law on optional witnesses giving every witness of W probability at least (1 - ε) / |W|, and no witness at all when W is empty, is within statistical distance ε of uniformWitness W.