HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

What is the approximation ratio of this randomized algorithm for finding matchings?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
thistheapproximationwhatrandomizedalgorithmforfindingmatchingsratio

Problem

I would like to analyze the following algorithm in terms of its approximation ratio.

Here is the algorithm:

Input: A positive number T and two disjoint sets of nodes V={v1,...,vn} and W={w1,...,wn}.
Output: A matching S.
1: O = [] # An empty array.
2: for t = 1 to T do
3:     Create a set E of edges from V to W randomly
4:     A = LA(G) # G is the bipartite graph G=(V U W, E) and LA is
                 # an algorithm that takes as input a bipartite graph
                 # and outputs a matching A.
5:     O[t] = A # Put the matching A in the t-th element of O.
6: end for
7: S = max(O) # S is the maximum cardinality matching in O.
8: return S


In the algorithm above, called BA, there is a call to another algorithm LA, on line 4. We know that LA is a constant factor approximation algorithm for an NP-hard problem $\Pi$. An instance of $\Pi$ is a bipartite graph and we would like to return a maximum matching that respects some constraints. Therefore, LA will return a matching of size no less than a constant factor times the size of the optimal matching.

Note that BA is trying to solve another NP-hard problem $\Pi_1$ that has an instance of two sets and we would like to return a maximum matching between these two sets that respects the same constraints as for $\Pi$. The only difference between $\Pi$ and $\Pi_1$ is that $\Pi$ has as input a bipartite graph (nodes and edges) whereas $\Pi_1$ has as input a set of nodes only.

I am not trying to hide the constraints. I still cannot write them explicitly in a readable way. I will give some examples to clarify the problem.

-
Say, for problem $\Pi$, we are given the following graph (it is represented by set of edges):

Instance of II = { {1, 3}, {2, 2}, {3, 1}, {4, 4} }

In this special instance, say, the optimal solution is

OPT of II = { {1, 3}, {2, 2}, {4, 4} }

Hence edge {3, 1} cannot exist in the solution because of the constraints.
If we apply LA to this instance we could have selected, say

`A =

Solution

Suppose that the only feasible solution are single edges and $\{(1,1),(2,2),\ldots,(n,n)\}$. The optimal solution thus has value $n$. On the other hand, the optimal solution on a random bipartite graph is $1$ with probability $1-2^{-n}$. Thus algorithm BA would have to take $T=\Omega(2^n)$ in order to guarantee a constant approximation ratio, even though algorithm LA always outputs the optimal solution.

Context

StackExchange Computer Science Q#54121, answer score: 4

Revisions (0)

No revisions yet.