This question is about the Application of Network Flows to Project Selection. The project selection problem is the problem of which set of projects to select to maximise revenue. Each project has a revenue (positive or negative). Projects also have prerequisites which are other projects. A set of projects A is feasible if the prerequisite of every project in A is also in A. The project selection problem is to choose a feasible set of projects with maximal revenue. A project selection problem can be transformed into a Network Flow problem, and solved using the Ford Fulkerson algorithm. Consider the following set of projects:
Name, Revenue, Pre-requisites
A, 6, D
B, 9, D
C,-8
D, -12
E, 7, C D
I am confused here as C and D have negative revenues and I am not sure how to reduce this problem to a network flow problem.