Home Overview Documents Content Dictionaries Software & Tools The OpenMath Society OpenMath Projects OpenMath Discussion Lists OpenMath Meetings Links

# OpenMath Content Dictionary: combinat1

Canonical URL:
http://www.openmath.org/cd/combinat1.ocd
CD Base:
http://www.openmath.org/cd
CD File:
combinat1.ocd
CD as XML Encoded OpenMath:
combinat1.omcd
Defines:
Bell, Fibonacci, Stirling1, Stirling2, binomial, multinomial
Date:
2004-03-30
Version:
3
Review Date:
2006-03-30
Status:
experimental

```
This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The copyright holder grants you permission to redistribute this
document freely as a verbatim copy. Furthermore, the copyright
holder permits you to develop any derived work from this document
provided that the following conditions are met.
a) The derived work acknowledges the fact that it is derived from
this document, and maintains a prominent reference in the
work to the original source.
b) The fact that the derived work is not the original OpenMath
document is stated prominently in the derived work.  Moreover if
both this document and the derived work are Content Dictionaries
then the derived work must include a different CDName element,
chosen so that it cannot be confused with any works adopted by
the OpenMath Society.  In particular, if there is a Content
Dictionary Group whose name is, for example, `math' containing
Content Dictionaries named `math1', `math2' etc., then you should
not name a derived Content Dictionary `mathN' where N is an integer.
However you are free to name it `private_mathN' or some such.  This
is because the names `mathN' may be used by the OpenMath Society
for future extensions.
compilation of derived works, but keep paragraphs a) and b)
intact.  The simplest way to do this is to distribute the derived
work under the OpenMath license, but this is not a requirement.
society at http://www.openmath.org.
```

This CD defines some basic combinatorics definitions.

```Written by S. Dalmas (INRIA Sophia Antipolis) for the Esprit OpenMath
project.
```

## binomial

Role:
application
Description:

The binomial coefficients. binomial(n, m) is the number of ways of choosing m objects from a collection of n distinct objects without regard to the order.

Commented Mathematical property (CMP):
binomial(n,m) = n!/(m!*(n-m)!)
Formal Mathematical property (FMP):
$\left(\begin{array}{c}n\\ m\end{array}\right)=\frac{n!}{m!\left(n-m\right)!}$
Example:
$\left(\begin{array}{c}4\\ 2\end{array}\right)=6$
Signatures:
sts

 [Next: multinomial] [Last: Bell] [Top]

## multinomial

Role:
application
Description:

The multinomial coefficient, multinomial(n, n1, ... nk) is the number of ways of choosing ni objects of type i (i from 1 to k) without regard to order, in such a way that the total number of objects chosen is n. multinomial(n, n1, ... nk) is equal to n!/(n1!*n2! ...*nk!).

Commented Mathematical property (CMP):
multinomial(n, n1, ... nk) is equal to n!/(n1!*n2! ...*nk!) where n=n1+...+nk
Formal Mathematical property (FMP):
$\mathrm{apply_to_list}\left(\left(\begin{array}{c}\mathrm{cons}\left(n,\mathrm{nList}\right)\\ \end{array}\right),\mathrm{cons}\left(n,\mathrm{nList}\right)\right)=\frac{n!}{\mathrm{apply_to_list}\left(×,{\mathrm{nList}}_{2}\right)}\wedge {\mathrm{apply_to_list}\left(\mathrm{vector},{\mathrm{nlist}}_{2}\right)}_{i}={\mathrm{apply_to_list}\left(\mathrm{vector},\mathrm{nList}\right)}_{i}!\wedge n=\mathrm{apply_to_list}\left(+,\mathrm{nList}\right)$
Example:
$\left(\begin{array}{c}8\\ 233\end{array}\right)=560$
Signatures:
sts

 [Next: Stirling1] [Previous: binomial] [Top]

## Stirling1

Role:
application
Description:

The Stirling numbers of the first kind. (-1)^(n-m)*Stirling1(n,m) is the number of permutations of n symbols which have exactly m cycles. Note that there are a few slightly different definitions of these numbers.

Commented Mathematical property (CMP):
Stirling1(n,m) = the sum k=0 to n-m of (-1)^k * binomial(n-1+k, n-m+k) * binomial(2n-m,n-m-k) * Stirling2(n,m)
Formal Mathematical property (FMP):
$\mathrm{Stirling1}\left(n,m\right)=\sum _{k=0}^{n-m}{-1}^{k}\left(\begin{array}{c}n-1+k\\ n-m+k\end{array}\right)\left(\begin{array}{c}2n-m\\ n-m-k\end{array}\right)\mathrm{Stirling2}\left(n,m\right)$
Example:
$\mathrm{Stirling1}\left(10,7\right)=-9450$
Signatures:
sts

 [Next: Stirling2] [Previous: multinomial] [Top]

## Stirling2

Role:
application
Description:

The Stirling numbers of the second kind. Stirling2(n, m) is the number of partitions of a set with n elements into m non empty subsets. Note that there are a few slightly different definitions of these numbers.

Commented Mathematical property (CMP):
Stirling2(n,m) = 1/m! * the sum from k=0 to m of (-1)^(m-k) * binomial(m,k) * k^n
Formal Mathematical property (FMP):
$\mathrm{Stirling2}\left(n,m\right)=\frac{1}{m!}\sum _{k=0}^{m}{-1}^{\left(m-k\right)}\left(\begin{array}{c}m\\ k\end{array}\right){k}^{n}$
Example:
$\mathrm{Stirling2}\left(7,3\right)=301$
Signatures:
sts

 [Next: Fibonacci] [Previous: Stirling1] [Top]

## Fibonacci

Role:
application
Description:

The Fibonacci numbers, defined by the linear recurrence: Fibonacci(0) = 0, Fibonacci(1) = 1, and Fibonacci(n + 1) = Fibonacci(n) + Fibonacci(n - 1). Note that some authors define Fibonacci(0) = 1.

Commented Mathematical property (CMP):
Fibonacci(0) = 0, Fibonacci(1) = 1, and Fibonacci(n + 1) = Fibonacci(n) + Fibonacci(n - 1)
Formal Mathematical property (FMP):
$\mathrm{Fibonacci}\left(0\right)=0\wedge \mathrm{Fibonacci}\left(1\right)=1\wedge \mathrm{Fibonacci}\left(n+1\right)=\mathrm{Fibonacci}\left(n\right)+\mathrm{Fibonacci}\left(n-1\right)$
Example:
$\mathrm{Fibonacci}\left(10\right)=55$
Signatures:
sts

 [Next: Bell] [Previous: Stirling2] [Top]

## Bell

Role:
application
Description:

The Bell numbers: Bell(n) is the total number of possible partitions of a set of n elements.

Commented Mathematical property (CMP):
Bell(n) = the sum from k=0 to n of Stirling2(n,k)
Formal Mathematical property (FMP):
$\mathrm{Bell}\left(n\right)=\sum _{k=0}^{n}\mathrm{Stirling2}\left(n,k\right)$
Example:
$\mathrm{Bell}\left(7\right)=877$
Signatures:
sts

 [First: binomial] [Previous: Fibonacci] [Top]

 Home Overview Documents Content Dictionaries Software & Tools The OpenMath Society OpenMath Projects OpenMath Discussion Lists OpenMath Meetings Links