Prove Hall's theorem
Analyze the prove hall's theorem.
Examples
Input: "test_input_1"
Output: "output_1"
Input: "test_input_2"
Output: "output_2"
Hints
Recall that Hall's Marriage Theorem states that a bipartite graph has a perfect matching if and only if for every subset of one partition, the neighborhood size is at least as large as the subset size.
Consider how Hall's condition can be verified by examining all possible subsets of the smaller partition, and think about how to efficiently check this condition.
Explore the connection between Hall's Theorem and network flow algorithms, particularly how a maximum flow in a constructed flow network can help determine the existence of a perfect matching.
Prove Hall's theorem
Analyze the prove hall's theorem.