
May 1st, 2013, 10:49 AM
#1
Disjoint pairs problem
Hi to all,
excuse me in advance if I have done something wrong in posting this thread (I'm new ).
My problem is the following:
I have a set of pairs identified by two end point: u and, that respectively represent two process connected (u sends and v receives), and each process can hold one connection at a time, so I have to divide the computation in communication rounds so that in each round communicate as many process as possibile. This example may explain better the idea:
I have
12
13
14
21
23
34
35
46
42
...
If I choose 12 in a communication round I can't choose in the same communication round 13, 14, 21, 23, 42 because these pairs involve process 1 or 2.
I tried to solve the problem with a greedy algorithm that for each pair choose a round that doesn't intersect with it and if there are no feasible rounds it creates a new one.
I find lots of problems in literature regarding path coloring, arc coloring and interval scheduling, but I'm not sure if I'm dealing with a difficoult problem, I mean NPhard, or with a polynomial one, so I can't prove if my solution is optimal. Can you help me? Do you think my problem is reconducible to path coloring? If so, are there some approximation algorithms that give less than O(n^2)?
Thanks in advance to all
luca v.

May 2nd, 2013, 11:07 AM
#2
Re: Disjoint pairs problem
Originally Posted by lucav
path coloring, arc coloring and interval scheduling
To me it looks like a set cover problem,
http://en.wikipedia.org/wiki/Set_cover_problem
There it says the optimal approximate strategy is to greedily select the largest set in each stage.
Translated to this problem it would mean to find the largest set of nonconflicting pairs and send them together in one round. This is then repeated until all pairs have been sent. The collection of largest sets will be mutually disjoint and together cover the total set of all pairs.
Each pair is associated with a set of nonconflicting other pairs. The task is to find the largest of these associated sets. It's quite easy to calculate how many members there are in such a set. From the total number of pairs, N, it's just to subtract the number of conflicting pairs (those with the same <from> or <to>). The <from> and <to> counts can be held in two lookup tables (one for <from> and one for <to>).
Setting up the lookup tables and walking through all pairs to select the pair with the largest associated set and then actually generate the largest set from the pair is O(N). The link above indicates this must be repeated log(N) times. That would result in a total complexity of O(N * logN) on average.
Last edited by nuzzle; May 3rd, 2013 at 04:08 AM.
Tags for this Thread
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.
Featured
