I'm having some difficulty with the following question:
Given an undirected graph G = (V,E), an orientation of G is a directed graph G' = (V,E'),
such that for each undirected edge {u,v} in E, exactly one of the directed edges (u,v) and
(v,u) is in E'. An orientation is called acyclic if the graph G' contains no directed cycles.
You are given an undirected graph G and a function D : V-> N. Design an algorithm that
decides whether G has an acyclic orientation G' such that for each v in V , its out-degree (the
number of edges going out of it) in G' is D(v).
Does anyone have a direction or hint?
Thanks in advance!
