semiring: Semiring Structures for Balance Theory

semiringR Documentation

Semiring Structures for Balance Theory

Description

A function to construct semiring structures for the analysis of Structural Balance theory.

Usage

semiring(x, type = c("balance", "cluster"), symclos = TRUE, 
         transclos = TRUE, k = 2, lbs)

Arguments

x

A ‘Signed’ class object.

type

Semiring type:

  • balance semiring (default)

  • cluster semiring

symclos

(logical) Apply symmetric closure?

transclos

(logical) Apply transitive closure?

k

Length of cycle or semicycle.

lbs

(optional) Labels for semiring to return.

Details

Semiring structures are based on signed networks, and this function provides the capabilities to handle either the balance semiring or the cluster semiring within the Structural Balance theory.

A semiring combines two different kinds of operations with a single underlying set, and it can be seen as an abstract semigroup with identity under multiplication and a commutative monoid under addition. Semirings are useful to determine whether a given signed network is balanced or clusterable. The symmetric closure evaluates the assessment by looking at semicycles in the system; otherwise, the evaluation is through closed paths.

Value

A ‘Semiring’ class object with items:

val

Valences in the semiring

s

Original semiring structure

Q

Resulted semiring structure

k

Number of cycles or semicycles

Warning

Disabling transitive closure should be made with good substantial reasons.

References

Harary, F, Z. Norman, and D. Cartwright Structural Models: An Introduction to the Theory of Directed Graphs. Wiley. 1965.
Doreian, P., V. Batagelj and A. Ferligoj Generalized Blockmodeling. Cambridge University Press. 2004.
Ostoic, J.A.R. “Creating context for social influence processes in multiplex networks.” Network Science, 5(1), 1-29.

See Also

signed, as.signed

Examples

# create two binary relations among three elements
arr <- round( replace( array( runif(18), c(3 ,3, 2) ), array( runif(18),
       c(3, 3, 2) ) > .9, 3 ) )

# create signed matrix with the two types of relations
# and establish the semiring structure
signed(arr) |> 
  semiring()

multiplex documentation built on July 30, 2026, 5:13 p.m.