b. You have to devise an algorithm that returns “yes” if there is a matching
in a bipartite graph =h ithat matches all vertices in and
returns “no” otherwise. Would you base your algorithm on checking the
condition of Hall’s Marriage Theorem?
7. Consider the following greedy algorithm for finding a maximum matching
in a bipartite graph =h i: Sort all the vertices in nondecreasing
order of their degrees. Scan this sorted list to add to the current matching
(initially empty) the edge from the list’s free vertex to an adjacent free
vertex of the lowest degree. If the list’s vertex is matched or if there are
no adjacent free vertices for it, the vertex is simply skipped. Does this
algorithm always produce a maximum matching in a bipartite graph?
8. Design a linear-time algorithm for finding a maximum matching in a tree.