mosp LEDA Extension Package
0.7
|
A highly correlated instance generator. More...
#include <generator.h>
Public Member Functions | |
HighlyCorrelatedInstanceGenerator (int apps, int posts, double Density, double TieProp, int capacity) | |
Create a new generator. More... | |
HighlyCorrelatedInstanceGenerator (int apps, int posts, double Density, double TieProp, int capacity, int seed) | |
Create a new generator. More... | |
void | GenerateGML (std::ostream &o) |
Generate a random structured instance in GML format. More... | |
void | GenerateGraph (leda::graph &G, leda::list< leda::node > &A, leda::list< leda::node > &B, leda::node_map< int > &capacity, leda::edge_map< int > &rank) |
Generate a random structured instance. More... | |
int | NumPosts () const |
int | NumApplicants () const |
A highly correlated instance generator.
Highly correlated instances are problem instances where most of the applicants have a global and consistent knowledge of the posts reputation. Posts are already ranked, from an outside source, in some particular order . This particular ranking is well known to all applicants and is gradly accepted, perhaps with a few minor adjustments per applicant. The goal is to have preferences which are based on the intuition that if two posts
and
are far in the global ranking from each other then it should be highly likely that they are far away in each applicant's ranking as well.
We model such instances based on the following parameters:
We create the instance in the following way. For each applicant we randomly sample with probability
all posts, resulting in a subset
. We sort this subset of posts based on the total order
. For each post
we create an edge
. We assign ranks as follows. We begin by giving edge
rank 1 and then we choose with probability
whether to assign edge
the same rank as
or to increase it. We continue this process for all remaining edges.
We call them highly correlated since preferences are highly related among applicants. These instances are particularly difficult with respect to popular matchings.
|
inline |
Create a new generator.
apps | Number of applicants ![]() |
posts | Number of posts ![]() |
Density | Density parameter ![]() |
TieProp | Tie probability ![]() |
capacity | Posts capacity ![]() |
|
inline |
Create a new generator.
apps | Number of applicants ![]() |
posts | Number of posts ![]() |
Density | Density parameter ![]() |
TieProp | Tie probability ![]() |
capacity | Posts capacity ![]() |
seed | Seed value for the random number generator |
|
inherited |
Generate a random structured instance in GML format.
o | Output the GML graph in this stream |
|
inherited |
Generate a random structured instance.
G | The graph to return |
A | The list of applicants |
B | The list of posts |
capacity | The node capacities |
rank | The edge ranks |
|
inlineinherited |
Number of applicants that the resulting instance will have.
|
inlineinherited |
Number of posts that the resulting instance will have.