Amplify One-Sided and Two-Sided Randomized Algorithms
Choose repetition and aggregation rules and derive explicit independent-error bounds.
Assignment sources
Related exam and assignment appearances
These links mark a related idea or close version; only groups explicitly marked as exact repeats in the question map count as duplicates.
Problem
An RP algorithm accepts yes-instances with probability at least and never accepts no-instances. A BPP algorithm is correct with probability at least . For independent runs, design amplification to error at most , prove the bounds, and explain why fresh randomness and the aggregation rule matter.
Prerequisites
Know the unit definitions and how resources are measured against encoded input length. Distinguish a conditional theorem, a reduction, and an algorithm.
Hint 1
For RP, accept if any run accepts.
Hint 2
For BPP, take an odd number of runs and majority vote.
Hint 3
Apply Hoeffding or Chernoff to independent correctness indicators.
Randomized error amplification
Full solution
For RP, run the algorithm times with independent random bits and accept if any run accepts. A no-instance is still never accepted, so the one-sided guarantee is preserved. On a yes-instance all runs reject with probability at most . Thus
suffices. More generally, success probability gives failure at most .
For BPP, take an odd and output the majority answer. Let indicate that run is correct. Then the are independent, lie in , and have . Error means , a deviation of at least below its mean. Hoeffding gives
Therefore any odd
suffices. Sharper Chernoff constants are possible; the important asymptotic count is .
The runtime multiplies by , plus negligible voting time. For inverse-polynomial error , only repetitions are needed, preserving polynomial time. For exponentially small error , repetitions still preserve polynomial time for fixed .
Fresh independent random bits justify multiplying RP failure probabilities and applying concentration for BPP. Reusing the same random seed can make all outcomes identical and provide no amplification. The aggregation rule also depends on error type: “accept if any” would destroy BPP soundness because many independent false accepts accumulate; majority controls both sides. Conversely majority works for RP but wastes its perfect soundness and gives a weaker analysis than the OR rule.
If individual success is only , majority cannot amplify without first creating a positive bias. The strict gap above one half is essential.
Checkpoints
Check both logical directions, halting of every relevant branch, and that output length and construction time are polynomial in the encoded input length.
Common mistakes
- Multiplying probabilities without independence.
- Using OR aggregation for a two-sided algorithm.
- Claiming majority amplifies success exactly .
Sources and verification
- Merged summary, pp. 89-94 and p. 96
- Arora-Barak draft, sec. 7.1
- Papadimitriou, ch. 11
- Catalog mapping:
data/exercises.json; statements and solutions are independently written; personal submissions are non-authoritative.
Provenance and confidence
The exercise is an original synthesis. Confidence reflects verification of the mathematical claim against the textbook sources listed above; course sources are used only where direct coverage is identified.
Open in the visualization gallery: Randomized error amplification