You are on page 1of 1

4.9.

SPECIAL GRAPHS 
c Steven & Felix, NUS

Figure 4.27: Bipartite Matching can be reduced to Max Flow problem

Max Weighted Independent Set on Bipartite Graph

Motivating Problem: Suppose that there are two users: User A and B. Each user has transactions,
e.g. A has {A1 , A2 , . . . , An } and each transaction has a weight, e.g. W (A1 ), W (A2 ), etc. These
transactions use shared resources, e.g. transaction A1 uses {r1 , r2 }. Access to a resource is exclusive,
e.g. if A1 is selected, then any of user B’s transaction(s) that use either r1 or r2 cannot be selected.
It is guaranteed that two requests from user A will never use the same resource, but two requests
from different users may be competing for the same resource. Our task is to maximize the sum of
weight of the selected transactions!
Let’s do several keyword analysis of this problem. If a transaction from user A is selected, then
transactions from user B that share some or all resources cannot be selected. This is a strong hint
for Independent Set. And since we want to maximize sum of weight of selected transactions, this
is Max Weighted Independent Set (MWIS). And since there are only two users (two sets)
and the problem statement guarantees that there is no resource conflict between the transactions
from within one user, we are sure that the input graph is a Bipartite Graph. Thus, this problem
is actually an MWIS on Bipartite Graph.

Figure 4.28: Example of MWIS on Bipartite Graph (from LA 3487 [11])

Let’s see Figure 4.28 for illustration. We have two users. We list down all transactions of A on the
left and all transactions of B on the right. We draw an edge between two transactions if they share
similar resource. For example, transaction A1 uses resource 1 and transaction B1 also uses resource
1. We draw an edge between A1 (with weight 45) and B1 (with weight 54) because they share the
same resource. In fact, there are two more edges between A2 − B2 and A3 − B3. Transaction B4
has no edge because the resources that it used: {4, 5} are not shared with any other transactions.
In this instance, {B1 (54), A2 (51), A3 (62), B4 (2)} is the MWIS, with total weight = 54+51+62+2
= 169.

90

You might also like