Advanced Topic 42 of 51 Theory & Discrete Math
Randomized Complexity
Classes like BPP using probabilistic machines.
How it works
Randomized complexity classes capture problems solvable by algorithms that flip coins. RP and co-RP have one-sided error, BPP allows two-sided error bounded away from one half, such as one third, and ZPP has zero error with expected polynomial running time. Error can be reduced exponentially by repetition, so any constant bound works. BPP is contained in P with advice, and it is widely believed that P equals BPP through derandomization using pseudorandom generators.
Where it is used
Randomized algorithms are used for primality testing with Miller-Rabin, hashing, sampling, load balancing, polynomial identity testing and approximate counting.
Common pitfall
Randomness helps simplicity and speed, but it is unknown whether it adds power beyond P. Error probability must be analyzed, and reusing random bits across runs can break independence. Sources of randomness in practice are pseudorandom, which can break guarantees if flawed. Do not confuse average-case analysis over inputs with randomized algorithms, which are analyzed over their own coin flips for every input.
Where it fits in the course
Randomized Complexity is topic 42 of 51 in Theory & Discrete Math, rated Advanced. It follows Space Complexity Classes. The next topic is Approximation and Inapproximability.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Theory & Discrete Math quiz.
- Explore the Growth Rates (Big-O) visualizer: Chart O(1) to O(n!) as n grows.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Theory & Discrete Math quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Randomized Complexity?
Where do people use Randomized Complexity?
What is the most common mistake with Randomized Complexity?
What should I learn before this topic?
How can I practice it?
Is Randomized Complexity hard to learn?
How long does it take to learn Randomized Complexity?
Which topics are related to Randomized Complexity?
What should I study after Randomized Complexity?
Related topics
- Space Complexity Classes (Theory & Discrete Math)
- Approximation and Inapproximability (Theory & Discrete Math)
- SAT Problem (Theory & Discrete Math)
- Parameterized Complexity (Theory & Discrete Math)
- Time Complexity (Algorithms)
- Space Complexity (Algorithms)
- Cyclomatic Complexity (Software Engineering)