08.10.2016 Views

Foundations of Data Science

2dLYwbK

2dLYwbK

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.11 Maximum Weight Matching<br />

We have seen that the belief propagation algorithm converges to the correct solution<br />

in trees and graphs with a single cycle. It also correctly converges for a number <strong>of</strong> problems.<br />

Here we give one example, the maximum weight matching problem where there is<br />

a unique solution.<br />

We apply the belief propagation algorithm to find the maximal weight matching<br />

(MWM) in a complete bipartite graph. If the MWM in the bipartite graph is unique,<br />

then the belief propagation algorithm will converge to it.<br />

Let G = (V 1 , V 2 , E) be a complete bipartite graph where V 1 = {a 1 , . . . , a n } , V 2 =<br />

{b 1 , . . . , b n } , and (a i , b j ) ∈ E, 1 ≤ i, j ≤ n. Let π = {π (1) , . . . , π (n)} be a permutation<br />

<strong>of</strong> {1, . . . , n}. The collection <strong>of</strong> edges {( ) ( )}<br />

a 1 , b π(1) , . . . , an , b π(n) is called a<br />

matching which is denoted by π. Let w ij be the weight associated with the edge (a i , b j ).<br />

∑<br />

The weight <strong>of</strong> the matching π is w π = n w iπ(i) . The maximum weight matching π ∗ is<br />

π ∗ = arg max<br />

π<br />

w π<br />

i=1<br />

The first step is to create a factor graph corresponding to the MWM problem. Each<br />

edge <strong>of</strong> the bipartite graph is represented by a variable c ij which takes on the value zero or<br />

one. The value one means that the edge is present in the matching, the value zero means<br />

that the edge is not present in the matching. A set <strong>of</strong> constraints is used to force the set<br />

<strong>of</strong> edges to be a matching. The constraints are <strong>of</strong> the form ∑ c ij = 1 and ∑ c ij = 1. Any<br />

j<br />

i<br />

0,1 assignment to the variables c ij that satisfies all <strong>of</strong> the constraints defines a matching.<br />

In addition, we have constraints for the weights <strong>of</strong> the edges.<br />

We now construct a factor graph, a portion <strong>of</strong> which is shown in Fig. 9.8. Associated<br />

with the factor graph is a function f (c 11 , c 12 , . . .) consisting <strong>of</strong> a set <strong>of</strong> terms for each c ij<br />

enforcing the constraints and summing the weights <strong>of</strong> the edges <strong>of</strong> the matching. The<br />

terms for c 12 are<br />

( ) ∣( ) ∑ ∣∣∣∣ ∑ −λ<br />

c i2 − 1<br />

∣<br />

∣ − λ c 1j − 1<br />

∣ + w 12c 12<br />

i<br />

j<br />

where λ is a large positive number used to enforce the constraints when we maximize the<br />

function. Finding the values <strong>of</strong> c 11 , c 12 , . . . that maximize f finds the maximum weighted<br />

matching for the bipartite graph.<br />

If the factor graph was a tree, then the message from a variable node x to its parent<br />

is a message g(x) that gives the maximum value for the sub tree for each value <strong>of</strong> x. To<br />

compute g(x), one sums all messages into the node x. For a constraint node, one sums<br />

all messages from sub trees and maximizes the sum over all variables except the variable<br />

<strong>of</strong> the parent node subject to the constraint. The message from a variable x consists <strong>of</strong><br />

318

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!