ivs(graph, min = NULL, max = NULL)
NULL
means no limit.NULL
means no limit.ivs
,
largest_ivs
and
maximal_ivs
return a list containing numeric
vertex ids, each list element is an independent vertex set.ivs_size
returns an integer constant.
ivs
finds all independent vertex sets in the
network, obeying the size limitations given in the min
and max
arguments.largest_ivs
finds the largest independent vertex
sets in the graph. An independent vertex set is largest if there is no
independent vertex set with more vertices.
maximal_ivs
finds the maximal independent vertex
sets in the graph. An independent vertex set is maximal if it cannot be
extended to a larger independent vertex set. The largest independent vertex
sets are maximal, but the opposite is not always true.
independece.number
calculate the size of the largest independent
vertex set(s).
These functions use the algorithm described by Tsukiyama et al., see reference below.
cliques
# Do not run, takes a couple of seconds
# A quite dense graph
set.seed(42)
g <- sample_gnp(100, 0.9)
ivs_size(g)
ivs(g, min=ivs_size(g))
largest_ivs(g)
# Empty graph
induced_subgraph(g, largest_ivs(g)[[1]])
length(maximal_ivs(g))
Run the code above in your browser using DataLab