Metric and Latticial Medians 1

Introduction

The previous chapter of this book dealt with some aggregation problems arising in the field of collective choice or multicriteria decision. This chapter studies a family of aggregation methods often met in literature and which may be qualified as median procedure. In this introduction, we first consider the concept of median in general, then the medians of binary relations, and last latticial medians.

Medians, in general

The concept of median comes first from geometry. Every one of us dealt in school with special lines in triangles. An angle bisector cuts an angle into two equal angles and comes to an end on the opposite side. An altitude is a straight line through a vertex and perpendicular to the opposite side. A median is a straight line through a vertex and the midpoint of the opposite side, which is divided into two equal parts. More generally, medians are based on equal shares. The median of a sorted statistical series divides it into two equal parts. In their famous Dictionary of statistical terms, Kendall and Buckland [KEN 57] distinguish between "median" and "median centre" by writing that, "according to the Italian tradition", the median centre is a point such that the sum of the distances to the points of a given set is minimum. In fact, these two notions coincide, as already pointed out by Laplace [LAP 1774]. So medians relate two kinds of structures: an ordinal structure (here, a linear order; more generally, a lattice or a semilattice) and a metric structure (we will speak about metric median in this case). It is entertaining to observe that, if the median is of metric nature, it is not of geometric nature: the intersection of the three medians of a triangle is its centre of gravity and not the (metric) median of its three vertices. Moreover, the median of aligned points depends only on the succession of these points and not on the lengths of the intervals between them.

Medians of binary relations

The problem of the aggregation of binary relations (here, finite complete preorders) has been formally raised by Arrow [ARR 51]. The notion of median occurred quickly in the prolongation of this work and according to the two above mentioned dimensions: ordinal and metric. With respect to the first, Guilbaud [GUI 52] dated back the Arrowian questions to the voting theories developed at the end of 18 th century by Borda [BOR 1784], Condorcet [CAR 1785] and some others (see [BLA 58]). Especially, Guilbaud insisted on the fact that the majority rule is not generally applicable, and he added: "The analytic study of Condorcet's paradox will lead us to perceive how one can build a median in various partially ordered structures". Indeed, Condorcet (and some others after him) noticed that the usual voting procedures made possible the election of a candidate defeated by another by a majority of voters. Then, Condorcet proposed to split the vote into duels (i.e. to compare the candidates pairwise) and to consider the candidate defeating all the others by a majority as the winner. Unfortunately, Condorcet realized that this voting procedure raised a major difficulty, called Condorcet's effect by Guilbaud (and "voting paradox" in the English literature): it can happen that each candidate is defeated majoritarily by another one (cf. an example in Section 6.2.4).

At the end of the fifties, Kemeny [KEM 59] introduced the notion of metric median of linear orders in order to palliate Arrow's impossibility result. This notion of median is based on the symmetric difference distance, a distance given by the number of "disagreements" between two binary relations. Kemeny's justification to use this distance was based on its axiomatic characterization. Since these pioneer works, the works on the median of binary relations have considerably increased. One will find in [BAR 81] a review of the already abundant literature devoted to this subject before the eighties. From an algorithmic point of view, observe finally that, except some rather obvious cases, the search of a median (in Kemeny' sense and for various types of binary relations) leads generally to NP-hard problems (see references in [HUD 08a]).

Medians in lattices

As it is usual in mathematics, the understanding of a strong relation between two approaches is reached with the help of an abstract scheme in which both approaches embed. Here, the abstract model of lattices (and semilattices) will join ordinal (Guilbaud) and metric (Kemeny) approaches. In two seminal papers, Barbut ([BAR 61] and [BAR 67]) showed that Laplace's result, on the equivalence of ordinal and metric medians (of a series of numbers), generalizes to distributive lattices. Moreover, he explicitly related these medians, on the one hand, with Condorcet's majority rule, and, on the other hand, with ordinal statistics as developed by Kendall [KEN 38] (the celebrated Kendall coefficient τ is nothing but a normalization between -1 and +1 of the symmetric difference distance, which was later extensively considered by Kemeny). Then, Barbut's results were systematized by Monjardet who introduced, among others, the notion of median interval [MON 80]. Significant extensions were then developed into two directions:

-to larger types of ordinal structures, especially to modular lattices (and semilattices); -to the study of medians in trees (a topic initiated, with no doubt, by Camille Jordan [JOR 1869]).

Finally, any statement simultaneously valid in trees and in distributive lattices may be expected to remain valid in the more general abstract structure of median semilattices (previously considered by Sholander [SHO 54] and Avann [AVA 61]). For instance, Barbut's results on distributive lattices, together with those of Zelinka [ZEL 68] and Slater [SLA 78] on trees, were extended to median semilattices by Bandelt and Barthélemy [BAN 84].

The topic considered in this chapter is very prolific. Barthélemy and Monjardet's paper [BAR 81] written more than twenty years ago contained about 200 references. Their number has surely at least tripled (in particular cluster analysis is become a big consumer of medians). So, we have been forced to drastic choices. On the relational side, we essentially restrict the field to the cases of arbitrary binary relations, tournaments and linear orders (nevertheless other relations occur in the last section as an application of the latticial median). On the metric side, we insist on the symmetric difference distance and its extension to semilattices. We do not deal with the "geodesic" aspects (for example, in the permutohedron lattice) which refer as well to graph theory as to ordered set theory. On the latticial side, we insist on the structure where medians have a natural algebraic expression, namely the median semilattices. This is not a reason to forget that similar or more general results (in semimodular and even arbitrary semilattices) have been obtained more or less recently (see, for example, [LEC 93] and [LEC 94]). This chapter is divided into five sections, including this introduction. Section 6.2 gives the general frame, with the main definitions that will be useful later, and includes a study of the medians, in the simple cases of general binary relations and tournaments. Section 6.3 deals with median (linear) orders, and especially considers the problem of their effective computation. It includes developments about several questions relevant from a combinatorial optimization point of view. Medians in (semi)lattices are considered in Section 6.4. It is first observed that several sets of binary relations, conveniently ordered, are lattices or semilattices. Then, the attention moves from binary relations to lattices. First, the extension of the symmetric difference metric to lattices involves a definition of medians in such structures. We focus on median semilattices, previously mentioned as a privileged frame for the unification of almost all the "positive" results of the literature. This section also comes back on the uses, pointing out how the lattice approach may provide results about several types of binary relations, but also about other models of preferences (for instance, some types of choice functions). Finally, in the conclusion of the chapter, we recapitulate the different notions of medians encountered, their relationships and the situations where the median procedure turns out to be an easy method.

Median relations

. 2 . 1 . The model

We consider in this chapter a finite set V = {1, 2, …, v} of v elements henceforth called voters, but which could also be agents, criteria, etc. a finite set X = {x, y, z, ...} of n elements henceforth called candidates, but which could also be decisions, objects, etc.

Each voter is assumed to compare the candidates pairwise. So his preferences between the candidates are expressed by a binary relation R defined on X . One assumes that R belongs to a given set D of binary relations defined on X . So if R = P(X 2 ) is the set of all the subsets of X 2 i.e., the set of all binary relations defined on X , one has D ⊆R. When the preference relation R i of each voter i is given, we obtain the so-called profile of the individual preferences of the voters. We denote such a profile by Π = ( R 1 , R 2 , ..., R v ). Thus the set of all the possible preferences profiles is D v .

The collective preference must often belong to the same set of relations as the individual preferences i.e., it must belong to D. But we can also allow the collective relation to belong to a set M (for "models") of relations, with generally D ⊆ M ⊆ R. Then, an aggregation procedure is a map from D v to M. Later on, we will need to extend this definition by considering that the aggregation procedure can lead to several collective preference relations for the same profile of individual preferences. Then, an aggregation procedure becomes a map from D v to P*(M ), where P*(M ) denotes the set of nonempty subsets of M .

The applied aggregation procedure is required to satisfy "good properties". For instance, if all the voters prefer a candidate to another one, this unanimous preference must be kept in the collective preference. To find "good" aggregation procedures is not an easy task. Indeed, we face strong obstacles like the "effet Condorcet" (see Section 6.3) or Arrow's theorem [ARR 51] (see, for instance, Chapter 5 of this book and the papers in the issue 163 of Mathématiques et Sciences humaines [MSH 03]). Then we cannot be too ambitious on the qualities of the considered aggregation procedures.

The aggregation procedures that we are going to study in this chapter belong to the large class of the so-called metric aggregation procedures. They are based on a very natural idea found in various contexts, for example in data analysis. We look for the collective preference that is the "closest" -in a sense to specify-to the profile of individual preferences. In order to specify this closeness, we begin by defining a distance d on the set M of possible collective preference relations, which thus becomes a metric space (M, d). Afterwards in this metric space we define a remoteness (see [BAR 81]) between a profile of individual preferences and an arbitrary relation of M. The collective preference relations associated with this profile are the relations of M minimizing this remoteness.

The median procedure

Let (M, d) be the metric space where M is the set of all possible collective preference relations and d a distance on M. The median procedure is the metric aggregation procedure where the remoteness E(Π, R) between a profile Π = ( R 1 , R 2 , ..., R v ) of individual preferences and a relation R of M is obtained as the sum of the distances of the relations R i of this profile to the relation R:

E(Π, R) = d(R i , R) i=1 v ∑ . DEFINITION 6.1.-Let Π ∈ D v be a profile of individual preferences and M ⊆ R . An M-median of Π is a relation of M that is a solution of the following optimization problem: minimize {E(Π, M): M ∈ M }.
As M is a finite set, there always exists at least one M-median of a profile and there can exist several M-medians. We denote by Med M (Π) the set of M-medians of a profile Π. Obviously, the M-medians of a profile depend on the chosen distance d on M. Hereafter, we will only consider the most natural and used distance between binary relations, namely the symmetric difference distance δ. Recall the definition of this distance. Let R and R′ be two binary relations defined on a set X and RΔ ′ R be their symmetric difference. Then,

δ(R, R′ ) = RΔ ′ R = R∪R′  -R∩R′  = R \ R′  + R′ \ R,
what can also be written:

δ R, ′ R ( ) = |{(x, y): [(x, y) ∈ R and (x, y) ∉ ′ R )] or [(x, y) ∉ R and (x, y) ∈ ′ R )]}|.
In other words, the symmetric difference distance between R and R ′ is the number of ordered pairs of X belonging to one of these relations and not to the other. It counts the number of disagreements between these two relations.

Then, for the chosen distance δ, the remoteness of a profile

Π = ( R 1 , R 2 , ..., R v ) to a relation R is: E(Π, R) = δ( R i , R) i=1 v ∑ .

The R -medians of a profile of relations

We begin by considering the case where the individual preferences of the voters on the candidates can be arbitrary binary relations i.e., D = R. This case, unrealistic in a voting context, can be achieved for other aggregation contexts. Moreover the results obtained for this case remain valid for particular relations. We need to define parameters associated to a profile Π = (R 1 , R 2 , ..., R v ). We set:

