Lecture 5

Today we are going to look at probabilistic analysis of algorithms and some techniques for designing algorithms that use randomisation. Randomised algorithms is a big subject, which has many useful and efficient algorithms. Unfortunately, we will only scratch the surface.

We will cover

  • The hiring problem as a prototypical probabilistic problem
  • Indicator Variables
  • Linearity of expectation. Given two random variables $X$ and $Y$, then the expectation $E(X + Y) = E(X) + E(Y)$. The theorem is true for any distribution of $X$ and $Y$. This is perhaps one of the most useful theorems in probabilistic analysis of algorithms.
  • Some examples of using indicator variables including the hat problem, the birthday paradox.
  • Some randomised strategies for the hiring problem, or using randomness to avoid worst case run times.
  • The algorithm for generating random permutations uniformly. We will not cover the proof of its correctness.
  • Analysis of Hash tables including expected load factors and chain length.
  • Universal Hashing. A randomised technique to build efficient hashing functions.

Slides

The information in the slides is spread out all over the place. I plan to use the whiteboard. You are better off looking at the textbook, but take a look at

Reading Guide

The slides contain a lot of material. You are strongly advised to read the textbook.

  • Chapter 5 contains the relevant background on probabilistic analysis and randomised algorithms
  • Chapter 11 up to and including 11.3.4 has the material on hash tables. Some of this material should be revision.
  • Appendix C contains some background on probability that you might need to refer to while reading the other material.