Prove that if deg(v) ≤ 4 for all vertices in an (undirected) graph G = (V, E), then we can orient all edges in E such that the in-degree of every vertex is at most 2.
Proof : We already know that the sum of in-degree and out-degree of all the vertices in a directed graph is equal to the sum of degrees of all the vertices in its undirected version with equal number of edges.So, for an udirected graph with V vertices,with at most 4 degrees of each vertex, we have,
Sum of degrees ≤ 4*V ...(1)
But we also know that ,
Sum of In-degree (in directed graph) + Sum of Out-degree (in directed graph) = Sum of degrees (in undirected graph) ...(2)
Also, for a particular case in a graph we CAN have,
Sum of In-degree ≤ Sum of Out-degree ...(3)
So, for that scenario Using (2) & (3) we get,
2*Sum of In-degree (in directed graph) ≤ Sum of degrees (in undirected graph) ....(4)
Using (1) and (4) we get,
2*Sum of In-degree (in directed graph) ≤ 4*V ...(5)
Or, using (5) we can write,
Sum of In-degree (in directed graph) ≤ 2*V
( Hence Proved ) That there exists a case in which we
can orient the directed edges such that in-degree
of every vertex is at most 2.
Get Answers For Free
Most questions answered within 1 hours.