Solution (source code)

= Solution

Each row of the <oriented incidence matrix> records one signed endpoint difference, hence
$$
\boxed{s(\theta)=\|D\theta\|_1.}
$$
Reversing an <edge> changes the sign of its row, and permuting the <edges> permutes rows; neither operation changes the sum of absolute differences. Thus the <graph total variation> is independent of the chosen orientation and ordering. If $D\theta=0$, values agree at the endpoints of every <edge>. Any two <graph vertices> of a <connected graph> are joined by a <graph path>, so their values agree. Therefore \b[$\ker D=\operatorname{span}\{\mathbf1\}$].