cliques {ggm}R Documentation

Cliques of an undirected graph

Description

Finds the cliques of an undirected graph.

Usage

cliques(gmat)

Arguments

gmat a square Boolean matrix with dimnames, representing the edge matrix of an undirected graph.

Details

The cliques of a graph are the subsets of nodes which induce a maximally complete subgraph. The algorithm is NP-complete in general.

Value

a list of vectors of integers representing subsets of the set of nodes.

Author(s)

The code was written by somebody at Lancaster University.

References

Lauritzen, S. (1996). Graphical models. Oxford: Clarendon Press.

See Also

UG,bd

Examples

## Two cliques
u <- UG(~ a*b*c + c*d*e*g)
u
cliques(u)

## the same (note that the formula is not of a graphical model)
u <- UG(~ a*b+b*c+c*a + c*d*e*g)
u
cliques(u)

[Package Contents]