There are two ways to define a probabilistic Turing Machine:
- A Turing Machine that can toss coins during its computation.
- A deterministic Turing Machine that takes two inputs: $(x,r)$, where $x$ is the original input and $r$ is taken from a distribution of coin tosses.
For example, Arora and Barak give an "alternative definition" for $\mathrm{BPP}$:
Definition 7.4 (BPP, alternative definition)
$\mathrm{BPP}$ contains a language $L$ if there exists a polynomial-time TM $M$ and a polynomial $p\colon \mathbb{N}\to \mathbb{N}$ such that for every $x \in \{ 0, 1 \}^{∗}$, $\Pr_{r \in \{ 0,1 \}^{p(|x|)}} [M (x, r) = L(x)]\geq 2 / 3 $.
My problem is formulating a similar alternative definition for $\mathrm{ZPP}$.
$\mathrm{ZPP}$ can be defined as the class of languages with a randomized algorithm that always outputs the correct answer, and for every input the expected running time of the algorithm is polynomial.
If we want a similar alternative definition for $\mathrm{ZPP}$, then $r$ should be an infinite stream because the algorithm may need to use any number of coin tosses before it finishes (with small probability).
Is there any problem with a Turing Machine that takes as a second input an infinite long stream?