Problem 1. Matching. [25 points]
Consider the following problem Bipartite-Perfect-Matching:
Input: Undirected bipartite graph G = (V; E) with bipartition V = L[R
where jLj = jRj = n.
Output: A perfect matching if one
...
Problem 1. Matching. [25 points]
Consider the following problem Bipartite-Perfect-Matching:
Input: Undirected bipartite graph G = (V; E) with bipartition V = L[R
where jLj = jRj = n.
Output: A perfect matching if one exists, and NO if none exist in G.
A perfect matching is a subset S of edges where every vertex v 2 V is incident
exactly one edge in S. Here is an example of a bipartite graph with a perfect
matching in dashed edges:
a
2
a
3
a
1 b1
b
2
b
3
Explain how to reduce the Bipartite-Perfect-Matching problem to the
max-flow problem.
In other words, explain how to solve the bipartite perfect matching problem
using the algorithm for solving max-flow as a black-box.
Part (a): Given an input G = (V; E) to the Bipartite-Perfect-Matching
problem, explain how you create the input to the max-flow problem (specify
the graph G0 and the edge capacities in this new graph). Do not do it for
the above example, do it in general.
Part (b): Given a max-flow f∗ for the flow network that you defined in
part (a), explain how you use f∗ to determine if G has a perfect matching.
Part (c): What is the running time of your algorithm in terms of the original
graph G where n = jV j and m = jEj. State whether you are using the FordFulkerson or Edmonds-Karp algorithm (only consider these two which we
saw in class); faster is better.
Part (d): A 2-perfect subgraph is a subset S of edges where every vertex
has degree exactly 2 in S. So a perfect matching corresponds to a 1-perfect
subgraph. Below is an example graph with a 2-perfect subgraph marked by
red/dashed lines. Explain what needs to change in part (a) to check if a
bipartite graph G has a 2-perfect subgraph.Name: Page 2 of 5
a
2
a
3
a
1 b1
b
2
b
3
a
5
a
4 b4
b
5Name: Page 3 of 5
Problem 2. MST. [20 points]
Standard disclaimer: use the algorithms from class, such as DFS, Explore,
BFS, Dijkstra’s (using min-heaps), connected components, etc., as a blackbox subroutine for your algorithm. If you attempt to modify one of these
algorithms you will not receive full credit, even if it is correct. Make sure to
explain your algorithm in words, no pseudocode. Faster { and correct { is
worth more credit.
|||||||||||||||||
You are given a tree T which is a MST of a graph G = (V; E). For one
particular edge e∗ which is not in T, its edge weight is decreased (all other
edges stay the same).
Specifically the weight of e∗ changed from a to b where a > b > 0.
Find a MST T0 for this new graph using the MST T for the old graph.
The set
[Show More]