Using the maximum flow algorithm, I have to determine if there exists a $3\times 3$ matrix $P$ (such that all elements are $\geq 0$). I'm given:
- The maximum values of the row sums
- The column sums
- The maximum value each element can take
I have a pretty good idea of how to build the network:
- Have three vertices $r_1, r_2, r_3$ represent the rows and have another three vertices $c_1, c_2, c_3$ represent the columns, with the capacity of each arc from $r_i$ to $c_j$ representing the maximum value of $i,j$-th entry in $P$
- Have a source $s$ with arcs between $s$ and each $r_i$ representing the maximum possible value for the sum of that row
- Have a sink $t$ with edges between each $c_j$ and $t$ representing the sum of that column
However, I'm at a loss on how to use the algorithm to check if such a $P$ can actually exist.