Apply transitive closure over power relation that has cycles.

## Arguments

- powerRelation
A

`PowerRelation`

object created by`PowerRelation()`

or`as.PowerRelation()`

## Value

`PowerRelation`

object with no cycles.

## Details

A power relation is a binary relationship between coalitions that is transitive. For coalitions \(a, b, c \in 2^N\), this means that if \(a \succ b\) and \(b \succ c\), then \(a \succ c\).

A power relation with cycles is not transitive. A transitive closure over a power relation removes all cycles and turns it into a
transitive relation, placing all coalitions within a cycle in the same equivalence class.
If \(a \succ b \succ a\), from the symmetric definition in `PowerRelation()`

we
therefore assume that \(a \sim b\). Similarly, if
\(a \succ b_1 \succ b_2 \succ \dots \succ b_n \succ a\), the transitive closure turns it into
\(a \sim b_1 \sim b_2 \sim \dots \sim b_n\).

`transitiveClosure()`

transforms a `PowerRelation`

object with cycles into a `PowerRelation`

object without cycles.
As described above, all coalitions within a cycle then are put into the same equivalence class
and all duplicate coalitions are removed.

## Examples

```
pr <- as.PowerRelation("1 > 2")
# nothing changes
transitiveClosure(pr)
#> 1 > 2
pr <- suppressWarnings(as.PowerRelation("1 > 2 > 1"))
# 1 ~ 2
transitiveClosure(pr)
#> (1 ~ 2)
pr <- suppressWarnings(
as.PowerRelation("1 > 3 > 1 > 2 > 23 > 2")
)
# 1 > 3 > 1 > 2 > 23 > 2 =>
# 1 ~ 3 > 2 ~ 23
transitiveClosure(pr)
#> (1 ~ 3) > (2 ~ 23)
```