Learn R Programming

rbmn (version 0.9-6)

nb8bn: number of Bayesian networks

Description

returns the number of different Bayesian networks having n labelled or not nodes. Non labelled nodes means that nodes are exchangeable: A -> B is identical to A <- B.

Usage

nb8bn(n, label=FALSE)

Value

Number of Bayesian networks

Arguments

n

number of nodes. Must be less or equal to 18.

label

Indicates if the nodes must be considered as labelled or not.

Details

When not labelled nodes, the results were proposed by Sloane in 'the on line encyclopedy of integer sequences' (http://oeis.org/A003087). For labelled nodes, just the application of the recursive formula of Robinson.

Examples

Run this code
 nb8bn(5)
 nb8bn(5, TRUE);

Run the code above in your browser using DataLab