transitiveClosure {socialranking}R Documentation

Transitive Closure

Description

Apply transitive closure over power relation that has cycles.

Usage

transitiveClosure(powerRelation)

Arguments

powerRelation

A PowerRelation object created by PowerRelation() or as.PowerRelation()

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.

Value

PowerRelation object with no cycles.

Examples

pr <- as.PowerRelation("1 > 2")

# nothing changes
transitiveClosure(pr)


pr <- suppressWarnings(as.PowerRelation("1 > 2 > 1"))

# 1 ~ 2
transitiveClosure(pr)


pr <- suppressWarnings(
  as.PowerRelation("1 > 3 > 1 > 2 > 23 > 2")
)

# 1 > 3 > 1 > 2 > 23 > 2 =>
# 1 ~ 3 > 2 ~ 23
transitiveClosure(pr)


[Package socialranking version 1.2.0 Index]