P4.1 Randomized Algorithms

Algorithm: We assign each vertex independently and uniformly one of the colors and keep only the valid edges (edges that have different colors on the two ends) We repeat this step until we find a solution such that Proof: we define event edge has same colors on both ends edge has different colors on both ends since the colors of the vertices are chosen indepently and uniformly
Let be the number of edges that have different colors on both ends
Time analysis: Each trial takes (we assign each vertex a color and check each edges) Let the number of repetitions of the trials with We know each trial succeeds with probability then is geometric distributed with