Maximum independent set bipartite graph

Today is the first day of the opening of the blog, now participate in more than cattle off summer school training game, just fill in the network flow problem bipartite graph, on the way the game came out this question

Tip (preamble that the need of the knowledge of the network flow algorithm, bipartite graph matching, matching the maximum, minimum edge coverage, maximum independent set, the minimum coverage points)

 

 Meaning of the title is translated  

To give you a set {a1, a2, a3 ...... an}

   N represents the number gives you a set of elements within it

Each element into a binary representation, and asked how many elements there are at least two bits are different (the largest collection of these elements are calculated) (within the collection twenty-two elements satisfy this condition)

 

First, there are at least two binary bits {} of antithesis is different only one bit {identical}

So we created a map 

Point: {a1, a2, ...... an}

Edge: If the point a and point b is only a binary different, then even edge. 

Then prove even out of a bipartite graph is FIG.  

 First, there is a directed path from a point b through a plurality of intermediate 

a->x1->x2->-x3->……->xn->b;

One with a different x1 x1 and x2 have a different 

(Since all the values ​​are DISTINCT) so a to have two different x2  

Therefore, with a different n bit xn  

Therefore, in a path of the t and t + 2 is not connected to a certain edge points QED

 

After thinking the above chart we built the largest independent set of answers to this map

And while running a bipartite graph matching algorithms find the maximum    

| Maximum independent set | Total Points = - | maximum matching | (because the bipartite graph, | maximum matching | = | Minimum Vertex Cover |)

I have QQ 642325110 correct place to tell me

 

Guess you like

Origin www.cnblogs.com/acmLLF/p/11297377.html