A Probabilistic Turing Machine (PTM): a deterministic 1-tape TM augmented with
two transition functions δ₀ and δ₁. At each step the machine flips a fair coin
and uses δ₀ on outcome 0 and δ₁ on outcome 1.
- blank : Γ
- inputAlpha : Set Γ
- blank_not_in_inputAlpha : self.blank ∉ self.inputAlpha
- q₀ : Q
- qAccept : Q
- qReject : Q
Instances For
Advance the PTM M by one step from configuration c using the given coin
flip: chooses δ₁ when coin = true and δ₀ otherwise. Halting configurations
(accept/reject) are fixed points.
Instances For
Run the PTM M on input w for n steps, consuming the sequence coins
of n coin flips and returning the resulting configuration.
Instances For
M accepts input w along the coin-flip branch coins of length n.
Instances For
M rejects input w along the coin-flip branch coins of length n.
Instances For
Decidability of acceptance along a fixed coin-flip branch, used to count
accepting branches via Finset.filter.
Decidability of rejection along a fixed coin-flip branch.
The number of length-n coin-flip sequences on which M accepts w.
Instances For
The number of length-n coin-flip sequences on which M rejects w.
Instances For
The probability that M accepts w when run for n steps with uniform
random coins: numAccepting / 2^n.
Instances For
The probability that M rejects w when run for n steps with uniform
random coins: numRejecting / 2^n.
Instances For
M decides the language A with error at most ε using t (|w|) coin
flips on input w: if w ∈ A then M rejects w with probability ≤ ε, and
if w ∉ A then M accepts w with probability ≤ ε.
Instances For
M runs in time t: on every input w and every coin sequence of length
t (|w|), the resulting configuration is either accepting or rejecting (i.e.
M has halted on every branch within t (|w|) steps).
Instances For
M is polynomial-time: there exist k and a runtime bound t' with t'(n) = O(n^k)
such that M halts on every coin-flip branch within t'(|w|) steps.
Instances For
The complexity class BPP: A ∈ BPP iff some polynomial-time PTM decides
A with two-sided error ε = 1/3.
Instances For
An abstract "random decider" over alphabet Γ: given input w and a
sequence of numBits w.length random bits it returns a Boolean answer. Used as
an extensional model of a randomized algorithm.
Instances For
A RandomDecider decides A with two-sided error ≤ 1/3: for w ∈ A the
fraction of random strings on which it answers false is at most 1/3, and
symmetrically for w ∉ A.
Instances For
A RandomDecider is polynomial-time if its number of random bits is
polynomially bounded in the input length.
Instances For
If A is decided by a polynomial-time RandomDecider with bounded error
1/3, then A ∈ BPP. This packages the abstract random-decider model into the
class BPP.