Error reduction for a randomized algorithm Created 2026-09-24 Updated 2026-10-18
Independent repetitions reduce a randomized algorithm's error probability while preserving polynomial running time.
The combining rule depends on the error orientation. For one-sided error with false acceptance probability at most , reject as soon as any trial rejects and accept only if every trial accepts. For independent trials on the same fixed negative input, false acceptance has probability at most . The protected positive inputs still always accept. If false rejection is the possible mistake instead, accept as soon as any trial accepts. This uses the decisive answer rather than a majority vote.
For constant , grows only logarithmically in to achieve error at most . A polynomial number of trials preserves a polynomial-time algorithm's running-time bound. Independence matters: repeating one answer, or evaluating at the same random point each time, supplies no new evidence. The independent repetition of a polynomial identity test gives an exact -outcome example.
Repeat the random evaluation test for a polynomial identity with fresh independent random variables, keeping the same fixed polynomial. Reject as soon as any polynomial evaluation is nonzero; accept only if all values vanish. An identity is always accepted, preserving one-sided error. If a nonzero polynomial has single-trial false acceptance probability , independence gives . The Schwartz-Zippel lemma bounds this by when .
For over the finite field , two uniform independent choices have equally likely ordered outcomes, each with probability . Both polynomial evaluations are zero only at . Hence false acceptance falls from in one trial to in two trials, and correct rejection rises from to .
Four of the twenty-five independent pairs falsely accept the nonidentity
. The orange cells have both coordinates among the polynomial roots one and two of in the finite field . Every blue cell supplies at least one nonzero witness. The full grid enumerates exact outcomes under independence and a uniform distribution on a finite set; it is not a simulation. Details.If the second choice reuses the first, the pair is and only five diagonal outcomes are possible. Two still falsely accept, so the error remains . Choosing fresh independent points is precisely what makes the full -cell grid and the product of probabilities valid. For a target error , this example needsThe ceiling function makes the trial count an integer. Four trials give , while six give ; five still give , so six is the first count below one percent. This is an exact error guarantee for each run on , rather than an observed success rate.
Randomized algorithm Created 2026-09-24 Updated 2026-10-18
For a fixed input, the random bits can change the path taken by a randomized algorithm, its output, or its running time. Specify the distribution of those choices and which guarantee is required: one-sided error permits mistakes of only one kind, whereas ZPP requires a correct answer and bounds the expected running time. Polynomial identity testing makes this distinction concrete: choosing different field elements changes whether a nonidentity is detected.
A uniform distribution on a finite set must be implemented faithfully. To choose uniformly from using fair independent bits, read three bits as a number from zero to seven, discard five through seven, and repeat until a permitted value appears. Each retained value has the same chance. Taking the three-bit number modulo five instead would give zero, one and two twice as many preimages as three and four, invalidating a calculation that assumes equal chances.
