-
Notifications
You must be signed in to change notification settings - Fork 3
[Model] MaximumLikelihoodRanking #930
Description
Motivation
MAXIMUM LIKELIHOOD RANKING (MS11) from Garey & Johnson, A12. Given an n × n comparison matrix A where a_ij represents the number of times item i was preferred over item j (with a_ij + a_ji = c for a fixed constant c representing total comparisons per pair), find a permutation (ranking) of items that minimizes the total disagreement cost. NP-hard in the strong sense. Related to the minimum-weight feedback arc set problem on tournaments, but with a different input structure (matrix vs. graph) and variable space (permutations vs. arc subsets). Applications include sports ranking, social choice theory, search engine result aggregation, and the Kemeny ranking problem.
Definition
Name: MaximumLikelihoodRanking
Reference: Garey & Johnson, Computers and Intractability, A12 MS11
Mathematical definition:
INSTANCE: An n × n matrix A of non-negative integers with a_ij + a_ji = c for a fixed constant c ≥ 0 (each pair has the same total comparison count), and a_ii = 0 for all i.
OBJECTIVE: Find a permutation π of {1, 2, ..., n} that minimizes the total disagreement cost: Σ_{i>j} a_{π(i),π(j)} (the sum of entries below the main diagonal after permuting rows and columns by π).
Variables
- Count: n (one per item)
- Per-variable domain: {0, 1, ..., n-1} (the permutation rank assigned to each item)
- Meaning: The position of each item in the ranking. The configuration must be a valid permutation (all values distinct). The objective is to minimize the disagreement cost.
Schema
Type name: MaximumLikelihoodRanking
Variants: none
| Field | Type | Description |
|---|---|---|
matrix |
Vec<Vec<i32>> |
The n × n comparison matrix A where a_ij is the preference count of i over j |
Invariant: The matrix is square (n × n). Diagonal entries are 0. Entries are non-negative. a_ij + a_ji = c for a fixed constant c.
Complexity
- NP-completeness: NP-hard in the strong sense, via reduction from FEEDBACK ARC SET. The original G&J citation is to Rafsky (1977, private communication). The NP-hardness of the closely related minimum feedback arc set on tournaments was independently established by Alon (2006, "Ranking Tournaments," SIAM J. Discrete Math. 20(1)) and Charbit, Thomassé & Yeo (2007).
- Best known exact algorithm: O*(n² · 2^n) via Held-Karp-style dynamic programming over subsets.
- Complexity string:
"num_items^2 * 2^num_items" - Polynomial special cases: When the matrix is consistent (there exists a permutation with 0 disagreement), the problem is trivially solvable by topological sort.
How to solve
- It can be solved by (existing) bruteforce. (Enumerate all n! permutations of items and compute the disagreement cost for each; return the minimum.)
- It can be solved by reducing to integer programming. (ILP: binary variables x_ij = 1 iff item i is ranked before item j, with antisymmetry and transitivity constraints; minimize Σ a_ij · x_ji.) See companion issue [Rule] MaximumLikelihoodRanking to ILP #969.
- Other:
Reduction Rule Crossref
- [Rule] MaximumLikelihoodRanking to ILP #969 — [Rule] MaximumLikelihoodRanking to ILP (direct ILP formulation)
Example Instance
Input:
4 items with comparison matrix A (c = 5 comparisons per pair):
A = [[0, 4, 3, 5],
[1, 0, 4, 3],
[2, 1, 0, 4],
[0, 2, 1, 0]]
Antisymmetry: a_ij + a_ji = 5 for all pairs. Item 0 dominates (beats all others strongly), item 3 is weakest (loses all pairwise comparisons to 0, and mostly loses to 1 and 2).
Optimal ranking π = (0, 1, 2, 3):
Disagreement = Σ_{i>j} a_{π(i),π(j)} = a_{1,0} + a_{2,0} + a_{2,1} + a_{3,0} + a_{3,1} + a_{3,2}
= 1 + 2 + 1 + 0 + 2 + 1 = 7
Suboptimal ranking π = (0, 1, 3, 2):
Disagreement = a_{1,0} + a_{3,0} + a_{3,1} + a_{2,0} + a_{2,1} + a_{2,3}
= 1 + 0 + 2 + 2 + 1 + 4 = 10
Why this ranking is optimal: Item 0 beats all others decisively (a_{0,j} ≥ 3 for all j), so placing 0 first incurs minimal backward cost. The remaining items form a chain 1 > 2 > 3 with decreasing strength, and the ordering (1, 2, 3) minimizes disagreements among them.
Expected Outcome
Optimal value: Min(7) — the minimum disagreement cost is 7, achieved uniquely by π = (0, 1, 2, 3). Out of 24 permutations, there are 12 distinct cost values ranging from 7 to 23.
Extra Remark
Full book text:
INSTANCE: n × n antisymmetric matrix A of non-negative integers (a_ij + a_ji = constant for each pair), positive integer B.
QUESTION: Is there a permutation π of {1, ..., n} such that Σ_{i>j} a_{π(i),π(j)} ≤ B?
Reference: [Rafsky, 1977]. Transformation from FEEDBACK ARC SET.
Comment: NP-complete in the strong sense.
Note: The original G&J formulation is a decision problem with bound B. We use the equivalent optimization formulation: minimize the total disagreement cost. The reference [Rafsky, 1977] is a private communication cited by Garey & Johnson; the NP-hardness result is corroborated by later published work on minimum feedback arc set in tournaments (Alon 2006, Charbit, Thomassé & Yeo 2007).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status