ing">w(n)</span> <span class="string">h(n)</span> <span class="string">W</span> <span class="string">H</span>
        minimize ( W + H )
        w &gt;= 0;
        h &gt;= 0;
        x(leafs_H) &gt;= rho;
        y(leafs_V) &gt;= rho;
        x(roots_H) + w(roots_H) + rho &lt;= W;
        y(roots_V) + h(roots_V) + rho &lt;= H;
        <span class="keyword">for</span> i=1:length(nodes_H)
            node = nodes_H(i);
            c = adj_H(node,:);
            prnt = find(c&gt;0)';
            m = length(prn