Creating Randomized Algorithms