Learn R Programming

interventionalDBN (version 1.2.2)

countGraphs: Count the number of possible parents

Description

Counts the number of choices of parents given a maximum in-degree restriction.

Usage

countGraphs(nodes, max.indeg)

Arguments

nodes
A positive integer specifying the number of nodes in the network.
max.indeg
A positive integer specifying the in-degree restriction.

Value

$\sum_{i=0}^m{n \choose i}$, where nodes$=n$ and max.indegree$=m$

Details

Nodes can be a parent to themselves. The number of possible networks is given by: nodes*countGraphs(nodes,max.indeg)

See Also

interventionalInference, interventionalDBN-package

Examples

Run this code
countGraphs(10,3) # 176, the number of possible parent sets for each node.
10*countGraphs(10,3) # 1760, the total number of possible networks.

Run the code above in your browser using DataLab