algoperm2012 - 03 olivier hudry
DESCRIPTION
Olivier Hudry (INFRES-MIC2 Télécom ParisTech)A Branch and Bound Algorithm to Compute a Median PermutationAlgorithms & Permutations 2012, Paris.http://igm.univ-mlv.fr/AlgoB/algoperm2012/TRANSCRIPT
A branch and bound method to compute a median permutation
Irène Charon, Olivier Hudry
Télécom ParisTech
A permutation problem in voting theory
Given a profile Π = (σ1, σ2, …, σm) of m permutations
(i.e. linear orders) σi (1 ≤ i ≤ m) on a set X of n = |X|
elements, how to aggregate them into a unique permutation which summarizes Π as accurately as possible?
In voting theory (Condorcet, 1784): we want to rank n candidates from the rankings provided by m voters.
Example
X = {a, b, c, d, e, f}, m = 5
voter 1: σ1 = a > b > c > f > d > e
voter 2: σ2 = a > c > f > b > d > e
voter 3: σ3 = e > d > a > f > b > c
voter 4: σ4 = b > c > d > e > f > a
voter 5: σ5 = c > f > b > e > a > d.
A combinatorial optimization problem
Symmetric difference distance d between R and R′ : d(R, R′ ) = |{(x, y) �∈ X2 with [xRy and not xR′ y]
or [not xRy and xR′ y]}|.
Let Σ be the set of all the permutations defined on X. Then, for Π = (σ1, σ2, …, σm):
Minimize ρΠ(σ) = for σ �∈ Σ
(cf. J.-P. Barthélemy, B. Monjardet, 1981)
∑=
σσm
iid
1),(
d(R, R′ ) measures the number of disagreements between R and R′.
ρΠ(σ) (= remoteness of σ from Π) measures the total number of disagreements between σ and Π.
σ* minimizing ρΠ over Σ is called a median permutation (or a median linear order) of Π.
Theorem (J.J. Bartholdi III et alii, 1989; O. Hudry, 1989; C. Dwork et alii, 2001):
The computation of σ* is NP-hard.
σ = (σxy)(x, y)∈�X2 with σxy = 1 if σ ranks x better than y (x >σ y) and σxy = 0 otherwise.
mxy = m – 2|{i: 1 ≤ i ≤ m and x >σi y}| = –myx
Then: ρΠ(σ) = C +
with :
∀ x �∈ X, σxx = 1 (reflexivity)
∀ (x, y) �∈ X2, x ≠ y, σxy + σyx = 1 (antisymmetry)
∀ (x, y, z) ∈ �X3, σxy + σyz – σxz ≤ 1 (transitivity)
∀ (x, y) �∈ X2, σxy �∈ {0, 1} (binarity)
A 0-1 linear programming problem
∑∈
σ2),( Xyx
xyxym
Lagrangean relaxation
Relaxation of the transitivity constraints:
∀ (x, y, z) �∈ X3, σxy + σyz – σxz ≤ 1
Lagrangean function L for σ = (σxy)(x, y)∈X2 with σxy ∈ {0, 1}, σxx = 1, σxy + σyx = 1, and Λ = (λxyz)(x, y, z)∈X3 with λxyz ≥ 0:
L(σ, Λ) = ρΠ(σ) +
= C +
with ∑∈
λ−λ+λ+=ΛXz
xzyzxyxyzxyxy ma )()(
( )∑∈
−σ−σ+σλ3),,(
1Xzyx
xzyzxyxyz
∑∑∈∈
λ−σΛ32 ),,(),(
)(Xzyxxyz
Xyxxyxya
Lagrangean relaxation (end)
Dual function for Λ = (λxyz)(x, y, z)∈X3 with λxyz ≥ 0:
D(Λ) = min{L(σ, Λ) with σ ∈ A}
with A = {reflexive and antisymmetric relations defined on X}.
Dual problem: maximize D(Λ) for Λ ≥ 0.
The maximum of D gives a lower bound of the minimum of ρΠ.
Computation of D(Λ) for a given Λ:
if axy ≥ 0, set σxy = 0, and σxy = 1 otherwise.
Resolution of the dual problem by subgradient methods.
The components of the BB algorithm
Initial bound: found by a metaheuristic (a self-tuned noising method; I. Charon and O. Hudry, 1993, 2009)
Evaluation function: provided by the Lagrangean relaxation.
Branching rule (J.-P. Barthélemy, A. Guénoche, O. Hudry, 1989; I. Charon, A. Guénoche, O. Hudry, F. Woirgard, 1996):
The root of the BB-tree contains all the permutations defined on X.A node of the BB-tree contains the permutations sharing a given beginning
section S (i.e. a permutation of a subset of X): S(xj1, xj2, …, xjp) = xj1 >σ xj2 >σ … >σ xjp.
The branching principle consists in expanding this beginning section:S(xj1, xj2, …, xjp, x) = xj1 >σ xj2 >σ … xjp >σ x
with x ∉{xj1, xj2, …, xjp}.
Shape of the BB-tree
x 1x 2
x n – 1x nx j 1
x j 1x j 2
x j p – 1> >> …
x j 1x j 2
x j p – 1> >> … x j p
>
… x j 1x j p – 1
>> x j p> x h n – p
>
……
… …
x j 1x j 2
x j p – 1>> x j p
> x h 1>… >
> …x j 2
… … … … … …
… …
Other components to prune the BB-tree
Hamiltonian permutations.
* We may summarize a profile Π of permutations by a tournament T (weighted by –mxy > 0): there is an arc (x, y) if a majority of voters prefer x to y (we assume that there is no tie).
* We say that a permutation σ is Hamiltonian if it induces a Hamiltonian path in T.
* Theorem (R. Remage and W.A. Thompson, 1966): a median permutation is Hamiltonian.
→ xj1 >σ xj2 >σ … >σ xjp is expanded into xj1 >σ … >σ xjp >σ x only if a majority of voters prefer xjp to x.
Example X = {a, b, c, d, e, f}
σ1 = a > b > c > f > d > eσ2 = a > c > f > b > d > eσ3 = e > d > a > f > b > cσ4 = b > c > d > e > f > aσ5 = c > f > b > e > a > d.
Here, a > c > f > b > d > eis a median permutation and induces a Hamiltonian path.
a b
c
d
f
e
a b
c
d
f
e
1
1
1
1
1
3
3
11
33
3
1
1
1
We compute the variation of ρΠ when, from a permutation σ beginning with S = xj1 >σ xj2 >σ … >σ xjp, we take an interval xjh >σ … >σ xjp (1 ≤ h ≤ p) and we shift it at the end of σ, after the elements of X – S (= OS = « out of section »):
σ = xj1 >σ xj2 >σ … xjh–1 >σ xjh >σ … >σ xjp >σ (OS)
becomes
σ′ = xj1 >σ′ xj2 >σ′ … xjh–1 >σ′ (OS) >σ′ xjh >σ′ … >σ′ xjp.
If ρΠ decreases, we do not keep the node associated with S.
OSmoves will count this kind of cuts.
Other components to prune the BB-tree
When we deal with a new beginning section
S = xj1 >σ xj2 >σ … xjh–1 >σ xjh >σ … >σ xjp >σ x,
we consider the beginning sections that we can get by moving, inside S, an “interval” of S including x, i.e., the beginning sections with the following shape:
xjh >σ′ … >σ′ xjp >σ′ x >σ′ xj1 >σ′ xj2 >σ′ … xjh–1.
If ρΠ decreases, we do not keep the node associated with S.
Smoves will count this kind of cuts.
Other components to prune the BB-tree (end)
An experimental result on the efficiency of the branch and bound components
Numbers of cuts for an instance on 39 candidates
0
1 0 0 0 0
2 0 0 0 0
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0
6 0 0 0 0
7 0 0 0 0
8 0 0 0 0
h a m : 2 8 8 , 3 8 8
O S m o v e s : 2 0 7 , 0 2 2
S m o v e s : 9 3 , 2 9 6
l e x : 2 , 3 7 7
B e g S e c : 3 , 2 1 2
r e l a x : 9 2 , 9 3 5
n u m b e r o f s e p a r a t e d n o d e s : 2 1 , 3 2 3n u m b e r o f c u t n o d e s : 6 8 7 , 2 3 0
1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 . . . 2 8
d e p t h - l e v e l
n u m b e r o f n o d e s
CPU times for m ∈ {3, 4, 100, 101}
CPU times in seconds (Rk: order = n).
0 , 1
1
1 0
1 0 0
1 0 0 0
1 5 2 0 2 5 3 0 3 5 4 0 4 5 5 0 5 5
3 : 0 . 8 0
4 : 0 . 6 0
1 0 0 : 0 . 6 7
1 0 1 : 0 . 6 8
a v e r a g e C . P . U . t i m e
o r d e r
Number of median permutations versus number of Hamiltonian permutations
Let M(n) and H(n) denote respectively the maximum number of median permutations or of Hamiltonian permutations for instances on n candidates.
If n is even with n ≥ 2: M(n) = n!
If n is odd: M(n) ≤ H(n).
Theorem (N. Alon, 1990): H(n) ≤ (c × n1.5 × n!)/2n where c is a constant.
Theorem (I. Charon, O. Hudry, 2000): for n = 3k,
30.75(n – 1)/n2 ≤ M(n).
Thank you for your attention!