# graph-theory problem about outdegree and indegree

Let g be directed graph with n vertices . Let if we remove directions in graph g (hypothesis).then we have undirected graph $k_n$. prove that : $(od(v_1))^2+(od(v_2))^2+ ... + (od(v_n))^2 = (id(v_1))^2+(id(v_2))^2+ ... + (id(v_n))^2$

od is outdegree and id is indegree

-
This is the 4th graph theory problem (one you deleted) you've asked about in less than 1 day. There's nothing wrong with asking questions, but it gets to the point where it seems like you're just putting up your whole homework. So, if you want help, please tell us what you have attempted first. –  Graphth Oct 20 '12 at 15:24

(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_o(v_k)\Big)\Big(\deg_i(v_k)+\deg_i(v_k)\Big)\;,$$ and since the undirected graph is $K_n$, you know exactly what $\deg_i(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.

-
I think "someone" should accept this as answer. –  Hendrik Jan Nov 10 '12 at 13:42