de in V</span>

<span class="comment">% find the root(s) for each tree</span>
roots_H = find(par_H==0);
roots_V = find(par_V==0);

<span class="comment">% find all non-root nodes for each tree</span>
nodes_H = find(par_H&gt;0);
nodes_V = find(par_V&gt;0);

<span class="comment">% find leaf(s) for each tree</span>
leafs_H = find(chi_H==0);
leafs_V = find(chi_V==0);

cvx_begin <span class="string">quiet</span>
        variables <span class="string">x(n)</span> <span class="string">y(n)</span> <span class="str