Practice Discrete Math

Algorithms / Randomized Algorithms

Least You Need to Know: Randomized Algorithms, Error Types, and Probability Amplification

Randomized-algorithm questions usually test what is guaranteed and what is merely likely. You need to distinguish Monte Carlo from Las Vegas behavior, keep one-sided and two-sided error straight, and know why repeated independent trials can drive error down.

The least you need to know

Key notation

Pr[event] probability of an event
Monte Carlo bounded time, possibly incorrect answer
Las Vegas always correct, random running time

Tiny worked example

  • Suppose a Monte Carlo primality filter says “composite” only when it has found a witness, but may occasionally say “probably prime.”
  • That is one-sided error: false negatives are possible but false positives of the other type are not.
  • Repeating the test independently makes the error probability multiply across trials.

Common mistakes

How to recognize this kind of problem

Start practice