Documentation

Complexitylib.Classes.Randomized

Randomized complexity classes #

This file defines the randomized complexity classes BPP, RP, coRP, ZPP, and PP, along with the time-parameterized classes BPTIME, RTIME, and PPTIME, and the predicate NTM.IsPPT.

A PTM (probabilistic Turing machine) is an NTM where the two transition functions are selected uniformly at random. Acceptance probability is defined via NTM.acceptProb.

Helper predicates #

The acceptance-probability conditions shared across classes are factored into NTM.AcceptsWithProb (lower-bounding acceptance on yes-instances) and NTM.RejectsWithProb (upper-bounding acceptance on no-instances).

def Complexity.NTM.AcceptsWithProb {n : } (tm : NTM n) (L : Language) (T : ) (c : ) :

The PTM accepts every x ∈ L with probability at least c within T(|x|) steps.

Equations
Instances For
    def Complexity.NTM.RejectsWithProb {n : } (tm : NTM n) (L : Language) (T : ) (s : ) :

    The PTM accepts every x ∉ L with probability at most s within T(|x|) steps.

    Equations
    Instances For
      def Complexity.NTM.IsPPT {n : } (tm : NTM n) :

      An NTM is probabilistic polynomial-time (PPT) if there exist a time bound f and degree d such that every computation path halts within f(|x|) steps and f(n) = O(n^d). This is the central notion in cryptographic security definitions.

      Equations
      Instances For

        BPTIME(T) is the class of languages decidable by a PTM in time O(T(n)) with two-sided bounded error (accept probability ≥ 2/3 on yes-instances, ≤ 1/3 on no-instances).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          BPP is the class of languages decidable by a PTM in polynomial time with two-sided bounded error: BPP = ⋃_k BPTIME(n^k).

          Equations
          Instances For

            RTIME(T) is the class of languages decidable by a PTM in time O(T(n)) with one-sided error: yes-instances accepted with probability ≥ 1/2, no-instances never accepted (accept probability 0).

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              RP is the class of languages decidable by a PTM in polynomial time with one-sided error: RP = ⋃_k RTIME(n^k).

              Equations
              Instances For

                coRP is the class of languages whose complements are in RP. Equivalently: yes-instances always accepted (probability 1), no-instances accepted with probability ≤ 1/2.

                Equations
                Instances For

                  ZPP (zero-error probabilistic polynomial time) is RP ∩ coRP. A language is in ZPP iff it has a PTM with zero-error expected polynomial running time.

                  Equations
                  Instances For

                    PPTIME(T) is the class of languages decidable by a PTM in time O(T(n)) with unbounded error: x ∈ L iff the PTM accepts with probability strictly greater than 1/2.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      PP (probabilistic polynomial time) is the class of languages decidable by a PTM in polynomial time with unbounded error: PP = ⋃_k PPTIME(n^k).

                      Equations
                      Instances For