## Create the data: 2 binary relations among 3 elements
arr <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
c(3,3,2))>.5, 1 ) )
## optional string labels
dimnames(arr)[[3]] <- list("n", "m")
## look at the semigroup and its Green's relations
semigroup(arr) |>
green.rel()
Run the code above in your browser using DataLab