1 / 15

Problem Statement

Network Flow : Task Allocation Using Bipartite Match Presented by Adnan Rahath Khan Sk Kajal Arefin Imon. Problem Statement. Using Network Flow Algorithm (Ford Fulkerson and Edmond Karp) to solve maximum task assignment. Input : A bipartite graph with nodes representing tasks and employees.

asher
Download Presentation

Problem Statement

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Flow : Task Allocation Using Bipartite Match Presented byAdnanRahath KhanSkKajalArefinImon

  2. Problem Statement • Using Network Flow Algorithm (Ford Fulkerson and Edmond Karp) to solve maximum task assignment. • Input: A bipartite graph with nodes representing tasks and employees. • Output: Find maximum assignment among employees and tasks

  3. Maximum Task Assignment using Network Flow Person Tasks 0 2 1 3

  4. Using Network Flow 0 2 1 1 1 1 5 4 1 3 1 1 1 Max Flow = 2 Maximum Matching = 2 Assignments: Node 0 to Node 3 Node 1 to Node 2

  5. Ford Fulkerson • Some definition: • Valid edge: Edges that have weight 1 in the residual graph. • Dead Nodes: Nodes which has no outgoing valid edges • Finding a Random Path: • We start from the source node. Push it on the stack. Now take a node from its neighbors randomly that is connected with a valid edge. Push it on the stack and repeat the whole process until we find destination node. • Basically we perform DFS like approach to have a set of valid edges starting from source ending at destination node from the residual graph. • If we reach a dead node, pop the stack to go back to a previous node to check if we have a valid path from there. • Used a list to keep track of dead nodes. While finding a neighboring edge, if it leads to a dead node, we don’t return it as a valid edge. • Don’t return source node as a neighbor to avoid loop.

  6. Initial graph 0 2 1 1 1 1 5 4 1 3 1 1 1 1 1 4

  7. FordFulkerson 0 3 1 1 1 1 6 5 1 4 1 1 1 1 2 1 First round: FordFulkerson randomly chooses 5->0->3->6

  8. FordFulkerson 0 1 3 1 0 1 1 0 6 5 0 1 4 1 1 1 1 2 1 Second round: FordFulkerson randomly chooses 5->1->3->0->4->6

  9. FordFulkerson 0 0 3 1 1 1 0 0 6 5 0 1 0 1 1 1 4 1 0 0 1 2 1 Third round: FordFulkerson chooses 5->2->4->0->3->1 and reaches at dead node 1 Pop node 1

  10. FordFulkerson 0 0 3 1 1 1 0 0 6 5 0 1 0 1 1 1 4 1 0 0 1 2 1 current stack: 5->2->4->0->3; 3 is also a dead node Pop 3

  11. FordFulkerson 0 0 3 1 1 1 0 0 6 5 0 1 0 1 1 1 4 1 0 0 1 2 1 current stack: 5->2->4->0; 0 is a dead node Pop 0

  12. FordFulkerson 0 0 3 1 1 1 0 0 6 5 0 1 0 1 1 1 4 1 0 0 1 2 1 Pop 0; current stack: 5->2->4; 4 is a dead node Pop 4

  13. FordFulkerson 0 0 3 1 1 1 0 0 6 5 0 1 0 1 1 1 4 1 0 0 1 2 1 current stack: 5->2; 2 is a dead node Pop 2

  14. FordFulkerson 0 0 3 1 1 1 0 0 6 5 0 1 0 1 1 1 4 1 0 0 1 2 1 Pop 5; stack empty; so no path available at this point

  15. EdmondKarp • Key points: • Modified BFS to get a path from source to destination. • Took an edge in the path only the weight of that edge is 1.

More Related