Basic Examples (2)
Basic Examples
(2)
There are five set partitions of a three-element set:
In[171]:=
sp=[{a,b,c}]
Out[171]=
{{{a,b,c}},{{a},{b,c}},{{a,b},{c}},{{a,c},{b}},{{a},{b},{c}}}
The number of set partitions of a set with elements is given by the Bell number:
n
th
n
In[172]:=
Length@sp
Out[172]=
5
In[173]:=
BellB[3]
Out[173]=
5
Scope (1)
Scope
(1)