CS G526: Advanced Algorithms and Complexity
Randomized Algorithms: Foundations
Lecture 6
|2026-08-13
Tulasimohan Molli
BITS Pilani, Hyderabad Campus
Let’s begin with a fundamental algebraic property of random vectors:
The Mod-2 Lemma
If d \neq 0, then the inner product of d and r mod 2 is balanced: \Pr\left[ d \cdot r \equiv 0 \pmod 2 \right] = \frac{1}{2}
Since d \neq 0, there exists at least one coordinate k where d_k = 1.
Let’s apply this mathematical property to verify matrix multiplication: AB = C.
The protocols we just designed are examples of randomized algorithms:
We classify randomized algorithms based on where the uncertainty lies.
| Feature | Las Vegas | Monte Carlo |
|---|---|---|
| Correctness | Always correct | Correct with probability 1 - \delta |
| Running Time | Random variable (analyze expectation) | Bounded / Deterministic |
| Error Type | None | One-sided or Two-sided |
| Primary Use | Sorting, searching, optimization | Decision problems, verification |
We can amplify success by running the algorithm k times independently.
Two-Sided Error Amplification & Randomized Complexity Classes (RP, co-RP, BPP, ZPP).
CS G526: Advanced Algorithms & ComplexityTulasimohan Molli