Combining verifiers #
The counting classes #P, PP, RP and BPP are all defined through polynomial-time functions
V : α × List Bool → Bool that read an instance and a string of bits, and through the number
Cslib.Complexity.acceptCount V a n of strings of length n that V accepts together with a.
This file provides verifiers built from other verifiers, each with its polynomial-time rule
(registered with fun_prop) and the number of strings it accepts.
Cslib.Complexity.andVerifier k V₁ V₂runsV₁on the firstk abits andV₂on the rest, and accepts when both accept. The number of strings it accepts is the product of the numbers thatV₁andV₂accept (Cslib.Complexity.acceptCount_andVerifier). WithV₂accepting everything, it multiplies the count by a power of two.Cslib.Complexity.padVerifier k VrunsVon the firstk abits and requires the rest to befalse(Cslib.Complexity.allFalseVerifier), so it accepts as many strings of any lengthn ≥ k aasVaccepts of lengthk a(Cslib.Complexity.acceptCount_padVerifier_of_le).Cslib.Complexity.orVerifier k V₁ V₂accepts when either accepts; the rejected strings multiply (Cslib.Complexity.acceptCount_orVerifier).Cslib.Complexity.selectVerifier V₀ V₁lets the first bit choose betweenV₀andV₁on the remaining bits; the counts add (Cslib.Complexity.acceptCount_selectVerifier).Cslib.Complexity.sumVerifier k₁ k₂ V₁ V₂selects betweenV₁andV₂padded to a common length, so it adds counts taken at different lengthsk₁ aandk₂ a(Cslib.Complexity.acceptCount_sumVerifier). This is how#Pis closed under addition.
Running two verifiers on disjoint parts of the random string is the usual way to combine independent random choices Arora and Barak, Chapters 7 and 17.
Main definitions #
Cslib.Complexity.allFalseVerifier,Cslib.Complexity.andVerifier,Cslib.Complexity.padVerifier,Cslib.Complexity.orVerifier,Cslib.Complexity.selectVerifier,Cslib.Complexity.sumVerifier.
Main results #
Cslib.Complexity.acceptCount_andVerifier,Cslib.Complexity.acceptCount_padVerifier_of_le,Cslib.Complexity.acceptCount_orVerifier,Cslib.Complexity.acceptCount_selectVerifier,Cslib.Complexity.acceptCount_sumVerifier: counts of the combined verifiers.Cslib.Complexity.computableInPolyTime_andVerifier,Cslib.Complexity.computableInPolyTime_padVerifier,Cslib.Complexity.computableInPolyTime_orVerifier,Cslib.Complexity.computableInPolyTime_selectVerifier,Cslib.Complexity.computableInPolyTime_sumVerifier: the combined verifiers are polynomial-time.
References #
The string of falses #
allFalseVerifier accepts one string of each length.
allFalseVerifier is polynomial-time.
Conjunction on disjoint parts of the string #
Independent runs multiply: on strings of length k a + n, andVerifier k V₁ V₂ accepts
the product of the numbers of strings that V₁ and V₂ accept.
Ignoring the bits after the first k a multiplies the number of accepted strings by a power
of two.
Independent conjunction of plain polynomial-time verifiers is polynomial-time.
Padding #
Padding: on strings of any length n ≥ k a, padVerifier k V accepts as many strings as
V accepts of length k a.
Padding a plain polynomial-time verifier is polynomial-time.
Disjunction on disjoint parts of the string #
Independent rejections multiply: on strings of length k a + n, orVerifier k V₁ V₂
rejects the product of the numbers of strings that V₁ and V₂ reject.
Independent disjunction of plain polynomial-time verifiers is polynomial-time.
Choosing by the first bit #
Choices add: on strings of length n + 1, selectVerifier V₀ V₁ accepts the sum of the
numbers of strings of length n that V₀ and V₁ accept.
Selection by the first bit preserves plain polynomial-time verification.
Sums of two counts #
Counts add: on strings of length k₁ a + k₂ a + 1, sumVerifier k₁ k₂ V₁ V₂ accepts the
sum of the numbers of strings that V₁ accepts of length k₁ a and V₂ of length k₂ a.
The sum of two plain polynomial-time verifiers is polynomial-time.