Calculate the \(L^{(1)}\) scores.

## Usage

```
L1Scores(powerRelation, elements = powerRelation$elements)
L1Ranking(powerRelation)
lexcel1Scores(powerRelation, elements = powerRelation$elements)
lexcel1Ranking(powerRelation)
```

## Arguments

- powerRelation
A

`PowerRelation`

object created by`PowerRelation()`

or`as.PowerRelation()`

- elements
Vector of elements of which to calculate their scores. By default, the scores of all elements in

`powerRelation$elements`

are considered.

## Value

Score function returns a list of type `L1Scores`

and length of `powerRelation$elements`

(unless parameter `elements`

is specified).
Each index contains a vector of length `powerRelation$eqs`

, the number of
times the given element appears in each equivalence class.

Ranking function returns corresponding `SocialRanking`

object.

## Details

Similar to `lexcelRanking()`

, the number of times an element appears in each equivalence class is counted.
In addition, we now also consider the size of the coalitions.

Let \(N\) be a set of elements, \(\succsim \in \mathcal{T}(\mathcal{P})\) a power relation, and \(\Sigma_1 \succ \Sigma_2 \succ \dots \succ \Sigma_m\) its corresponding quotient order.

For an element \(i \in N\), construct a matrix \(M^\succsim_i\) with \(m\) columns and \(|N|\) rows. Whereas each column \(q\) represents an equivalence class, each row \(p\) corresponds to the coalition size.

$$(M^\succsim_i)_{p,q} = |\lbrace S \in \Sigma_q: |S| = p \text{ and } i \in S\rbrace|$$

The \(L^{(1)}\) rewards elements that appear in higher ranking coalitions as well as in smaller coalitions. When comparing two matrices for a power relation, if \(M^\succsim_i >_{L^{(1)}} M^\succsim_j\), this suggests that there exists a \(p^0 \in \{1, \dots, |N|\}\) and \(q^0 \in \{1, \dots, m\}\) such that the following holds:

\((M^\succsim_i)_{p^0,q^0} > (M^\succsim_j)_{p^0,q^0}\)

\((M^\succsim_i)_{p,q^0} = (M^\succsim_j)_{p,q^0}\) for all \(p < p^0\)

\((M^\succsim_i)_{p,q} = (M^\succsim_j)_{p,q}\) for all \(q < q^0\) and \(p \in \{1, \dots, |N|\}\)

## Example

Let \(\succsim: (123 \sim 13 \sim 2) \succ (12 \sim 1 \sim 3) \succ (23 \sim \{\})\). From this, we get the following three matrices:

$$ M^\succsim_1 = \begin{bmatrix} 0 & 1 & 0\\ 1 & 1 & 0\\ 1 & 0 & 0 \end{bmatrix} M^\succsim_2 = \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 1\\ 1 & 0 & 0 \end{bmatrix} M^\succsim_3 = \begin{bmatrix} 0 & 1 & 0\\ 1 & 0 & 1\\ 1 & 0 & 0 \end{bmatrix} $$

From \((M^\succsim_2)_{1,1} > (M^\succsim_1)_{1,1}\) and \((M^\succsim_2)_{1,1} > (M^\succsim_3)_{1,1}\) it immediately follows that \(2\) is ranked above \(1\) and \(3\) according to \(L^{(1)}\).

Comparing \(1\) against \(3\) we can set \(p^0 = 2\) and \(q^0 = 2\). Following the constraints from the definition above, we can verify that the entire column 1 is identical. In column 2, we determine that \((M^\succsim_1)_{1,q^0} = (M^\succsim_3)_{1,q^0}\), whereas \((M^\succsim_1)_{p^0,q^0} > (M^\succsim_3)_{p^0,q^0}\), indicating that \(1\) is ranked higher than \(3\), hence \(2 \succ 1 \succ 3\) according to \(L^{(1)}\).

## Aliases

For better discoverability, `lexcel1Scores()`

and `lexcel1Ranking()`

serve as aliases for `L1Scores()`

and `L1Ranking()`

, respectively.

## References

Algaba E, Moretti S, Rémila E, Solal P (2021).
“Lexicographic solutions for coalitional rankings.”
*Social Choice and Welfare*, **57**(4), 1--33.

## See also

Other ranking solution functions:
`L2Scores()`

,
`LPSScores()`

,
`LPScores()`

,
`copelandScores()`

,
`cumulativeScores()`

,
`kramerSimpsonScores()`

,
`lexcelScores()`

,
`ordinalBanzhafScores()`

## Examples

```
pr <- as.PowerRelation("(123 ~ 13 ~ 2) > (12 ~ 1 ~ 3) > (23 ~ {})")
scores <- L1Scores(pr)
scores$`1`
#> [,1] [,2] [,3]
#> [1,] 0 1 0
#> [2,] 1 1 0
#> [3,] 1 0 0
# [,1] [,2] [,3]
# [1,] 0 1 0
# [2,] 1 1 0
# [3,] 1 0 0
L1Ranking(pr)
#> 2 > 1 > 3
# 2 > 1 > 3
```