cliques {ggm}R Documentation

Cliques of an undirected graph

Description

Finds the cliques of an undirected graph.

Usage

cliques(amat)

Arguments

amat a square Boolean matrix with dimnames, representing the adjacency matrix of an undirected graph.

Details

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

Value

a list of vectors of nodes.

Author(s)

Mathias Drton

References

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

See Also

UG, bd

Examples

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

graph22 <- UG(~x1*x2*x3+x3*x4*x5*x6+x5*x7*x8*x9*x10+x9*x11*x12*x13*x14+
x12*x15+x15*x16*x17*x18+x17*x1*x18+x1*x5*x7*x19*x20+x6*x20*x21+x22)

cliques(graph22)

[Package ggm version 1.0.2 Index]