How Randomness Improves Algorithms