Write code that finds a maximum flow in a directed graph, using the Ford-Fulkers
ID: 3644027 • Letter: W
Question
Write code that finds a maximum flow in a directed graph, using the Ford-Fulkersonalgorithm on capacities given as matrix
void maximum flow(int n, int s, int t, int *capacity, int *flow)
Your function has the following arguments:
- n: the number of vertices of the graph,
- s: the start vertex,
- t: the target vertex
- capacity: the matrix of edge capacities.
- flow: the matrix used to return the maximum ?ow.
The vertices are numbered from 0 to n-1, so s and t are numbers in that range. ca-
pacity, flow are a pointers to n
Explanation / Answer
the start vertex
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.