Learn R Programming

bnlearn (version 5.1)

graph enumeration: Count graphs with specific characteristics

Description

Count directed acyclic graphs of various sizes and/or with specific characteristics.

Usage

count.graphs(type = "all.dags", ..., debug = FALSE)

Value

count.graphs() returns an object of class bigz from the

gmp package, a vector with the graph counts.

Arguments

type

a character string, the label describing the types of graphs to be counted (see below).

...

additional parameters (see below).

debug

a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is completely silent. Ignored in some generation methods.

Author

Marco Scutari

Details

The types of graphs, and the associated additional parameters, are:

  • "all-dags": all directed acyclic graphs with nodes nodes.

  • "dags-given-ordering": all directed acyclic graphs with a specific topological ordering and nodes nodes.

  • "dags-with-k-roots": all directed acyclic graphs with k root nodes and nodes nodes.

  • "dags-with-r-arcs": all directed acyclic graphs with r arcs and nodes nodes.

  • "dags-in-equivalence-class": all directed acyclic arcs in the equivalence class described by eqclass.

References

Harary F, Palmer EM (1973). "Graphical Enumeration." Academic Press.

Rodionov VI (1992). "On the Number of Labeled Acyclic Digraphs." Discrete Mathematics, 105:319--321.

Liskovets VA (1976). "On the Number of Maximal Vertices of a Random Acyclic Digraph." Theory of Probability and its Applications, 20(2):401--409.

Wienobst M, Luttermann M, Bannach M, Liskiewicz (2023). "Efficient Enumeration of Markov Equivalent DAGs." Proceedings of the 37th AAAI Conference on Artificial Intelligence, 12313--12320.

Examples

Run this code
if (FALSE) {
count.graphs("dags.with.r.arcs", nodes = 3:6, r = 2)
}

Run the code above in your browser using DataLab