>% 1) the Lagrange dual of the two-way partitioning problem</span>
<span class="comment">%               maximize    -sum(nu)</span>
<span class="comment">%                   s.t.    W + diag(nu) &gt;= 0</span>
<span class="comment">% 2) the SDP relaxation of the two-way partitioning problem</span>
<span class="comment">%               minimize    trace(WX)</span>
<span class="comment">%                   s.t.    X &gt;= 0</span>
<span class="comment">%                           X_ii = 1</span>

<span class