Π V (x, y) = {i ∈ V: x R i y}, c V Π (x, y) = {i ∈ V: (x, y) ∉ R i }, Π v (x, y) = |V Π (x, y)| = |{i ∈ V: x R i y}|, c v Π (x, y) = | c V Π (x, y)| = |{i ∈ V: (x, y) ∉ R i }|, Π w (x, y) = Π v (x, y) -c v Π (x, y).
So, V Π (x, y) is the set of voters preferring candidate x to candidate y, v Π (x, y) is the number of these voters and c v Π (x, y) is the number of voters that do not prefer x to y (what, generally, does not mean that they prefer y to x). One has obviously

v Π (x , y ) + c v Π (x, y) = v and w Π (x, y) = 2v Π (x, y) -v.
When there is no risk of ambiguity i.e., almost always, we drop the index Π in the above notation (for example, V Π (x,y) becomes V(x, y)).

A first result states the remoteness of a profile to an arbitrary relation R by means of the previous parameters, and the changes in this remoteness when an ordered pair is removed from or added to R.

LEMMA 6.2.-For Π = (R 1 , R 2 , ..., R v ) ∈ R v and R ∈ R , we have: (a) E(Π, R) = v c ( x, y) ( x, y)∈R ∑ + v( x, y) (x, y)∉R ∑ ; (b) E(Π, R) = R i i=1 v ∑ - w( x, y) ( x, y)∈R ∑ ; (c) if (x, y) ∈ R, E(Π, R \ {(x, y)}) = E(Π, R) + w(x, y); (d) if (x, y) ∉ R, E(Π, R ∪ {(x, y)}) = E(Π, R) -w(x, y).

Proof

Let us first prove (a). By definition of E(Π, R), we have:

E(Π, R) = δ( R i , R) i=1 v ∑ = R i ΔR i=1 v ∑ .
Let us introduce the characteristic function δ i of R i ΔR defined by:

∀ x, y ( ) ∈ X 2 , δ i (x, y) = 1 if (x, y) ∈ R i ΔR and δ i (x, y) = 0 otherwise.
Then:

E(Π, R) = δ i ( x, y) (x, y)∈X 2 ∑ i=1 v ∑ .
By partitioning X 2 into R and its complement X 2 \R, we obtain:

