{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lab2 - CSE 542 Advanced Data Structures and Algorithms Lab...

This preview shows pages 1–2. Sign up to view the full content.

- 1 - Recall and follow the General notes from lab 1. This lab has two parts. In the first part you will be evaluating the performance of the augmenting path method for the max flow problem. In the second part, you will be implementing an algorithm for a generalization of the max flow problem in which edges may have minimum flow requirements . In this version of the problem, each edge e has a minimum flow requirement minflo ( e ), and we are interested in a maximum flow for which every edge e , satisfies the additional constraint f ( e ) minflo ( e ). The problem can be solved in two steps. 1. Find a feasible flow, meaning any flow for which every edge e satisfies f ( e ) minflo ( e ). 2. Continue adding flow from source to sink, while ensuring that the flow on every edge stays at least as large as its minimum flow requirement. The second part can be implemented using the augmenting path method described in class, with a modified definition of the residual capacity. For an edge e =( u , v ), we define res ( u , v ) = cap ( u , v ) f (e) (the same as before) and res ( v , u ) = f ( u , v ) minflow ( e ), since if we increase the flow from v to u by more than this amount, we will violate the minimum flow requirement for e . We can find a feasible flow, by repeating the following step until every edge e has f ( e ) minflo ( e ) Select an edge e =( u , v ) with f ( e )< minflo ( e ) and do one of the following. Find a simple path from v to u (that does not use the edge e ) in which each edge has positive residual capacity and add enough flow to the cycle consisting of this path plus ( u , v ) to saturate the path.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

lab2 - CSE 542 Advanced Data Structures and Algorithms Lab...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online