graph-theory problem about outdegree and indegree

531 Views Asked by At

Let $G$ be a directed graph with $n$ vertices. Assume that if we forget the directions of the edges of $G$, then we obtain the complete undirected graph $K_n$. Let $v_1, v_2, \ldots, v_n$ be the $n$ vertices of $G$. Prove that: $(od(v_1))^2+(od(v_2))^2+ \cdots + (od(v_n))^2 = (id(v_1))^2+(id(v_2))^2+ \cdots + (id(v_n))^2$ Here, "od" means "outdegree" and "id" means "indegree".

1

There are 1 best solutions below

0
On BEST ANSWER

(I prefer to use $\deg_o$ and $\deg_i$ for the out-degree and in-degree.)

HINT: Let the vertices be $v_1,\dots,v_n$; you want to prove that $$\sum_{k=1}^n\big(\deg_o(v_k)\big)^2=\sum_{k=1}^n\big(\deg_i(v_k)\big)^2\;,$$ or, equivalently, that $$\sum_{k=1}^n\left(\big(\deg_o(v_k)\big)^2-\big(\deg_i(v_k)\big)^2\right)=0\;.$$

Now $$\sum_{k=1}^n\left(\big(\deg_o(v_k)\big)^2-\big(\deg_i(v_k)\big)^2\right)=\sum_{k=1}^n\Big(\deg_o(v_k)-\deg_i(v_k)\Big)\Big(\deg_o(v_k)+\deg_i(v_k)\Big)\;,$$ and since the undirected graph is $K_n$, you know exactly what $\deg_o(v_k)+\deg_i(v_k)$ is. You should now be able to reduce the problem to evaluating the sum

$$\sum_{k=1}^n\Big(\deg_o(v_k)-\deg_i(v_k)\Big)=\sum_{k=1}^n\deg_o(v_k)-\sum_{k=1}^n\deg_i(v_k)\;,$$ which is very easy if you just think about what that last difference of sums really represents.