Show greedy max cut achieves >= half optimal
Analyze the show greedy max cut achieves >= half optimal.
Examples
Input: "test_input_1"
Output: "output_1"
Input: "test_input_2"
Output: "output_2"
Hints
Recall that the Max-Cut problem aims to partition the vertices of a graph into two sets such that the number of edges between the sets is maximized.
Consider the greedy algorithm where you iteratively assign vertices to one of the two sets based on which choice increases the cut size the most at each step.
Prove that this greedy approach guarantees a cut size of at least half the optimal solution by analyzing the incremental gain at each step and comparing it to the total possible gain.
Show greedy max cut achieves >= half optimal
Analyze the show greedy max cut achieves >= half optimal.