Graph power (source code)

= Graph power
{title2=$G^j$}

The $j$th power of a <graph> joins distinct <vertices> whenever their distance in the original <graph> is at most $j$. For example, the <square of a cycle> adds <edges> connecting <vertices> two steps apart. Graph powers turn constraints on short paths into adjacency constraints.