Bell numbers: Difference between revisions
m
Reverted edits by Gerard Schildberger (talk) to last revision by Peak
m (changed section header name.) |
Thundergnat (talk | contribs) m (Reverted edits by Gerard Schildberger (talk) to last revision by Peak) |
||
Line 1:
{{task}}
[[wp:Bell number|Bell or exponential numbers]] are enumerations of the number of different ways to partition a set that has exactly
;So:
:
:
:
▲: '''B<sub>0</sub> = 1''' trivially. There is only one way to partition a set with zero elements: '''{ }'''
▲: '''B<sub>1</sub> = 1''' There is only one way to partition a set with one element: '''{a}'''
▲: '''B<sub>2</sub> = 2''' Two elements may be partitioned in two ways: '''{a} {b}, {a b}'''
: '''B<sub>3</sub> = 5''' Three elements may be partitioned in five ways: '''{a} {b} {c}, {a b} {c}, {a} {b c}, {a c} {b}, {a b c}'''▼
: and so on.▼
▲:
A simple way to find the Bell numbers is construct a '''[[wp:Bell_triangle|Bell triangle]]''', also known as an '''Aitken's array''' or '''Peirce triangle''', and read off the numbers in the first column of each row. ▼
▲A simple way to find the Bell numbers is construct a '''[[wp:Bell_triangle|Bell triangle]]''',
;Task:
Write a routine (function, generator, whatever) to generate the Bell number sequence and call the routine to show here, on this page at least the '''first 15''' and (if your language supports big Integers) '''50th''' elements of the sequence. ▼
▲Write a routine (function, generator, whatever) to generate the Bell number sequence and call the routine to show here,
If you ''do'' use the Bell triangle method to generate the numbers, also show the '''first ten rows''' of the Bell triangle.▼
▲If you ''do'' use the Bell triangle method to generate the numbers,
;See also:
:*
:* '''[[oeis:A011971|OEIS:A011971 Aitken's array]]'''
=={{header|Ada}}==
|