# RA: Random arrival rule In ClaimsProblems: Analysis of Conflicting Claims

## Description

This function returns the awards vector assigned by the random arrival rule (RA) to a claims problem.

## Usage

 `1` ```RA(E, d, name = FALSE) ```

## Arguments

 `E` The endowment. `d` The vector of claims. `name` A logical value.

## Details

Let E≥ 0 be the endowment to be divided and let d be the vector of claims with d≥ 0 and such that the sum of claims exceeds the endowment.

For each subset S of the set of claimants N, let d(S) be the sum of claims of the members of S.

The random arrival rule considers all the possible arrivals of the claimants and applies the principle “first to arrive, first to be served". Then, for each order, the corresponding marginal worth vector assigns to each claimant the minimum of her/his claim and what remains of the endowment. The rule averages all the marginal worth vectors considering all the permutations of the elements of N.

Let Π denote the set of permutations of the set of claimants N and |Π| its cardinality. Given a permutation π and a claimant i let π(≤ i) denote the set of claimants that precede i in the order π, that is, π(≤ i)={j: π(j)<π(i)}.

The random arrival rule assigns to each (E,d) and each i the value:

RAi(E,d)=1/|Π| ∑ min{ di, max{0,E-d(π(≤ i))} }, where the sum is taken over the set of permutations Π.

The random arrival rule corresponds to the Shapley value of the associated (pessimistic) coalitional game.

## Value

The awards vector selected by the RA rule. If name = TRUE, the name of the function (RA) as a character string.

## References

O'Neill, B. (1982). A problem of rights arbitration from the Talmud. Math. Social Sci. 2, 345-371.

Thomson, W. (2019). How to divide when there isn't enough. From Aristotle, the Talmud, and Maimonides to the axiomatics of resource allocation. Cambridge University Press.

 ```1 2 3 4 5 6``` ```E=10 d=c(2,4,7,8) RA(E,d) D=sum(d) #The random arrival rule is self-dual: RA(E,d)= d-RA(D-E,d) d-RA(D-E,d) ```