11. Randomized Alg Fundamentals

In complexity theory: only access to random bit. Can use the sum of of them to get . Can set each digit to random bit to get uniform distribution.

Indirect approach for expected value:

Monte Carlo

Def.: correctness is random, runtime is not.

Can only reduce error if:

  • One-sided error (ex. primality test: only YES can have error)
  • Error probability < 1/2

For MC algorithm that chooses majority:

Las Vegas

Def.: runtime is random, correctness is not algorithm that’s always correct but sometimes outputs “I don’t know” if takes too long (reverse by repeating until answer). Can be converted into Monte Carlo by returning random value.

Probability that we get “???” times for a LV algorithm , which is correct

Optimization

If it calls the algorithm :