# Does real linear programming produce bipartite perfect matching using maxflow reduction?

Given a bipartite graph the standard reduction to max flow is with the construction similar to following diagram: We can formulate max flow as an linear programming problem with integer variables in latter.

1. If we do not use integer variables does solving for maxflow in linear programming formulation with only real variables still produce valid perfect matching of given graph?

2. Is there a formal proof of this?

Let us consider $$K_{2,2}$$, the complete bipartite graph with two vertices on either side. A valid max flow sends $$1/2$$ units of flow across each edge of the bipartite graph. This gives a negative answer to your first question.

On the other hand, the integral flow theorem guarantees that there exists an integral max flow, and such a max flow can be found algorithmically. An integral max flow does correspond to a maximum matching.

• Is that one big reason why people use no linear programming to solve for perfect matching in bipartite graphs (that the optimal solution is not guaranteed to be integral even though an integral solution exists)? – T.... May 23 at 7:30
• There are dedicated algorithms for bipartite maximum matching, and they are likely to be faster than a reduction to LP. – Yuval Filmus May 23 at 7:32
• Well I mean I know that complexity part. I am just wondering why would simple linear programming with real variables work (it seems the perfect matching polytope for bipartite graph is unimodular which means vertex points are integral). Still why does linear programming for $K_{2,2}$ fail? I fail to grasp. – T.... May 23 at 7:33
• The same counterexample also works for the LP relaxation. But every vertex does correspond to a matching, so the simplex algorithm will find a matching. – Yuval Filmus May 23 at 7:35
• Thank you integrality with simplex programming that makes sense. However if you maximize a hyperplane on an unimodular polytope I would expect the solution to be integral since optimal solution lies on a vertex which is integral. Why does it fail for $K_{2,2}$? I still do not see it. – T.... May 23 at 7:37

Just to respond to the above comment by the OP "why does linear programming for $$K_{2,2}$$ fail". Perhaps your confusion is because we need to distinguish between "solving an LP" and "solving an LP using a particular algorithm".

The LP formulation of maxflow (with real variables) has optimal solution (1,0,1,0) (for the edges of the bipartite graph $$K_{2,2}$$- I'm ignoring the remaining edges incident to source and sink), which corresponds to a perfect matching. The optimal solution (0,1,0,1) also corresponds to a perfect matching. Any convex combination of these two vertex points, such as (0.5,0.5,0.5,0.5) or (0.3,0.7,0.3,0.7), is also an optimal solution to the LP and therefore can be obtained if you "solve the LP".

Visualize a polygon in two dimensions whose one side corresponds to the above convex combination of two corner points. The level set of the LP cost function is parallel to this side, and we are optimizing in a direction perpendicular to this side. So "solving the LP" (i.e. without reference to any particular algorithm) can give any point (not necessarily a corner point) from this side.

The latter two solutions are not vertices, and so if you "solve the LP using an algorithm that gives a vertex solution (eg, simplex)", then you are guaranteed a matching. Am I correct?

• So is non uniqueness the issue? – T.... Aug 15 at 1:35