You are on page 1of 1

ps9-2

Algorithms
March 12, 2015
Algorithm Bipartite matching problem. We put a limit of three edges for each node (one for each
BBHMD) so that more flow doesnt go through it. We know it ends up working if we end up with a value
that is 3*252. If that the requirement isnt satisfied if we end up with a value less than 3*252.
1. Setting up the Bipartite graph. On one side we put the BBHMDs and on the other we put the towers.
We assign each BBHMD to no more than three towers. We make one super source node that connects to all
the BBHMDs and one super sink node that connects to all of the towers.
2. Next we run Ford-Fulkerson on the the super source node to the super sink node.
Ford-Fulkerson implementation: We are going to run a variation of the Ford-Fulkerson algorithm to get
the maximum flow of this network.
1. f (u, v) 0 for all edges (u, v)
2. While there is a path p from s to t in Gf , such that cf (u, v) > 0 for all edges (u, v) p:
1. Find cf (p) = min{cf (u, v) : (u, v) p}
2. For each edge (u, v) p
1. f (u, v) f (u, v) + cf (p) (Sending flow along the path)
2. f (v, u) f (v, u) cf (p) (Returning flow)
Used wikipedia for pseudocode of Ford-Fulkerson
Algorithmic efficiency O(Ef) This algorithm gets limited by the efficiency of Ford-Fulkerson. Setting
up the bipartite graph can be done in constant time.
Proof of correctness We know that each BBHMD can only have a connection with three towers. If one
of them only has a connection with two towers then we know that there is no assignment that would work.
As a result we know that if there is 252*3 returned in the flow there is an assignment that would work.

You might also like