Determining if we can balance these graph weights
This solves the problem if the function $f$ is not constrained to the edges of a spanning tree.

You can think of your problem as a flow problem where each vertex $u\in V$ "generates" $w(u)$ units of flow and "sinks" 1 unit of flow.

To reduce this problem to a standard flow formulation you can create a new directed graph $G' = (V', E')$ in which each edge $e \in E'$ has a capacity $c(e)$:


$V' = V \cup \{s,t\}$,  where $s$ is a new "source" vertex and $t$ is a new "sink" vertex. 
For each $v \in V$, add to $E'$ the edge $(s,v)$ with capacity $w(u)$.
For each edge $e \in E$, add $e$ to $E'$ with capacity $c(e) = w(e)$.
For each $v \in V$ add to $E'$ the edge $(v,t)$ with capacity $1$.


Compute the value $f^*$ maximum flow from $s$ to $t$ in $G'$. If $f^* = |V|$ then your all units of flow can be generated and sunk (one unit from each vertex $u \in V$), therefore your problem problem admits a solution.
If $f^* &lt; |V|$ your problem admits no solution (to see this you can show that you can convert any feasible solution to your original problem to a flow of $|V|$ in $G'$).