Search code examples
matchingbipartite

What is time complexity of maximum bipartitie matching algorithm?


Here is the classical problem : - "There are M job applicants and N jobs. Each applicant has a subset of jobs that he/she is interested in. Each job opening can only accept one applicant and a job applicant can be appointed for only one job. Find an assignment of jobs to applicants in such that as many applicants as possible get jobs."

I am using the following code and algorithm to solve the problem : https://www.geeksforgeeks.org/maximum-bipartite-matching/

What will be the time complexity of this algorithm ?


Solution

  • According to this Wikipedia article, the algorithm by Ford & Fulkerson has a runtime complexity of O(|E|f), where |E| is the cardinality of the input's edge set. Note that this runtime bound depends on the optimal value and is pseudo-polynomial.