I am trying to consider the conditions under which you can win the following directed graph game:
Directed graph game: At the start of the game, you are given a directed, acyclic graph $G$ with integer values marked on each node. During each round, you pick any edge $a\rightarrow b$ in the graph; the value at node $a$ is decreased by one, and the value of node $b$ is increased by one.
You win if at any point the labels of the nodes are all non-negative.
I am wondering what are the conditions on the initial values of the nodes under which this game is possible to win.As a special case, I am currently considering only DAGs which are trees. For example, if you have a three-node tree with $a\rightarrow b$ and $a\rightarrow c$, you can win the game just if every subset of nodes containing $a$ has a non-negative sum. But I am having trouble generalizing from this case.
For the special case, which I assume (at least for now) is the case of a rooted directed tree with edges directed away from the root, we can solve it for each subtree and then solve it for the whole tree. We define a function on the subtrees recursively. Let $$r(subtree)=n_{root}-\sum d(branch_i),$$ and then let $$d(subtree)=\left\{\begin{array}[cl] \mbox{}0 & r(subtree) \ge 0 \\ -r(subtree) & \text{otherwise.}\end{array}\right.$$
$d(subtree)$ measures how much needs to be added to the subtree to win. $r(subtree)$ measures how much will remain at the root after you make all the other subtrees win, and $d(subtree)$ checks to see whether what remains will be positive, then you don't need to add anymore, so $d(subtree)$ is zero, or whether we will have gone negative, so we need to add more to make the root nonnegative. Note that leaves have no branches, so $r(leaf)=n_{leaf} - 0 =n_{leaf}$.
I'm not sure about more general cases right now, and I don't know if you've already come up with this, but here are my first thoughts about the problem.
Edit:
Note that we can modify this to work for any directed graph with underlying undirected graph being acyclic. We can repeatedly prune leaves. If a leaf has its edge entering it, then we add enough to make it nonnegative, and delete the leaf. If a leaf has its edge leaving it, if the leaf is negative, it is impossible to win. If the leaf is nonnegative, make the value at the leaf zero and delete the leaf and recurse.
Note that these are algorithmic strategies to check whether the game is winnable, I'm not sure if they can be reduced to some set of simple equations.