Maxcut and Derandomization

Cut - A partition of vertices into 22 disjoint sets and value of the cut is the weight of all edges crossing the cut.

MAXCUT\text{MAXCUT}: Given a graph G=(V,E)G = (V, E), such that all the weight of edges in EE is 11, find the maximum value of a cut attainable in GG.

Randomized Algorithm to Approximate

This problem is NP-hard, but we can try approximating using randomness. We take each vertex in VV, and with probability 12\frac{1}{2} put it in AA, else put it in BB .

Theorem - Let G=(V,E)G = (V, E) be an undirected graph on nn vertices and mm edges. There exists a partition of VV into disjoint sets AA and BB such that the cut value is at least m2\frac{m}{2}.
Proof - We make use of the approach mentioned above, and name the edges e1,e2,,eme_{1}, e_{2}, \dots, e_{m}
We define XiX_{i} for each edge in the set

Xi={1if edge i connects A to B0otherwiseX_{i} = \begin{cases} 1 & \text{if edge } i \text{ connects } A \text{ to } B \\ 0 & \text{otherwise} \end{cases}
P[Xi=1]=P[Endpoints are in different sets]=12\mathbb{P}[X_{i}= 1] = \mathbb{P}[\text{Endpoints are in different sets}] = \frac{1}{2}

Hence,

E[Xi]=12\mathbb{E}[X_{i}] = \frac{1}{2}
E[Cut(A,B)]=E[i=1mXi]=i=1mE[Xi]=m2\mathbb{E}[|Cut(A, B)|] = \mathbb{E}\left[\sum\limits_{i=1}^{m}X_{i}\right] = \sum\limits_{i=1}^{m}\mathbb{E}[X_{i}] = \frac{m}{2}

Since the expected value is m2\frac{m}{2}, there exists a partition A,BA, B such that at least m2\frac{m}{2} edges connect AA to BB (proven using reverse markov).

Expected number of trials to find cut value m2\geq \frac{m}{2}

Take pp to be the probability that a random cut has m2\geq \frac{m}{2} edges.

m2=E[Cut(A,B)]=im21iP[Cut(A,B)=i]+im2iP[Cut(A,B)=i](m21)(1p)+mp=m21mp2+p+mp    p1m2+1\begin{aligned} \frac{m}{2} &= \mathbb{E}[|Cut(A, B)|]\\ &= \sum\limits_{i\leq \frac{m}{2} - 1} i \cdot \mathbb{P}[|Cut(A, B)| = i] + \sum\limits_{i \geq \frac{m}{2}} i \cdot \mathbb{P}[|Cut(A, B)| = i]\\ & \leq \left(\frac{m}{2} - 1\right)\cdot (1 - p) + m \cdot p\\ &= \frac{m}{2}- 1 - \frac{mp}{2} + p + mp\\ \implies & p \geq \frac{1}{\frac{m}{2}+ 1} \end{aligned}

Therefore, the expected number of trials is 1pm2+1\frac{1}{p} \leq \frac{m}{2} +1.

Derandomization using Conditional Expectation

Instead of placing vertices in AA or BB uniformly and independently like the earlier method, we now place vertices in a deterministic way, one at a time in an arbitrary order v1,v2,,vnv_{1}, v_{2}, \dots, v_{n}.

Define xix_{i} to be the set where viv_{i} is placed, xi{A,B}x_{i} \in \{A, B\}.

Suppose the first kk vertices are already placed. We then define the expected value of the cut as randomizing over the nkn - k vertices left, while fixing the first kk.

E[Cut(A,B)x1,x2,,xk]\mathbb{E}[|Cut(A, B)| | x_{1}, x_{2}, \dots, x_{k}]

Algorithm -
Given kk vertices have been placed, we look on which value of xk+1x_{k+1} gives a higher expected value, and place the k+1k + 1 vertex in that set. i.e, find the value of xk+1x_{k+1} such that -

E[Cut(A,B)x1,,xk]E[Cut(A,B)x1,,xk,xk+1]\mathbb{E}[|Cut(A,B)| | x_{1}, \dots, x_{k}] \leq \mathbb{E}[|Cut(A, B)|| x_{1}, \dots, x_{k}, x_{k+1}]

We claim this algorithm will give us a cut of size m2\geq \frac{m}{2} by proving using induction.

Inductive Proof

Base Case

E[Cut(A,B)]=E[Cut(A,B)x1]\mathbb{E}[|Cut(A, B)|] = \mathbb{E}[|Cut(A, B)|| x_{1}]

Doesn’t matter which set you put v1v_{1} in, as the case is symmetric.

Induction Step

We need to show that

E[Cut(A,B)x1,,xk]E[Cut(A,B)x1,,xk,xk+1]\mathbb{E}[|Cut(A,B)| | x_{1}, \dots, x_{k}] \leq \mathbb{E}[|Cut(A, B)|| x_{1}, \dots, x_{k}, x_{k+1}]

If we placed vk+1v_{k+1} randomly in one of the sets A,BA, B, then we’d get

E[Cut(A,B)x1,,xk,xk+1]=12E[Cut(A,B)x1,,xk,Yk+1=A]+12E[Cut(A,B)x1,,xk,Yk+1=B]max{I,II}\begin{aligned} \mathbb{E}[|Cut(A, B) || x_{1}, \dots, x_{k}, x_{k+1}] &= \frac{1}{2} \mathbb{E}[|Cut(A, B)||x_{1}, \dots, x_{k}, Y_{k+1} = A]\\ &+ \frac{1}{2} \mathbb{E}[|Cut(A, B)||x_{1}, \dots, x_{k}, Y_{k+1} = B]\\ &\leq \max\{I, II\} \end{aligned}

where

I=E[Cut(A,B)x1,,xk,Yk+1=A]I = \mathbb{E}[|Cut(A, B)||x_{1}, \dots, x_{k}, Y_{k+1} = A]

and

II=E[Cut(A,B)x1,,xk,Yk+1=B]II = \mathbb{E}[|Cut(A, B)||x_{1}, \dots, x_{k}, Y_{k+1} = B]

If we compute I,III, II, we can just take the max of them, and increase our expected value accordingly.

Since we start with an expected value m2\frac{m}{2}, and only increase as we place more and more vertices, we’ll end up with a deterministic cut size m2\geq \frac{m}{2}.

Published Feb 2, 2023