### 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

Simplifying a T(n) runtime

Difficult algorithm: Optimal Solution to 1

Given the preorder traversal of a heap, construct the heap

Why complexity of linear function is same as that of quadratic equation

Algorithm for value range mapping

Algorithm to quickly traverse a large binary file

Compare algorithm complexity between Big O, Theta and Omega

Intersect Parallel Lines with Orthogonal 2D Grid

How to add Big O and Big omega

Can I divide big O expression like O(n³)/n = O(n²)? [closed]

trees for family tree creation

Calculating the 90th percentile in O(n) time [duplicate]

Determining time complexity of an algorithm

Similarity of two ORDERED collections [duplicate]

Algorithm(s) to use to generate melodies?

AI snake boxing itself