Random and Greedy algorithms