E(Π, R) = δ i (x, y) i=1 v ∑ ( x, y)∈R ∑ + δ i (x, y) i=1 v ∑ ( x, y)∉R ∑ = v c ( x, y) ( x, y)∈R ∑ + v( x, y) ( x,
E(Π, R) = v( x, y) ( x, y)∈R ∑ + v( x, y) ( x, y)∉R ∑ - v( x, y) (x, y)∈R ∑ - v c (x, y) (x, y)∈R ∑         = v( x, y) ( x, y)∈X 2 ∑ - w( x, y) ( x, y)∈R ∑ = R i i=1 v ∑ - w( x, y) ( x, y)∈R ∑ .
Formulas (c) and (d) are immediate consequences of (b). ❑

In the simple cases, the median relations of a profile are linked to the "majority" relations associated to this profile. We define now these relations after introducing some notation: for Π ∈ R v and for an integer σ, we set:

R(Π, σ) = {(x, y) ∈ X 2 : v(x, y) ≥ σ}.
Here we also generally denote simply this relation by R(σ). It contains all the pairwise preferences supported by at least σ voters. On the other hand, if r is a real number, the notation r   (respectively r   ) denotes the integer part by excess (respectively by defect) of r. Finally, we set

  2 / ) 1 ( + ν = α and   2 / ) 1 ( + ν = β (thus, if v = 2p + 1, α = β = p + 1; if v = 2p, α = p + 1 and β = p). DEFINITION 6.3.-For Π ∈ R v , the strict majority relation associated to Π is the relation R(α) = {(x, y) ∈ X 2 : v(x, y) ≥   2 / ) 1 ( + ν = α }
and the majority relation associated to Π is the relation

R(β) = {(x, y) ∈ X 2 : v(x, y) ≥   2 / ) 1 ( + ν = β }.
A candidate x is thus preferred to a candidate y in the strict majority relation (respectively, in the majority relation) if the number of voters preferring x to y in profile Π is strictly greater than (respectively, greater than or equal to) half the voters. Obviously, these two relations are the same if the number of voters is odd. We have also the equalities:

R(α) = {(x, y) ∈ X 2 : v(x, y) > v c (x, y)} = {(x, y) ∈ X 2 : w(x, y) > 0} and R(β) = {(x, y) ∈ X 2 : v(x, y) ≥ v c (x, y)} = {(x, y) ∈ X 2 : w(x, y) ≥ 0}.
The set R(β) \ R(α) = {(x, y) ∈ X 2 : w(x, y) = 0} is the set of the ordered pairs (x, y) of candidates for which there are as many voters preferring x to y as voters not preferring x to y. In the case where, for all the voters, x is not preferred to y if and only if y is preferred to x, R(β) \ R(α) is the set of the ordered pairs of candidates which are ex aequo, i.e., of candidates for which the numbers of voters preferring one of the candidates to the other are equal.

After a recall of the notion of interval in a lattice (see below Section 6.4.1 for the definition of a lattice), we can state the first result on the (arbitrary) medians of a profile of (arbitrary) relations. In the Boolean lattice (R, ⊆) of all the binary relations defined on X , the interval [S, T] associated to two relations S and T satisfying S ⊆ T is the set {R ∈R: S ⊆ R ⊆ T}. PROPOSITION 6.4.-Let Π ∈ R v be a profile of binary relations on X. We have:

Med R (Π) = [R(α), R(β)]. The number of R-medians of Π is 2 |R(β)\R(α)| . If R(β) \ R(α) = ∅ (in particular if
the number of voters is odd), then Π has a unique median.

Proof.

Let R be an R-median of Π. If R(α) ⊆ R is not satisfied, there exists (x , y ) ∈ X 2 with w(x, y) > 0 and (x, y) ∉ R. By Lemma 6.2 (d), we have:

E(Π, R ∪ {(x, y)}) = E(Π, R) -w(x, y) < E(Π, R), what is impossible, since R is a median of Π. Likewise, if R ⊆ R(β )
is not satisfied, there exists (x, y) ∈ X 2 with (x, y) ∈ R and w(x, y) < 0. By Lemma 6.2 (c), we have:

E(Π, R \ {(x, y)}) = E(Π, R) + w(x, y),
and still a contradiction. So, the R-medians of Π are in the interval [R(α), R(β)] and, since all the relations R of this interval have the same remoteness to the profile (i.e.,

E(Π , R) = E(Π , R(α)) = R i i=1 v ∑ - w( x, y) w( x, y)> 0 ∑
), this interval provides all the R-medians of Π.

And since we may add or not any element of R(β) \ R(α) to form an R-median of Π, we immediately get the number of these R-medians. ❑

The R-medians of Π are thus all the relations between the two majority relations of Π. They form the interval [R(α), R(β)] -called the median interval -of the Boolean lattice (R , ⊆) of all the binary relations. The last section of this chapter will come back on the links between medians and lattices, but we can already observe that the majority relations are obtained by means of the operations of this lattice i.e., by means of the union and of the intersection of relations. Indeed, we have

( ) U I α ≥ ⊆ ∈         = α W V W W i i R R and and ( ) U I β ≥ ⊆ ∈         = β W V W W i i R R and .

The M -medians of a profile of relations

We now consider the case where the collective preference relations associated to a profile Π are not arbitrary relations but must belong to a given set M of binary relations i.e., must be the M-medians of Π. We can always consider the R-medians of Π i.e., the median interval [R(α), R(β)], but this interval may contain no relation belonging to M. For example, if D and M are both the set of the linear orders on three candidates x, y and z, it is easy to see that the R-medians of the profile formed by the three linear orders x > y > z, y > z > x and z > x > y is the reflexive relation R defined by xRy, yRz and zRx; this relation is not a linear order (it is a 3-cycle!). In fact we have the following, obvious but not uninteresting, result:

PROPOSITION 6.5.-Let Π ∈ R v and M ⊆ R. If M ∩ Med R (Π) ≠ ∅, then Med M (Π) = M ∩ Med R (Π). Proof.
Indeed, if a relation of M belongs to the median interval of a profile Π, then this relation (as well as all the other relations of M belonging to this interval) minimizes the remoteness of the profile to any relation of M, since it minimizes this remoteness on the set of all binary relations. ❑

The T-medians of a profile of tournaments

We now restrict the relations modelling the individual and collective preferences of the voters by assuming that they are tournaments. A tournament T on X is a complete (i.e., xTy not satisfied implies yTx) and antisymmetric (i.e., xTy and yTx imply x = y) relation. A tournament that is also transitive (i.e., xTy and yTz imply xTz) is a linear order (the classical -and simplest -model of transitive preference). But preference relations which are non-transitive tournaments often appear, for instance when a voter is asked what his preferred candidate is in each pair of candidates (it is the so-called paired-comparison method). We denote by T (respectively, L) the set of tournaments (respectively, linear orders) defined on X . It immediately follows from the properties of tournaments that, for a profile Π = ( T 1 , T 2 , …, T v ) ∈ T v (and in particular for Π ∈ L v ), we have for all x and y:

c v Π (x, y) = v Π (y, x) if x ≠ y; c v Π (x, x) = 0; Π w (x, y) = 2v Π (x, y) -v; w Π (x, x) = v; v Π (x, y) + v Π (y, x) = v if x ≠ y; v Π (x, y) + v Π (y, x) = 2v if x = y.
As above, when there is no risk of ambiguity i.e., almost always, we omit the index Π in the notation. The remoteness of a tournament T to a profile of tournaments Π = (T 1 , T 2 , …, T v ) is then given by:

E(Π, T) = v y, x ( ) ( x, y)∈T ∑ + v x, y ( ) ( x, y)∉T ∑ = v.n (n +1) 2 - w( x, y) ( x, y)∈T ∑ .
With this formula and Proposition 6.5, we easily find all the median tournaments of a profile of tournaments i.e., all the tournaments T minimizing E(Π, T) in the set T of all the tournaments defined on X. PROPOSITION 6.6.-Let Π ∈ T v be a profile of tournaments. Then Med T (Π) = T ∩[R(α), R(β)]. Moreover, the number of median tournaments of Π is 2 |R(β) \ R(α)|/2 . The remoteness of a median tournament T to the profile Π is:

E(Π, T) = v.n (n +1) 2 - w( x, y) w( x, y)> 0 ∑ . Proof.
By Proposition 6.5, we have only to show that there always exists a tournament in the median interval [R(α), R(β)] of Π. Yet, we obtain such a tournament by adding, to the antisymmetric relation R(α), one and only one of the two ordered pairs (x, y) and (y, x) whenever x and y are ex aequo i.e., when v(x, y) = v(y, x). ❑

The median linear orders (L -medians) of a profile of linear orders

Let us consider now the case for which the voters' preferences are linear orders. Since linear orders are particular tournaments, we can apply the previous results to find the median tournaments of a profile Π of linear orders. These are the tournaments belonging to the median interval of Π, which contains always some tournaments, according to Proposition 6.6 stated above.

Everything may change if we search now for the median linear orders of Π i.e., the linear orders L minimizing E(Π, L) among the set L of linear orders defined on X. Indeed, as shown in the example given in Section 6.2.4 (before Proposition 6.5), the median interval of a profile of linear orders may contain no linear order (in this example, the median interval is reduced to the majority relation, and this single tournament is a circuit i.e., a directed cycle). We must then distinguish between two cases. In the first case, there exists a linear order in the median interval of Π or, equivalently, the strict majority relation R(α) of Π has no circuit. In this case (according to Proposition 6.6), the median orders of Π are all the linear orders belonging to the median interval, i.e. all the linear orders that contain the relation R(α) (it is well-known that a relation is contained in a linear order if and only if the relation has no circuit). The second case is the one where the median interval of the profile contains no linear order or, equivalently, the case where the strict majority relation contains a circuit. In this case, we say that a Condorcet effect occurs2 . The possible existence of a Condorcet effect has the following consequence. Whereas obtaining median relations or median tournaments of a profile was easy, the problem consisting in searching for a median linear order becomes hard (actually NP-hard, see Section 6.3.4) and requires the study of the properties of such orders and the use of combinatorial optimization methods to provide exact or approximate solutions. This issue will be the subject of this section (Section 6.3); in Section 6.4, we will come back to the "easy" case, which can be dealt with in the framework of "median semilattice".

Binary linear programming formulation

Consider a profile of linear orders Π = (L 1 , L 2 , ..., L v ) ∈ L v and a linear order L. We have seen in Section 6.2.3 (Lemma 6.2) that the remoteness E(Π, L) can be stated as:

E(Π, L) = L i i=1 v ∑ - w( x, y) (x ,y)∈L ∑ .
In order to formulate the remoteness with 0-1 variables, let us introduce the

characteristic function ρ = ρ xy ( ) x, y ( )∈X 2 of L.
It is defined from X 2 to {0, 1} by ρ xy = 1 if xLy, and ρ xy = 0 otherwise. As we have, for any

L i (1 ≤ i ≤ v), the relation 2 ) 1 ( + = n n L i
, we obtain the following formulation for the remoteness: It just remains to state the characteristic properties of a linear order as linear constraints. The reader will easily convince himself that these properties can be expressed as the following constraints:

E(Π, L) = v.n (n +1) 2 - w x, y ( ).ρ xy x, y ( )∈X 2
• reflexivity: ∀ x ∈ X, ρ xx = 1; • antisymmetry: ∀ (x, y) ∈ X 2 with x ≠ y, ρ xy + ρ yx ≤ 1; • completeness: ∀ (x, y) ∈ X 2 with x ≠ y, ρ xy + ρ yx ≥ 1; • transitivity: ∀ (x, y, z) ∈ X 3 , ρ xy + ρ yz -ρ xz ≤ 1.
Thus the determination of a median order is the same as the resolution of the following binary linear programming problem:

Maximize w x, y ( ).ρ xy x, y ( )∈X 2 ∑ under the constraints ( ) ( ) ( ) { }        ∈ ρ ∈ ∀ ≤ ρ - ρ + ρ ∈ ∀ = ρ + ρ ≠ ∈ ∀ = ρ ∈ ∀ 1 , 0 , , 1 , , , 1 , with , 1 , 2 3 2 xy xz yz xy yx xy xx X y x X z y x y x X y x X x .

Formulation using weighted directed graphs

Since a binary relation can be associated with a graph and conversely, we can formulate the problem with the help of graphs. The previous considerations show that the voters' preferences can be summarized by the data contained in the terms w(x, y) for any element x and any element y of X (with w(y, x) =w(x, y) for x ≠ y since we consider individual preferences that are linear orders; in the general case, the preferences can be summarized by the terms v(x, y)). Previous considerations show that minimizing the remoteness is the same as maximizing the sum w x, y

( ).ρ xy x, y ( )∈X 2 ∑ .
We can therefore summarize a profile Π = (L 1 , L 2 , ..., L v ) defined on X by a directed graph G = (X, X 2 ) (in other words, G contains all the possible arcs i.e., directed edges) in which each arc (x, y) is weighted by w(x, y); we will say that the weighted graph G represents the profile Π. Notice that the weights of the arcs (x, y) and (y, x), for x ≠ y, are opposite. Moreover, since w(x, y) is equal to 2 v(x, y) -v , all the weights have the same parity as v and are between -v (no voter prefers x to y) and v (all the voters prefer x to y, which is the case in particular if x = y). We may wonder which graphs represent profiles of linear orders. The works of Debord [DEB 87], extending those of McGarvey [MCG 53], give such a characterization, when the number of linear orders is large enough. THEOREM 6.7.-Let G = (X, X 2 ) be a graph containing all the possible arcs, which are weighted by a function w. Then G represents a profile of v (v > 0) linear orders if the following properties are satisfied: 1. for all (x, y) ∈ X 2 , w(x, y) has the same parity as v; 2. for all x ∈ X, w(x, x) = v; 3. for all (x, y) ∈ X 2 with x ≠ y, w(y, x) =w(x, y);

4. v ≥ ∑ ≠ y x y x w ) , ( 2
1
if this sum is not equal to 0, and v ≥ 2 otherwise.

In the sequel, we will say that a weight-function w satisfies the property (P) if it verifies the following conditions: 1. all the values taken by w have the same parity; 2. the quantities w(x, x) are the same for all x ∈ X; 3. for all (x, y) ∈ X 2 with x ≠ y, w(y, x) = -w(x, y). We will say that w satisfies the property (P′ ) if its values are non-negative and if it verifies the conditions 1 and 2 stated above.

Debord's proof of Theorem 6.7 consists in building a profile of linear orders from the graph G. The minimum number v of linear orders involved in this

construction is about ∑ ≠ y x y x w ) , ( 2
1
(the exact value depends on the parity of the weights w(x, y)); this quantity is not necessarily the minimum number of required linear orders 3 . Let us notice also that the construction performed by Debord to build the profile is polynomial if the quantities w(x, y) are upper-bounded by a polynomial in n or if the profile is represented in a slightly different manner than before: instead of describing the profile Π by enumerating the v orders of Π, we enumerate only the orders which are pairwise distinct and which appear in Π, along with the number of occurrences for each such order (see [HUD 89] for more details) 4 .

Similarly, we may associate a graph to the searched median order L. For this, it suffices to consider the graph of which the adjacency matrix admits the ρ xy 's as its entries, where ρ xy ( ) (x, y)∈X 2 still denotes the characteristic function of L. From a graph theoretic point of view, determining a linear order maximizing 3 There exist graphs G representing profiles of linear orders but that do not satisfy Condition 4 of Theorem 6.7. Except for some simple cases, we do not know how to characterize these graphs, nor even how to recognize them in polynomial time. 4 This graph theoretic representation of the profiles is used in particular to study the problem complexity, since its polynomiality allows to deal with the representative graphs rather than the profiles without changing qualitatively the obtained results. For instance, it can be used in order to prove Theorem 6.16 stated in Subsection 6.3.4. On the other hand, Theorem 6.7 provides also the characterization of a profile of v tournaments, with a slight adaptation: it suffices to replace Condition 4 by the inequality

) , (
) , ( max

y x y x w v ≥
. This inequality, with the parity of v and the fact that v is nonnegative, gives then all the possible values for v. A particular case is the one for which v is equal to 1 (the profile is reduced to one tournament, that can be for instance the majority tournament of a profile of linear orders): we obtain the problem stated by P. Slater [SLA 61] to fit a tournament to a linear order; in this case, all the weights w are equal to 1 or -1. w x, y ( ).ρ xy x, y ( )∈X 2 ∑ is then the same as selecting some arcs of G constituting a linear order and such that the sum of the weights of the selected arcs is maximum: these arcs (x, y) will be the ones defined by the equality ρ xy = 1.

Beyond this formulation, the properties of linear orders (constituting the profile as well as the one searched for the median relation) permit to state the search of a median order in several equivalent ways, what is the object of the following subsection.

Equivalent formulations for the search of a median order of a profile of linear orders

We can notice that, because of the relation w(y, x) =w(x, y) for x ≠ y, the weights of the arcs of the graph G, representing the profile Π, are partially redundant. Therefore we may keep only the arcs with positive weights or, for the pairs of arcs (x, y) and (y, x) weighted by zero, one of the two arcs chosen arbitrarily. We obtain then a non-negatively weighted tournament, which also represents the profile Π. This model can often be found in the literature, leading to new formulations for the problem of the search of a median linear order of a profile of linear orders. We give some examples below (without proving their equivalences 5 ; see [CHA 96b] or [CHA 07b] for more details). We start by recalling the three statements aforementioned: the first is the original one, the second is the one permitting to express the problem as a 0-1 linear programming problem; the third is the one obtained by considering the graph representing the profile. The solutions of Problems 6.8, 6.9 and 6.10 are thus the same, but are considered according to several points of view: as a binary relation for Problem 6.8, or as a set of binary variables (defining the characteristic function of the solution of Problem 6.8) for Problem 6.9, or even as a graph (of which the adjacency matrix is given by the solution of Problem 6.9) for Problem 6.10. PROBLEM 6.8.-Given a profile Π of v linear orders defined on X, determine a median linear order of Π. PROBLEM 6.9.-Given the integers w(x, y) satisfying the property (P), determine an optimal solution of the following problem:

Maximize w x, y ( ).ρ xy x, y ( )∈X 2 ∑ under the constraints ( ) ( ) ( ) { }        ∈ ρ ∈ ∀ ≤ ρ - ρ + ρ ∈ ∀ = ρ + ρ ≠ ∈ ∀ = ρ ∈ ∀ 1 , 0 , , 1 , , , 1 , with , 1 , 2 3 2 xy xz yz xy yx xy xx X y x X z y x y x X y x X x .
In order to state some of the following problems, we introduce some new notation. Let G = (X, A) be a graph whose arcs a are weighted by w(a). For any subset B of A, the quantity

∑ ∈ = B b b w B w ) ( ) (
will be called the weight of B.

PROBLEM 6.10.-Given a graph G = (X, X 2 ) containing all the possible arcs and such that each arc (x, y) is weighted by w(x, y), these weights satisfying property (P), determine L ⊂ X 2 with a maximum weight w(L) and such that (X, L) is the graph of a linear order defined on X.

For the following formulation, let us recall that a linear order is a transitive tournament and conversely. If we keep from G only the positively weighted arcs and some arcs with weights equal to zero in order to obtain a tournament T as specified above (see the beginning of Subsection 6.3.3), selecting in G an arc (x, y) with a non-positive weight (such an arc does not appear in T, but the reversed arc (y, x) does appear in T) is the same as reversing in T the arc (x, y) in order to recover (y, x). Thus we obtain the formulation of Problem 6.11 (known as the minimum reversing set problem in the case where all the weights are equal to 1; see [BAR 95a] or [CHA 07b]). Let us notice that an optimal solution of Problem 6.11 (a transitive tournament) still defines an optimal solution of Problem 6.8, i.e. a median order. PROBLEM 6.11.-Given a tournament T = (X, A) whose arcs (x, y) are weighted by weights w(x, y) that satisfy property (P′ ), determine a subset A ′ of A with a minimum weight and such that reversing the elements of A ′ in T transforms T into a transitive tournament.

A tournament T is transitive (i.e. represents a linear order) if and only if T contains no circuit of length greater than or equal to 3 (in terms of number of arcs) 6 . This remark could permit to prove the equivalence between the statement of Problem 6.11 and the one of Problem 6.12. More precisely, the optimal solutions of Problem 6.11 (subsets of arcs) are not necessarily the same as those of Problem 6.12. But it is easy to show that the weights of the optimal solutions of Problem 6.11 and Problem 6.12 are equal: the optimal subsets of arcs of these problems can differ only by some arcs with a weight equal to zero. PROBLEM 6.12.-Given a tournament T = (X, A) whose arcs (x, y) are weighted by weights w(x, y) that satisfy property (P′ ), determine a subset A ′ of A with a minimum weight such that the graph obtained from T by deleting the arcs of A ′ contains no circuit of length greater than or equal to 3.

The following formulation is a consequence of the one of Problem 6.12. Its only interest is to relate two problems that are sometimes studied separately (Problem 6.12 is a weighted formulation of the minimum feedback arc set problem, and Problem 6.13 is a weighted formulation of the maximum arc consistent set problem, also called the acyclic subdigraph problem). We will see however in the following that both problems do not behave similarly with respect to approximation algorithms. PROBLEM 6.13.-Given a tournament T = (X, A) whose arcs (x, y) are weighted by weights w(x, y) that satisfy property (P′ ), determine a subset A ′ of A with a maximum weight such that the graph (X, A′ ) contains no circuit of length greater than or equal to 3. Problem 6.14 states Problems 6.11 and 6.12 in terms of matrix (statement already used by P. Slater [SLA 61] to define its problem of fitting a tournament -in which all the weights are equal to 1 -into a linear order; this approach was also used by D.H. Younger [YOU 63]). For this, given a tournament T = ( X , A) whose arcs (x, y) are weighted by weights w(x, y) that satisfy property (P′ ), we define the

matrix M = ( ) ( ) 2 , X y x xy m ∈
of the weights of T by:

   ∈ = otherwise 0 ) , ( if ) , ( A y x y x w m xy .
PROBLEM 6.14.-Given the matrix M of the weights of a tournament weighted by w that satisfies property (P′ ), determine a same ordering on the lines and the rows of M such that the sum of the terms located below the diagonal is minimum. 7For the last formulation, we need some more sophisticated tools: hypergraphs, or systems of sets, which are a generalization of undirected graphs. More precisely, a hypergraph H = (Y, F) is a pair of sets constituted by a set Y , whose elements are called vertices, and by a subset F of the set of nonempty parts of Y covering all the elements of Y. If all the elements of F have cardinality equal to 2, we find back the usual notion of undirected graph without isolated vertex. Given a tournament T = (X, A), we consider here the hypergraph H(T) of the circuits of T: the vertices of H(T) are the arcs of T which are not loops and which the circuits of T go through, and the elements of F are the subsets of X defining the circuits of T. A vertex cover of a hypergraph H = ( Y , F ) is a subset Y ′ of Y such that any element of F (a nonempty subset of Y) contains at least one element of Y ′. For a tournament T whose arcs are weighted, each vertex of H(T) has a weight, which is the weight of the arc of T associated with the considered vertex of H(T); we can therefore define the weight of a vertex cover as the sum of the weights of its vertices. We obtain then the last formulation considered herein (already given in [BER 72] for Slater's problem): PROBLEM 6.15 Given a tournament T = (X, A) whose arcs (x, y) are weighted by weights w(x, y) that satisfy property (P′ ), determine a vertex cover with a minimum weight of the hypergraph H(T) of the circuits of T.

Any vertex cover of H(T) selects a subset of arcs of T which is a solution of Problem 6.12: removing these arcs in T leaves a graph without any circuit. In particular, a minimum vertex cover will provide an optimal solution of Problem 6.12, and hence an optimal solution of Problem 6.11, i.e. will define a median linear order by reversing these arcs.

Complexity of the search of a median order of a profile of linear orders

The theory of complexity (see [GAR 79] or [BAR 96]) studies the efficiency of algorithms and the intrinsic difficulty of a problem. Broadly speaking, an algorithm is said to be polynomial if the number of elementary operations (like arithmetic operations, or comparisons, and so on) performed to solve any given instance can be upper-bounded by a polynomial in the size of the considered instance. A problem is said to be polynomial if there exists an algorithm of polynomial complexity to solve it. There exist many problems for which we do not know any polynomial algorithm to solve them (which does not mean that such an algorithm does not exist). It is the case in particular for the NP-complete and the NP-hard problems 8 . From a practical point of view, the consequence of the NP-hardness of a problem is that the algorithms designed to solve this problem have large complexities (typically exponential): the computation time required to solve such a problem exactly may become prohibitive quickly when the size of the data increases. 9 Thus it is important, when dealing with the resolution of a problem from a practical point of view, to know its complexity. Theorem 6.16 gives the complexity of the aggregation of a profile of linear orders into a linear order ([ORL 81], [BAR 89], [DWO 01], [HUD 89]). THEOREM 6.16.-The problem of the determination of a median linear order of a profile of linear orders is NP-hard.

Other complexity results (as well as references) can be found in [WAK 86], [WAK 98] and in [HUD 08a] about the computation of median relations (including the proof of Theorem 6.16; see also [HUD 08b] for the complexity of other voting procedures). Except for some trivial cases, the problems of preferences aggregation are generally NP-hard or of unknown complexity. For instance, the aggregation of a profile of linear orders into a complete preorder is also NP-hard; similarly, Slater's problem (i.e., fitting a tournament into a linear order, which corresponds to a profile reduced to one tournament) is also NP-hard ([ALO 06], [CHA 07a], [CON 06]; see 8 A NP-complete problem is a decision problem (i.e. a problem in which a question is set whose answer is "yes" or "no") which belongs to the class NP (the class of nondeterministic polynomial decision problems: for any instance admitting the answer "yes", it is possible to check in polynomial time, still with respect to the size of the instance, that the answer is really "yes", with the help of a solution provided by someone who guesses such a solution) and which is at least as difficult as any other problem of NP. Indeed, NP-complete problems constitute the most difficult problems inside the class NP: the existence of a polynomial algorithm solving such a problem would involve the existence of polynomial algorithms for all the problems of NP. A NP-hard problem, which may be a decision problem or not, is a problem at least as difficult as a NPcomplete problem. A decision problem can be associated canonically with an optimization problem; if this decision problem is NP-complete, then the optimization problem is itself NP-hard. 9 In order to illustrate the increasing of a non-polynomial complexity, let us consider the method consisting in enumerating the n! linear orders and keeping the best one. If we suppose that we run a computer that can deal with one thousand millions of linear orders per second, it would take around 4 ms for n = 10, 77 years for n = 20, 8.4×10 1 3 centuries for n = 30, 2.6×10 2 9 centuries for n = 40 and almost 10 4 6 centuries for n = 50. also [CHA 07b] or [HUD 08c]). On the other hand, if there is no Condorcet effect (the majority tournament representing the profile has no circuit), the median linear orders are exactly the majority linear orders and thus can be computed in polynomial time.

Let us mention however a polynomial case which is not trivial: the aggregation of a profile of unimodal linear orders (see [BLA 48]). In order to define the structure of a unimodal order, we assume that the candidates are ordered following a criterion independent of the voters, and defining a linear order on the candidates noted p (for instance, for a political election, the usual scale going from extreme-left to extremeright, if we suppose that we can always identify the political membership of a candidate and distinguish any two candidates according to this criterion, which is not always an easy task in practice). Let x 1 p x 2 p ... p x n be the order of the candidates with respect to p , for an appropriate numbering of the candidates. We assume moreover that each voter attributes a numerical value to each candidate. With respect to the numbering induced by p , let γ k i be the value attributed by voter i (for

1 ≤ i ≤ v) to candidate x k (for 1 ≤ k ≤ n)
, all these values being distinct for any given i. We will say that the preference order L i of voter i is unimodal with respect to p if there exists an index k(i), with 1 ≤ k(i) ≤ n, such that the series

γ k i ( ) 1≤k≤k (i) is increasing and the series γ k i ( ) k(i)≤k≤n is decreasing (in the example
given previously of a political election, it means that the voter i has a favourite candidate x k(i) , and that the more we move away from this candidate, towards the left or the right, the less appreciated the candidates; but nothing is said about the respective values of two candidates located on both sides of x k(i) ). Hence this order is defined by x k L i x k′ if and only if we have

γ k i > γ ′ k i .
A profile of linear orders is said to be a profile of unimodal linear orders if there exists an order p defined on X such that all the orders of the profile are unimodal with respect to the order p . In this case, as stated above, the computation of a median linear order can be done in polynomial time (more precisely, the majority relation of unimodal linear orders is a unimodal linear order).

Exact and approximate methods

From the algorithmic point of view, a consequence of Theorem 6.16 is that we do not know, in general, any polynomial algorithm computing a median order exactly (and such an algorithm does not exist if P is different from NP). We are just going to present herein the main algorithmic directions to compute median orders, the problem being often stated through a weighted tournament (the interested reader will find some bibliographical references in [BAR 81], [HUD 97] or in [CHA 07b], in addition to those given below).

Because of the NP-hardness of the problem, exact methods have large complexities, and therefore do not allow solving large problems. These methods are mainly based on branch and bound methods, with several more or less sophisticated components. Notice in particular, for the design of an evaluation function, the application of the continuous relaxation to the formulation of Problem 6.9 stated above (the constraints Another possibility is to look for approximate solutions, with the hope to compute "good" solutions in a "reasonable" time. Some of these heuristics are specific to the considered problem (several dealt initially with Slater's problem, but they can often be generalized to the case of a weighted tournament; see for instance [ ). If the quality of some specific heuristics may decrease quite fast with the size of the considered instance, metaheuristics seem to provide good results in a limited amount of computation time. For instance, in the experiments reported in [CHA 06], dealing with 5790 tournaments with up to 100 vertices, the noising methods (see [CHA 02] for a presentation of these methods) could provide an exact solution in a negligible time for 5784 tournaments (the other six tournaments were solved exactly by a second application of the method).

We can also mention another type of methods to solve difficult problems: the probabilistic methods. These methods have been applied to tournaments in which all the weights are equal to 1 in [POL 86] and [POL 88]. In [POL 86], a recursive algorithm is designed to deal with several optimization problems, including the search of a partial graph without circuit in a given directed graph. Given a graph G = ( X , A) weighted by a function c with non-negative values, the algorithm provides for some values of a real parameter λ belonging to [0, 1], a partial graph

H = (X, B) with c(b ) b ∈B ∑ ≥ λ c(a ) a∈A ∑ + 1 -λ 2 ξ(G)
, where ξ(G) denotes the weight of a minimum (with respect to c) spanning tree of G. For the search of a maximum partial graph without circuit of a directed antisymmetric graph weighted by c which is the constant function equal to 1, the value λ = 0.5 gives some interesting results.

Indeed, we obtain an algorithm that selects in a tournament at least arcs.

The last possibility considered here is relative to approximation algorithms with performance guarantees (see [ VAZ 03]). Indeed, we can design a deterministic algorithm for Problem 6.13 stated above (search for a partial subgraph without circuit and of maximum weight) which maybe does not provide an optimal solution systematically but permits to obtain a solution not "too far" from an optimal solution. For this, it suffices to put the vertices of the tournament on a horizontal line, according to any numbering of the vertices, for instance x 1 , x 2 , ..., x n . With respect to this alignment, some arcs (that are not loops) are directed from the left to the right, and the others from the right to the left. The selection of the loops and of the arcs directed from the left to the right provides a partial graph without circuit of length greater than or equal to 3; let w 1 be the sum of the weights of these arcs. If w max denotes the weight of an optimal solution of Problem 6.13 for the considered tournament, we obtain then w max ≥ w 1 . By doing the same with the loops and the arcs directed from the right to the left, we obtain another solution of weight w 2 which verifies also the inequality w max ≥ w 2 . Let W be the sum of all the weights of the tournament: W = w(a) a ∈A

∑

. The loops (of weight v) being counted twice in the sum w 1 + w 2 , we obtain the following relations: w 1 + w 2 = W + n.v and w max ≤ W. We may assume without loss of generality that w 2 is at least as great as w 1 (otherwise we reverse the vertices numbering). Then we get the relations w max 2 < w 2 ≤ w max , or equivalently w max -w 2 w max < 1 2 : the relative error if we choose the solution associated with w 2 instead of an optimal solution cannot be greater than 50 %, for any considered tournament. So we can make a mistake but, in some extent, not a too large one10 .

Properties of median orders

In this subsection, we mention some properties of the median linear orders of profiles of linear orders. The first property can be established from a reasoning close to the one which ends the previous subsection. We assume here that the considered profile of linear orders is described by its representative tournament (see Subsection 6.3.3) and we focus on Problem 6.11 (inversion of a set of arcs of minimum weight in order to transform the tournament associated with the profile into a linear order). PROPOSITION 6.17.-Let T = (X, A) be the tournament associated with a profile Π of linear orders and let w be its weight function. Let L = x 1 > x 2 > ... > x n be a median order of Π. Then we have, for any i between 1 and n -1:

w( x j , x k ) ( x j , x k )∈A 1≤ j≤i<k≤ n ∑ ≥ w( x k , x j ) (x k , x j )∈A 1≤ j≤i<k ≤n ∑ . Proof.
Assume that there exists an index i for which the previous inequality is not satisfied. If we put the vertices of T on a horizontal line, the indices increasing from the left to the right, and if we split the vertices with indices between 1 and i from the others by a vertical line, the arcs which cross the vertical line from the right to the left have a total weight strictly greater than the total weight of the arcs crossing the line from the left to the right. Let us consider then the linear order L′ obtained by swapping the left part of the vertical line and the right part, that is the linear order L′ = x i+1 > ... > x n > x 1 > ... > x i . Since L′ requires the inversion of the same arcs as L except for the arcs which cross the vertical line (i.e. the arcs involved in one of the two sums in the statement of the proposition), it is easy to see than L′ would be necessarily better than L, a contradiction with the optimality of L. Hence the result. ❑

As shown by the following proposition ([YOU 63] and [JAC 69]), any interval of a median linear order is a median order of the subtournament induced by this interval. PROPOSITION 6.18.-Let T = (X, A) be the weighted tournament associated with a profile Π of linear orders and let L = x 1 > x 2 > ... > x n be a median order of Π. Then, for any i and any j with 1 ≤ i < j ≤ n, x i > x i+1 > ... > x j is a median order of the subtournament of T induced by x i , x i+1 , ..., x j .

Proof.

Assume that there exist two indices i and j for which Proposition 6.18 is false. Let L′ be the linear order obtained by replacing x i > ... > x j in L by a median order of the subtournament of T induced by x i , ..., x j . It is easy to see that then L′ would be better than L, a contradiction with the optimality of L. ❑

We can deduce the following corollary.

COROLLARY 6.19.-Let T = (X, A) be the weighted tournament associated with a profile Π of linear orders and let w be its weight function. Let L = x 1 > x 2 > ... > x n be a median order of Π. We assume that, for a ∈ A, no weight w(a) is equal to 0. Then, for any i between 1 and n -1, the arc between x i and x i+1 is directed from x i to x i+1 .

Proof.

It is sufficient to apply Proposition 6.18 with j = i + 1. ❑

In particular, if we apply Corollary 6.19 to a tournament T whose weights are equal to 1 (Slater's problem), we obtain a well-known result (see [REM 66]), specifying that the arcs between two consecutive vertices in any Slater order of T define a Hamiltonian path 11 of T. The link between median orders and Hamiltonian paths is also involved to prove Theorem 6.20. THEOREM 6.20.-Let Π be a profile of v linear orders defined on a same set X of n elements. Then, if v is even, the number of median orders of Π is between 1 and n!, and the bounds may be reached. If v is odd and large enough, the number of median orders of Π is between 1 and

n n n n 2 ! µ
, where µ is a constant.

Proof.

In both cases, the lower bound is trivial: it suffices for instance to consider the case of a profile consisting of the same linear order repeated v times.

If v is even, let us consider two opposite linear orders L 1 = x 1 > ...> x n and L 2 = x n > .. .> x 1 . The profile consisting in L 1 repeated v/2 times and in L 2 also repeated v/2 times is represented by a tournament in which all the weights are equal to 0 (for each candidate x and each candidate y, there exist as many voters preferring x to y as y to x). In this case, it is easy to see that all the linear orders defined on X are optimal solutions. Hence the result since, on the other hand, n! is a trivial upperbound of the number of median linear orders.

If v is odd, the weights of the arcs of the tournament T that represents Π are all odd, and so are not equal to 0. Therefore, according to the previous results, we can upper-bound the number of median orders of Π by the number of Hamiltonian paths in T. N. Alon showed [ALO 90] that this number is upper-bounded by

n n n n 2 ! µ ,
for some constant µ and for n large enough. ❑

The maximum number of median orders of a profile of v linear orders is not known exactly when v is odd. Some results (combinatorial or experimental) about some profiles seem to indicate that the maximum number of median orders admitted by a profile consisting in an odd number of linear orders is significantly lower than the number of Hamiltonian paths in the tournament representing this profile. The number of median orders can nevertheless be exponential for some profiles. More precisely, it is shown in [WOI 97] that, for a tournament whose weights are equal to 1 (Slater's problem), the number of optimal solutions can reach

exp ln3 4 3n -2 log 3 n -3 ( )      
when n is a power of 3. Since such a tournament can, via Theorem 6.7, be associated with a profile of linear orders, we deduce that this exponential number is a lower bound for the maximum number of median orders of a profile of linear orders.

Another property satisfied by the median linear orders is the unanimity rule (or Pareto principle). For a profile

( ) v L L L ..., , , 2 1 = Π of v linear orders, let U(Π) = ∩ 1≤i≤v
L i be the unanimous part of Π. The following theorem (see

[FEL 73], [MON 73] or [BAR 76])
shows that, if all the voters prefer a candidate x to a candidate y, then x must also be preferred to y in every median order of Π.

THEOREM 6.21.-Let Π be a profile of v linear orders and L be a median order of Π.

Then we have:

L U ⊆ Π) ( .
Finally, let us mention a last property: the consistency. If two profiles Π and Π′ of linear orders defined on X admit some common median orders, then the set of median orders of the concatenation of Π and Π′ is the set of median orders that are common to Π and Π′.

THEOREM 6.22.-Let ( ) v L L L ..., , , 2 1 = Π and ′ Π = ′ L 1 , ′ L 2 , ..., ′ L ′ v (
) be two profiles of v and v′ linear orders respectively. Let ΠΠ′ be the profile obtained by the concatenation of Π and Π′:

Π ′ Π = L 1 , L 2 , ... , L v , ′ L 1 , ′ L 2 , . .., ′ L ′ v ( ). Then we have: Med L (Π)∩Med L (Π′) ≠ ∅ ⇒ Med L (ΠΠ′) = Med L (Π)∩Med L (Π′).
This property of consistency is the most important in an outstanding axiomatic characterization of the median procedure due to Young and Levenglick ([YOU 78]), as well as in the characterization of the median procedure in median semilattices (see Theorem 6.28 below). Moreover, it remains true for all the metric medians (see [BAR 91]). Other properties of median orders are described in [BAR 81], [CHA 96b], [CHA 97], [CHA 07b] or, for the tournaments whose weights are equal to 1, in [LAS 97].

Medians in lattices and semilattices

Until now, we tackled the consensus problem by searching for medians of profiles of binary relations. We established that such a research, easy in some cases (arbitrary relations or tournaments), may become quite hard in other instances (median orders). The purpose of this section is to show that these results generalize in a wide extent. Indeed, one may define and search medians in any ordered set where a direct generalization of the symmetric difference distance exists, especially in every (finite) semilattice. Then, the search of median consensus follows similar lines in any set of objects (to aggregate) endowed with such an order, while the easiness of this search depends on the structural properties of the obtained ordered set. The "good" case corresponds to median semilattices, as presented in Section 6.4.3. Previously, we give the required basic notions on ordered sets in Section 6.4.1, with the examples of sets of binary relations ordered by inclusion. Especially, we precise the ordered set structure of the sets of those relations which are useful in preference modelling. In Section 6.4.2, we give a standard generalization of the symmetric difference distance in semilattices, with the associated formulas for the remoteness between a v-tuple and a single element. Section 6.4.4 gives a brief description of the arising difficulties when the semilattice is no longer a median one. Finally, some situations showing evidence of the efficiency of such latticial generalizations are presented in Section 6.4.5.

Ordered structures

We frequently consider a set D of relations which is (partially) ordered. That is, D is endowed with an order relation ≤ satisfying three properties: for any

R , R ′, R″ belonging to D, R ≤ R (reflexivity), R ≤ R ′ and R ′ ≤ R imply R = R ′ (antisymmetry), R ≤ R ′ and R ′ ≤ R″ imply R ≤ R″ (transitivity).
In most cases, this order is just the restriction to D of the inclusion order on the set P(X 2 ) of all binary relations on X. So, without other hypotheses, we consider this situation and write R ⊆ R′ instead of R ≤ R ′, and R ⊂ R ′ if, moreover, R ≠ R ′. The considered orders are generally "partial" orders in the sense of Chapter 1, but linear orders are allowed.

Given a subset A of D, a lower bound of A is a relation R in D such that R ⊆ A , for any A ∈ A. The subset A is lower bounded if it admits at least one lower bound. Similarly, an upper bound of A is a relation R in D such that A ⊆ R for any A ∈ A, and A is upper bounded if it admits at least one upper bound. If there is a greatest lower bound g of A, then g is the meet of A, denoted ∧A (the meet of two elements R and R ′ is denoted R∧R′ ). When the intersection ∩A of all the relations in A is again an element of D, we have ∧A = ∩A. Similarly, if there is a least upper bound l of A, then l is the join of A, denoted ∨A or ∪A if it corresponds to set union (the join of R and R ′ is denoted R∨R′ ). Remark that, if it exists, the minimum (resp. the maximum) of A is its meet (resp. its join).

The ordered set D is:

-a meet semilattice if any pair {R, R′ } of its elements has a meet R∧R′ , -a join semilattice if any pair {R, R′ } of its elements has a join R∧R′ , -a lattice if any pair has a meet and a join i.e., it is simultaneously a meet and a join semilattice. So, when D is linearly ordered, it is a lattice with, respectively, the minimum as meet and the maximum as join. The set P(X 2 ) is a lattice with set intersection and set union as, respectively, meet and join. Table 6.1 gives the ordinal structures for the inclusion order of often considered sets of reflexive and transitive binary relations on X . Set inclusion on the set L of linear orders, and, more generally, on the set T of tournaments, corresponds to an antichain structure where, for T, T′ ∈ T, T ⊆ T ′ implies T = T′. Nevertheless, the set T may be endowed with a lattice order as follows: start with a given arbitrary tournament T 0 . It is often convenient to choose T 0 as follows: set X = {1, 2, …, n} and take Let T 0 d = {(i, j) ∈ X 2 : j < i} be the (irreflexive) dual tournament of T 0 ; to any tournament T, we associate the relation I(T) of all inverse pairs in T (with respect to T 0 ) i.e., I(T) = {(i, j) ∈ T: j < i} = T∩ T 0 d . The correspondence T ↔ I(T) is one-toone between, on the one hand, the set T of all the tournaments on X , and, on the other hand, the set P(T 0 d ) of the sets of inverse pairs. The (lattice) inclusion order on P(T 0 d ) induces on T the order defined by: T ≤ T′ if and only if I(T) ⊆ I(T′ ). The minimum for this order is T 0 (with I(T 0 ) = ∅) and the maximum is

T 0 = {(i, j) ∈ X 2 : i ≤ j}.
T 0 d (I(T 0 d ) = T 0 d ).
The restriction to L of this order on T is still a lattice (permutohedron lattice), although this property is less immediate [GUI 63].

We have just observed that, either directly with set inclusion or with some change on this order, the considered sets of binary relations are all endowed with lattice structures (they are lattices or semilattices; see, for instance, [DAV 90] about ordered sets and lattices). This observation is strengthened by the fact that such structures are again found in other models of preferences or choices: valued (or fuzzy) relations [LEC 95], choice functions [MON 04]. Then, the study of the consensus problem at the more abstract level of lattice structures themselves has led to results particularizable to various situations (see for instance

[MON 90b], [BAR 91], [LEC 93], [LEC 95], [DAY 03]
). So, we now consider the general case of a meet semilattice (possibly a lattice) D whose elements are denoted s, t… For the case M = D , we aim to aggregate a profile Π = (t 1 , t 2 , … t v ) belonging to D v into a unique element t ∈ D.

In the case of binary relations on X , each ordered pair of elements of X may be considered as an elementary relation, a given relation R being decomposable into such elementary ones. Such a decomposition still exists in any semilattice D by taking into account its irreducible elements. An element t of D is said joinirreducible if it cannot be obtained as the join of a subset of D not containing t. Similarly, t is meet-irreducible if it is not the meet of a subset of other elements. Here, we only investigate the role of join-irreducibles, and just mention that same considerations apply to meet-irreducibles (though more rarely in practice). Let t ∈ D; we denote:

-S or S(D) the set of all the join-irreducibles of D; -S t the set of all the join-irreducibles s of D satisfying s ≤ t.

Then we have a representation of the elements of D by subsets of S, with two essential properties which are recalled in the following statement: THEOREM 6.23.-Let D be an ordered set. For any t ∈ D, the equality t = ∨S t holds; for all t, t′ ∈ D such that t∧t′ exists, the equality S t∧t′ = S t ∩S t′ holds.

So, the mapping t a S t from D to P(S) is a meet-morphism, in the sense that it preserves meets, and an order encoding, since it may be verified that, for any t, t′ ∈ D, we have t ≤ t′ ⇔ S t ⊆ S t′ . In the lattices and semilattices of Table 6.1: S(Q ) = S (O ) is the set of the orders on X with a unique ordered pair (x, y) of distinct elements; S(E ) is the set of the equivalences on X with a unique double ordered pair (x, y), (y, x) with distinct x and y; S(W ) is the set of the linear orders on X (it is known that a complete preorder is the union -and the join -of the linear orders that it contains).

Each join-irreducible element of the lattice T of tournaments corresponds to an ordered pair of T 0 d , with S(T) = {T ∈ T: |I(T)| = 1}. The join-irreducibles of the permutohedron lattice L are still associated to the ordered pairs of T 0 d , but in a more complex way: the join-irreducible associated to the ordered pair (x, y) ∈ T 0 d is the lowest linear order containing this ordered pair.

An important remark for the sequel is that, if t∨t′ exists, then we have S t ∪S t′ ⊆ S t∨t′ , but equality is not true in general. For instance, consider the lattice Q of preorders on X , three elements x, y, z of X and two preorders Q and Q′ such that (x, y) ∈ Q and (y, z) ∈ Q ′. Then, by transitivity, we have (x, z) ∈ Q∨Q′, although this pair does not necessarily belong to Q∪Q′.

Symmetric difference distance in semilattices and remoteness

The symmetric difference distance was previously defined in Section 6.2.2. It easily generalizes to any semilattice D with the use of the join-irreducible representation described just above. We now set, for any t, t′ ∈ D,

δ(t, t′ ) = |S t ∆S t′ | = |S t ∪S t′ | -|S t ∩S t′ | = |S t \ S t′ | + |S t′ \ S t | = |{s ∈ S: [s ∈ S t and s ∉ S t′ ] or [s ∉ S t and s ∈ S t′ ]}|.
In lattices or semilattices P(X 2 ) (binary relations), Q (preorders), E (equivalences), O (orders) and T (tournaments), we recover the number of ordered pairs by which the two relations R and R ′ differ, that is the symmetric difference distance as defined above. The situation of the permutohedron lattice L is the same. It differs in the join-semilattice W (complete preorders) where the count of differences is made on the linear orders which are or are not included in R and R′. Now we consider a profile Π = (t 1 , …, t i , …, t v ) ∈ D v . The following parameters are associated to Π and to any join-irreducible s ∈ S(D):

) (s v Π = |{i ∈ V: s ≤ t i }|; ) (s v c Π = |{i ∈ V: s / ≤ t i }|; ) (s w Π = v Π (s) - ) (s v c Π .
As above, the subscript Π is omitted in the notation when no ambiguity could arise (i.e., always in practice). The equalities v(s) + v c (s) = v and w(s) = 2v(s)v are satisfied. We say that a join-irreducible s is a majority one if 2v(s) > v (then s belongs to the representations of a strict majority of elements of the profile), and balanced if 2v(s) = v.

In order to tackle the aggregation of a profile Π of D v into a unique element t of D, we first give an expression of the remoteness E(Π, t) = δ(t, t i i=1 v ∑

) between Π and an arbitrary element t of D in terms of the previous parameters.

LEMMA 6.24.-For Π = (t 1 , …, t i , …, t v ) ∈ D v and t ∈ D, we have:

E(Π, t) = S ti i=1 v ∑ - w( s) s ∈S t ∑ .
This is nothing but a lattice version of the equality (b) of Lemma 6.2 (Subsection 6.2.3). Indeed it is obtained in a similar way. Then, the quantityw( s) appears as the contribution of the join-irreducible s of S t to the remoteness of t. As described previously, this contribution is negative if s is a majority join-irreducible, equal to zero if it is balanced and positive otherwise. To obtain a remoteness as low as possible (i.e., corresponding to a median), the best should be to find an element t of D of which the representation S t would contain all the majority join-irreducibles, and possibly some balanced ones, but no others. The aim of the next subsection is the recognition of those semilattices where such an element always exists.

Medians in median semilattices

We now assume that D is a meet semilattice, possibly a lattice, and we go further in the transposition to this case of some notions presented in Subsection 6.2.3. With S still being the set of the join-irreducibles of D, we set, for Π ∈ D v and for any integer σ:

S(Π, σ) = {s ∈ S: v(s) ≥ σ}.
In general, this set will be simply denoted as S(σ). Especially, with the numbers α and β of Subsection 6.2.3, S(α) is the set of the majority join-irreducibles and S(β) \ S(α) is the set of the balanced join-irreducibles (empty for odd v). PROPOSITION 6.25.-For any s, s′ ∈ S, s ∈ S(σ) and s′ ≤ s imply s′ ∈ S(σ).

Proof.

If s ∈ S(σ), then there exists a subset W ⊆ V such that |W| ≥ σ and s ≤ t i for any i ∈ W. Then, s′ ≤ s implies s′ ≤ t i for all i ∈ W. So, s′ ∈ S(σ).

❑

Provided that such elements exist, we set

t(σ) = ∨S(σ) and t′ (σ) = ∨{∧{t i : i ∈W}: W ⊆ V, |W| ≥ σ}.
The second expression has the form of a "lattice polynomial".

(1) for any t, t′, t″ ∈ D, t∧(t′ ∨t″ ) = (t∧t′ )∨(t∧t″ );

(2) for any t, t′, t″ ∈ D, t∨(t′ ∧t″ ) = (t∨t′ )∧(t∨t″ );

(3) s ∈ S, D′ ⊆ D and s ≤ ∨D′ imply s ≤ t for at least one element t ∈ D;

(4) for any t, t′ ∈ D, the equality S t ∪S t′ = S t∨t′ holds.

We do not give a complete proof of these classical equivalences. Just observe, for instance, that, when (1) is satisfied, the inequality s ≤ ∨D′ implies s = s∧(∨D′ ) = ∨{s∧t: t ∈ D′ }. Since s is join-irreducible, s = s∧t′ follows, that is s ≤ t′, for at least one element t′ of D′. Similarly, assume that (3) is satisfied and consider t, t′ ∈ D and s ∈ S t∨t′ . Then, s ≤ t or s ≤ t′ . Thus, S t∨t′ ⊆ S t ∪S t′ , which implies (4) since the converse inclusion is always true.

The class of distributive lattices is particularly important since it includes linear orders (with the maximum and minimum operations as join and meet), products of linear orders and also lattices of subsets endowed with set union and set intersection (that is, Boolean lattice). For instance, in the previous examples, the lattices P(X 2 ) and T are distributive.

By extension, a meet semilattice D is said distributive if, for any t ∈ D , the lattice {t′ ∈ D: t′ ≤ t} is distributive. A median semilattice [AVA 61] is a distributive meet semilattice D in which, for all t 1 , t 2 , t 3 ∈ D, t 1 ∨t 2 ∨t 3 exists as soon as the three elements t 1 ∨t 2 , t 1 ∨t 3 and t 2 ∨t 3 all exist. In such a semilattice, the element (t∧t′ )∨(t′ ∧t″ )∨(t″ ∧t) exists for any t, t′, t″ ∈ D. By straightforward algebraic calculations on its lattice polynomial form, the existence of t(α) follows (but not that of t(β)). We obtain the following characterization of medians for the distance δ in such semilattices [BAN 84]. It generalizes a series of results on medians in distributive lattices that begin with [BAR 61]: THEOREM 6.27.-Let D be a median semilattice and Π ∈ D v be a profile of D. If v is odd, then t(α) is the unique median of Π; if v is even, then the set of all the medians of Π is Med D (Π) = {∨S′: S(α) ⊆ S′ ⊆ S(β) and ∨S′ exists}.

Proof.

It was observed just after Lemma 6.24 that, when it exists, an element t satisfying S(α) ⊆ S t ⊆ S(β) minimizes E(Π, t). From the previous considerations and Proposition 6.26, t(α) = ∨S(α) exists for any profile of a median semilattice.

Let s ∈ S such that s ≤ t(α). From the property (3) of distributive lattices, it exists s′ ∈ S(α) such that s ≤ s′. Then, from Proposition 6.25, s ∈ S(α). So, S t(α) = S(α), which implies that t(α) is a median. We show in the same way that s ≤ ∨ S′ with S ′ ⊆ S(β) implies s ∈ S(β). Thus, the elements that have the same remoteness as S(α) are those with the form ∨S′, where S(α) ⊆ S ′ ⊆ S(β). If v is odd, then S(α) = S(β) and t(α) is the unique median. ❑

In particular, if D is a (distributive) lattice, one has the simple expression Med D (Π ) = { t ∈ D : t(α) ≤ t ≤ t(β)}, which generalizes the result given by Proposition 6.4 on the medians of a profile of binary relations. We shall emphasize in the sequel (Subsection 6.4.5) the interest of generalizing to median semilattices.

It is implicit, particularly when considering Theorem 6.22, that the median procedure constitutes an aggregation multiprocedure which associates a nonempty subset c(Π) ⊆ D to any profile of finite length Π ∈ D* = v∈N U D v . In median semilattices, this procedure has been axiomatically characterized [MCM 00]. Recall that an element s of a meet semilattice D is a join irreducible if and only if there exists a unique element s -of D such that s -≤ s, s -≠ s, and s -≤ s ′ ≤ s imply s′ = s -or s′ = s. For any two profiles Π = (t 1 , t 2 , …, t v ) and Π′ = (t′ 1 , t′ 2 ,…, t′ v′ ) belonging to D*, recall that the concatenation of Π and Π′ is the profile Π Π ′ = ( t 1 , …, t v , t′ 1 , …, t′ v′ ). We then obtain the following Theorem 6.28. Though considered structures and statements differ, one observe that the consistency property below is a direct generalization of the one appearing in the characterization of the median procedure applied to profiles of linear orders mentioned at the end of Subsection 6.3.6. As it is most frequently done in the literature, we have developed in this section the case of meet semilattices and, so, considered median (meet) semilattices. Of course, the above considerations may be done about join semilattices, with the exchange of joins and meets (meet irreducibles then replacing join irreducibles). We shall see below in Subsection 6.4.5 that the join semilattice W of complete preorders is precisely a "median join semilattice".

Other semilattices

As observed above, median semilattices constitute a type of structures where medians are simply characterized. Moreover, the median t(α) is easy to determine, as soon as the join operation and, for any t ∈ S, the computation of the set S t are. Otherwise, the research of medians for the symmetric difference distance in a lattice or semilattice of another type becomes generally hard [LEC 94].

In a distributive meet semilattice which is not a median one, the conclusions of Theorem 6.27 apply to every profile such that t(α) exists. Otherwise, the problem is to find the elements t of D of the type t = (∨S 1 )∨(∨S 2 ), where S 1 is a set of majority join-irreducibles such that ∨S 1 exists and maximizes w( s) s ∈S 1 ∑ under this condition, and such that S 2 is a set of balanced join-irreducibles such that t exists. Such a problem may become difficult.

When D is a meet semilattice which is not distributive, even the property that t(α) is a median is no longer guaranteed, since the representation S t(α) may include join-irreducibles s belonging to S \ S(β), for which the quantity w(s) is negative. Nevertheless, it remains some relations between medians and majority rule. They apply, for example, to the lattices of equivalences (or partitions) [BAR 95b] and of preorders, or to the semilattice of orders [LEC 03]: THEOREM 6.29.-Let D be a meet semilattice. For any profile Π of D such that t(β) exists and for any median t of Π, the inequality t ≤ t(β) holds; for any profile Π such that t(α) exists and for any median t of Π, there exists a median t′ such that t′ ≤ t∧t(α) and every element t″ satisfying t′ ≤ t″ ≤ t is a median.

Applications

As noticed above, Theorem 6.27, which characterizes medians in structures including distributive lattices, applies to the lattice of the subsets of any set and, thus, to the lattice P(X 2 ) of binary relations and to the lattice T of tournaments described above. A class of distributive lattices generalizing lattices of subsets is provided by direct products of linear orders. Such lattices naturally appear in many problems and modelizations. For instance, consider a multicriteria evaluation with k criteria, each of them taking its values in a finite linearly ordered set D i . An element

t of D is then equivalent to a k-tuple (t 1 , t 2 , …, t k ) ∈ D = D 1 × D 2 × … × D k .
It is not difficult to see that the medians of a v-tuple of such objects are obtained by taking one median value for each criterion.

Another example is given by the choice functions satisfying some properties. A choice function on X is a mapping ch: P*(X) → P*(X) (as in Subsection 6.2.1, P*(X) is the set of nonempty subsets of X) satisfying ch(Y) ⊆ Y for any Y ⊆ X. Such a function is assumed to represent the selection made by an agent among the elements of any nonempty subset Y of X. It is then natural to consider the collective choice of a group of agents as a consensus of choice functions. Among many axioms defining interesting classes of choice functions (cf. [ALE 07], [MON 04]), we have the following heritage property (H):

(H) For any Y, Z ⊆ X, Y ⊆ Z implies Y∩ch(Z) ⊆ ch(Y).
The set X of all the choice functions on X is naturally ordered by the pointwise order: for ch, ch′ ∈ X, ch ≤ ch′ if ch(Y) ⊆ ch′ (Y) for any Y ⊆ X . It is then shown that the ordered subset X H of those choice functions which satisfy the heritage property is a distributive lattice.

The previous examples deal with distributive lattices. Nevertheless, the extension to median semilattices in Theorem 6.27 is justified by the observation that such semilattices, which are not lattices, are frequently encountered. Consider a finite set E endowed with a symmetric binary relation C modelling a "compatibility" of some type. We are concerned with the set F of subsets F of E whose elements are pairwise compatible. In other terms, the subgraph induced by C on F is a clique (i.e., it is a complete subgraph). Then, ordered by inclusion, F is a median semilattice. For instance, if E is an ordered set and C its comparability relation, the cliques of C correspond to the linearly ordered subsets of E (also called the chains of E) and they constitute a median semilattice.

Here is an example of median semilattices of chains. Let us associate to any complete preorder W on X the (linearly ordered by inclusion) family N(W) of subsets of X defined by N(W) = {{y ∈ X: yWx}, x ∈ X}. We may check that there is a oneto-one correspondence between, on the one hand, the set W of all the complete preorders on X and, on the other hand, the set N of all the chains of P(X) including X. Moreover, one has W ⊆ W′ ⇔ N(W′ ) ⊆ N(W). From the above considerations, N is a median semilattice. Since the inclusion order on N is (order) dual to the semilattice W described in Table 6.1, this one is a so-called median join semilattice. The join irreducible elements of N correspond to the meet irreducibles of W, and the symmetric difference distance δ on N counts the subsets of X present in exactly one of the chains N(W) and N(W′ ). In fact, with this metric, we often obtain median chains with few subsets of X , what corresponds to poorly discriminant complete preorders.

The choice functions satisfying the following Arrow condition (A) correspond to a similar case. This condition (A) implies the heritage (H) and characterizes those choice functions which are rationalizable by a complete preorder, that is, if ch satisfies (A), there exists a complete preorder W on X such that ch(Y) is the set of the maximal (for W) elements of Y . The set X A of the choice functions satisfying Condition (A) is a median semilattice, isomorphic to N and dual to W.

Conclusion

We come back to the various notions of medians seen in this chapter, in particular in order to give some historical information12 . We begin with the notions found in all books on statistics. Consider a population totally preordered according to the values of a linearly ordered variable, for example the age for a population of individuals. The median age of this population is the one for which there are as many individuals with an age lower than the median age as individuals with a greater age. When there are v = 2p individuals ranked by increasing age, each age (strictly) included between the ages of the p-th and the (p + 1)-th individual satisfies this property and is thus a median; one has a "median interval" (in this case, statisticians often choose as median age the mean between the two ages that are the bounds of the median interval). Two observations can be made on the median(s) of a distribution. On the one hand, a median is a solution of an optimization problem: it minimizes the sum of its distances to the different values taken by the variable on the population (these values being weighted by their number of occurrences). This is a consequence of a more general result, due to Laplace, on the median of a probability distribution [LAP 1774]. On the other hand, at least when the median is unique, it can be obtained by an algebraic expression using the operations Max and Min. For instance in the simplest case where the values of the variable for three individuals are a, b, c with a < b < c, the median b is given by the formula b = Min[Max(a, b), Max(b, c), Max(c, a)]. 13The first observation leads to the notion of metric median. In a metric space (E, d), a median of a v-tuple (t 1 , t 2 …, t v ) is an element t of E minimizing the sum

d t, t i ( ) i=1 v ∑
of the distances of t to the elements of the v-tuple. This is in fact an old notion since it appears in a famous challenge proposed by Fermat in his Essai sur les maximas et les minimas [FER 1629]: "Let he who does not approve of my method attempt the solution of the following problem: given three points of the plane, find a fourth point such that the sum of its distances to the three given points is a minimum" (here, the distance between two points P and Q is the length of the segment PQ). So one must find the median point of three points of the plane for the usual Euclidean metric (contrary to a frequent error, this median point is not the intersection point of the three medians of the triangle formed by the three points 14 ). Fermat's problem and its numerous various generalizations will be a recurrent topic in pure or applied mathematics literature. In particular, one of these generalizations appears in Alfred Weber's book Über den Standort der Industrien [WEB 1909] where the problem consists in finding the median of v weighted points of the plane (in the theory of optimal location, one speaks now about Fermat-Weber's problem). On the other hand, at the beginning of the 20th century, the Italian statistician Gini considered the problem to find the central value of a multidimensional statistical series. In [START_REF] Gin | [END_REF]] he proposed to adopt as central value the (multidimensional) value nearest -according to the sum of the Euclidean distances -of the observed values and he called it the median of the statistical series. One of Gini's motivations was to palliate Quételet's mean man "paradox". Recall that Quételet considered a population of men described by several measurable characteristics and he defined the mean man as the man obtained by taking the means (in the usual sense) of the values of the attributes in the population. The problem (quickly pointed out by Cournot) is that this mean man will be generally an impossible man. With the same motivation to palliate Quételet's defective definition, the mathematician Fréchet (creator of the notion of metric space in 1904) proposed in [FRÉ 1949] to introduce a distance in the space of the observations (which can be elements of any nature) and to take as "typical value" of a v-tuple of observations their (metric) median. By the way, observe that this median (just as the mean in an Euclidean space) has no reason to be one of the observed values. Thus, this notion of metric median has been since a long time a possible solution of the problem to find central value of data of various nature. In order to use this median, it is sufficient to be able to define a distance in the set of possible data. An example of this approach is described in Section 6.2 of this chapter when data are binary relations. There, the distance between two relations is the symmetric difference distance. The studied relations are first arbitrary (6.2.3), afterwards tournaments (6.2.5), and then linear orders (6.3). But, in this last case, which is for instance the one where we want to aggregate voters' preferences assumed to be linear orders into a "consensus" linear order, computing the median (linear orders) can be a very difficult combinatorial optimization problem (since it is NP-hard; see Subsection 6.3.4). It is why Section 6.3 develops different formulations of the problem consisting in searching for the median (linear) orders (especially as a 0-1 linear programming problem) and gives several properties of these median orders useful for this research.

At the opposite, when in Subsections 6.2.3 et 6.2.5 we search for the medians of a profile of arbitrary relations or the median tournaments of a profile of tournaments, the answer is easily obtained from the two (strict and not strict) majority relations associated to the profile. And we recover the notion of metric median: indeed, as shown by formulas just before Subsection 6.2.4, these two majority relations are expressed by algebraic formulas in the Boolean lattice of the subsets of a set with the two binary operations of this lattice, namely the intersection and the union. Moreover, the definition of these relations as union of majority ordered pairs (Definition 6.3) makes them a generalization of the definition of medians in a linearly ordered set as the element(s) dividing the population into two halves. Indeed, if for example, we consider the case of a (2p + 1)-tuple of distinct elements of a linearly ordered set, the median is the maximum of the majority elements in the sense of Subsection 6.4.2 (i.e., the maximum of these elements less than a majority of elements of this tuple).

Finally, the interesting question both for practical and theoretical reasons is thus to be able to recognize the "good" discrete (since here we only consider finite structures) metric spaces. They are those metric spaces where finding medians is possible since they are given by algebraic expressions generally easily computable. These metric spaces are the so-called median semilattices 15 . They are endowed with a distance, which generalizes the symmetric difference distance between sets (and relations). The median semilattices that are lattices are exactly the distributive lattices. Two special cases of distributive lattices seen above are the linearly ordered sets and the Boolean lattices (for instance, the Boolean lattices of all the binary relations defined on a set). In Subsections 6.4.1 and 6.4.2 we first consider the natural distance, which can be defined on any (finite) semilattice. Afterwards, Subsection 6.4.3 is devoted to median semilattices. In such semilattices the so-called join-irreducible elements generalize either the elements of a linearly ordered set or the ordered pairs of binary relations. And the formulas of Theorem 6.27 show that in a median semilattice the medians of a v-tuple of elements are obtained by the join operation on the (strict or not strict) majority join-irreducible elements of this v-tuple. When the median semilattice is a distributive lattice, we get the formulas using the meet and the join operations, which generalize the formulas given just before Subsection 6.2.4. Last, Subsection 6.4.4 comes back on the case of some other semilattices for which we can give indications on the location of medians.

To conclude, we see that very various motivations and works of "pure" or "applied" mathematics have met for the elaboration of a theory of the median procedure. This procedure is useful 16 in the many domains where discrete data must be aggregated. However one must take care not to confuse different levels. On the one hand, the theory shows that the median procedure is conveniently usable when the data can be considered as elements of a particular ordered structure, namely a median semilattice (and, as a very particular case, a linearly ordered set) since then the computation of medians is generally easy. On the other hand, one can apply the 15 In order not to increase this chapter, we do not speak here about the median graphs which are the undirected graphs that, suitably oriented, are the covering graphs of the median semilattices. These graphs, which in particular contain chains and trees, have many characterizations (see, for example, [BAN 84]) and various generalizations (see, for example, [MUL 80]). 16 Like any central value, the median (procedure) has good properties (for example, those of Theorem 6.28), but it can also have drawbacks. The main one is probably the possible non-uniqueness of the median (see, for example, Theorem 6.20 and what is said after it). median procedure to data that are themselves orders. It is precisely the case when one searches to aggregate profiles of linear orders into a median (linear) order. But since the set of all linear orders is not a median semilattice, to obtain these median orders becomes difficult. The last section of this chapter gives some other examples of "good" cases, for instance the cases of some sets of choice functions. So, the final slogan could be: if you have to aggregate non numerical discrete data, first look for an underlying median semilattice.

  first relation. Adding and subtracting v( x, y) ( x, y)∈R ∑ , we obtain (b):

∑

  are the terms ρ xy for x, y ( ) ∈X 2 , this formulation allows us to consider E(Π, L) as the objective function of a linear programming problem with binary variables ρ xy . As minimizing a function is the same as maximizing its opposite (with opposite signs for the optima), minimizing E(Π, L) is the same as maximizing w up to an additive constant, which will be omitted in the sequel.

  THEOREM 6.28.-Let D be a median semilattice and let c: D* → (P(D) \ {∅}) be an aggregation multiprocedure. Then, c is the median procedure if and only if it satisfies the following three properties: Condorcet: Π ∈ D v with even v, s ∈ S(D), 2v(s) = v, t ∈ D and t∨s exists imply [t∨s -∈ c(Π) ⇔ t∨s ∈ c(Π)]. Consistency: Π, Π′ ∈ D* and c(Π)∩c(Π′) ≠ ∅ imply c(ΠΠ′) = c(Π)∩c(Π′). Faithfulness: Π ∈ D imply c(Π) = {t}.

  (A) For any Y, Z ⊆ X, Y ⊆ Z and Y∩ch(Z) ≠ ∅ imply Y∩ch(Z) = ch(Y).

Table 6 .

 6

1. Ordinal structures of often considered sets of reflexive and transitive binary relations

Chapter written by Olivier HUDRY, Bruno LECLERC, Bernard MONJARDET and Jean-Pierre BARTHÉLEMY. Olivier Hudry would like to thank Lucile Denoeud-Belgacem very much for her help in the translation of his part of this chapter.

The possible existence of circuits in the majority relation was indeed shown by Condorcet in his work[CAR 1785], where he advocates the use of this relation. A sharp analyse [YOU 88] of Condorcet's propositions -not always very clear -in order to overcome the existence of such circuits has also led to credit him with the paternity of the process providing the median orders of a profile of linear orders. Actually, this process may be defined in many ways (cf. [MON 90a]), which explains the fact that it has been proposed by several authors, amongst whom the first seems to be J.G. Kemeny, hence the name of Kemeny rule (see [KEM 59]).

These formulations are often known under different names. Some of them have been mentioned above, such as problem of the median order or Kemeny rule, but we can also find Linear Order Problem or Linear Ordering Problem, and so on. We specify some of these names in the following.

In other words, there must be no circuit except the loops (x, x), for x ∈ X, which are characteristic of the reflexivity (remember that, by definition of a tournament, there is no circuit of length 2).

A variant, linked to Problem 6.13, would consist in maximizing the sum of the terms located above the diagonal. It is then a particular case of the problem met in economics under the name of "triangulation" of a square table of coefficients that reflect industrial exchanges (see for instance [GRÖ

84] or [REI 85]).

Notice that, for the existence of algorithms with performance guarantees, the eight problems stated in Subsection 6.3.3 are not necessarily equivalent. Indeed, the process described above cannot be applied to Problem 6.12, because of the lack of a lower bound for the minimum value of this problem which would be proportional to W but not equal to zero.

Remember that a Hamiltonian path of T is a path going through each vertex of T exactly once.

For more historical developments on the various notions of median, the reader is referred to [MON 91] and[MON 2008].

When there is a median interval, its two bounds are given by algebraic formulas.

This last point, the gravity center of the three points, minimizes the sum of the squared distances.

Recall a general property of meet semilattices: any upper bounded subset admits a join, precisely the meet of its upper bounds. As a consequence, for any t ∈ D, the ordered subset {t′ ∈ D: t′ ≤ t} is a lattice. PROPOSITION 6.26.-If one of the elements t(σ) and t′ (σ) exists, then, the other exists also, and t(σ) = t′ (σ).

Proof.

Assume that t′ (σ) exists, and let s ∈ S(σ). So, there is a subset W ⊆ V such that |W| ≥ σ and s ≤ t i for all i ∈ W. Then s ≤ ∧{t i : i ∈W} ≤ t′ (σ)}, and t′ (σ) is an upper bound of S(σ). Thus, t(σ)= ∨S(σ) exists, with t(σ) ≤ t′ (σ).

On the other hand, according to Theorem 6.23, the join-irreducible representation is a meet-morphism. Thus, for |W| ≥ σ,

Then, the element t(σ) = ∨S(σ) exists, according to the first part of this proof, and is an upper bound of ∧ i∈W t i = ∨S ∧{t i : i ∈W} . Since t′ (σ) is the join of elements which all admit t(σ) as an upper bound, we have t(σ) ≥ t′ (σ).

Conversely, assume that t(σ) exists. It is then an upper bound of each meet ∧{t i : i ∈ W} with |W| ≥ σ, what implies that t′ (σ) exists, and one may apply the previous results. ❑ Following this proposition, we have a polynomial expression for t(α):

This lattice formalization of the majority rule generalizes the expression given at the end of Subsection 6.2.3.

The element t(α) is also given by its representation S t(α) :

The representation S t(α) contains all the majority join-irreducibles, but also, in general, other join-irreducibles which are neither majority nor balanced ones. Now we describe a particular type of meet semilattices, where the join-irreducible representation is not only a meet-morphism but also a join-morphism. First, a lattice D is said distributive if it satisfies one of the following equivalent conditions: