arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

9.3. Quiz

This section provides exercises for better understanding in network flow

hashtag
Augmenting Paths

An augmenting path is a directed path between the source and target vertices; no need to worry about residuals for this quiz.

  • Create the NetworkFlowQuizarrow-up-right class under the package.

  • Update the getAugmentingPaths() method that returns all augmenting paths between the specific source and target vertices using depth-first traverse.

hashtag
Extra Credit

  • Create the NetworkFlowQuizExtra class and update the getAugmentingPaths() method such that it uses breadth-first traverse instead of depth-first traverse.

hashtag
Simplex Algorithm

Given the following graph where there are two source vertices, and , and two target vertices, and , define the objective functions and their constraints to find the (1) max-flow and (2) min-cut using the simplex algorithm:

hashtag
Report

Write quiz8 that includes:

  • The worst-case complexity of your getAugmentingPaths() method.

  • An explanation of when the depth-first traverse is preferred over the breadth-first traverse and vice versa to find augmenting paths.

  • An objective function and is constraints to find max-flow.

An objective function and is constraints to find min-cut.

S1S_1S1​
S2S_2S2​
T1T_1T1​
T2T_2T2​
graph.flowarrow-up-right