### algorithm

#### Maximum median weight matching

Finding a maximum total weight matching for a graph is a well studied problem. Is there any name and/or well defined algorithm for finding a maximal matching that maximizes its median weight instead ? (generalized to any other percentile). This problem got me when looking into matters of fairness of assignments. My lines of thought for possible solutions: Perhaps the weights can be somehow mapped to use the maximum total weight matching algorithm ? I find this unlikely Perhaps the maximum weight matching algorithm can be used repeteadly on different subgraphs in some fashion ? Solving the problem as an assignment problem using integer programming. But I wouldn't know how to express the median of the weights of the chosen set. In the case of bipartite graphs, this paper offers ways to find all maximal, maximum and perfect matchings. Then, if problem size allows, we can choose the matching with the desired properties with any kind of cost function. But I'm interested in the non-bipartite case. So, of course a biproduct of this question is: Do you know any implementation/algorithm that enumerates all maximal matchings of a graph ?

Suppose first of all that I know the maximum median possible. If I set all weights above or equal to the median value to 1 and all other weights to zero then there is an answer for which at least 1/2 the weights used by the matching are 1 - this is the one produced by taking the maximum median weight matching. If I retrieve that, fine. If I retrieve some other matching it must have at least this many 1s. Each 1 corresponds to a weight of at least the maximum median value, so on the original graph it has a median weight of at least the maximum possible, so it must be equivalent to the maximum. If I now try guessing the maximum median and guess too high I must then find that the maximum matching produced has less than 1/2 the weights set equal to 1. If I guess too low, I will find that at least 1/2 the weights are set equal to 1, because I can achieve this using the matching for the correct maximal median. So I can binary chop on the guessed maximum median, looking for the highest value that still allows me to retrieve 1/2 of weights that I set equal to 1, and this gets me the matching with maximum median weight.

### Related Links

Slow stored procedure, searches through all tables in a database, what is a better algorithm?

Halton sequence extension

Laying out circles in a rect

Longest subarray whose elements form a continuous sequence

Any pseudo-polynomial algorithm for bounded 0-1 multi-knapsack?

What is the runtime to access an element from an array or hash table? How is it different from find or search?

what is effective way to find duplicate between two sets?

What is the point of Large Input?

Algorithm to divide racing drivers into equal teams

genetic algorithm handling illegal strings

How to create a rating based off social scores

Loop invariant proof

Finding time and position of intersection of two moving, rotating bounding boxes

Minimax tree where a player can move multiple times in a row

rotating a rectangle around its center?

K means clustering in MATLAB - output image