# Unweighted bipartite $b$-Matching

Consider the following problem, of which I am pretty certain that it is polynomially solvable.

Given some arbitrary bipartite Graph $$G=(L\cup R,E)$$ and some vector $$b\in\mathbb{N}^{|L|}$$ with $$\sum_{i=1}^{|L|} b(i)\geq|R|$$ (so basically each "left" vertex gets some capacity which means it can at most match $$b(i)$$ vertices from the other side).

The question is: Is there a Matching such that each $$v\in L$$ gets matched at most $$b(i)$$ times and matches/covers each vertex $$r\in R$$ exactly once.

What algorithm could solve this in polynomial runtime? Can you recommend some useful literature?

• You may assume $b(i)\le|R|$. Split each left vertex $i$ into $b(i)$ copies, compute a maximum-cardinality matching, and check it has size $|R|$. Aug 17, 2022 at 17:50
• Or reduce to max flow with integer capacities. Aug 17, 2022 at 18:36
• This is not a research level question. Aug 17, 2022 at 23:23

Reduce to a flow problem: Split each left node into $$L_i$$ into two nodes $$L_i$$ and $$L'_i$$ connected with an edge with capacity $$b(i)$$ , give the orignal edges between left and right cpacity 1 and connect left side (the new split node) to super source and the right side to a super sync. And solve max flow (can be done by repeatly finding shortest path and create reverse edges when allocating capacity which allows cancelling matching if it allows us to match more).