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 (Revision 1)
Review Date:
2017-12-31
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.
       c) The derived work is distributed under terms that allow the
          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.
     If you have questions about this license please contact the OpenMath
     society at http://www.openmath.org.
  Author: OpenMath Consortium
  SourceURL: https://github.com/OpenMath/CDs
            

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):
n m = n ! m ! ( n - m ) !
Example:
4 2 = 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):
apply_to_list ( cons ( n , nList ) , cons ( n , nList ) ) = n ! apply_to_list ( × , nList 2 ) apply_to_list ( vector , nlist 2 ) i = apply_to_list ( vector , nList ) i ! n = apply_to_list ( + , nList )
Example:
8 2 3 3 = 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):
Stirling1 ( n , m ) = k = 0 n - m - 1 k n - 1 + k n - m + k 2 n - m n - m - k Stirling2 ( n , m )
Example:
Stirling1 ( 10 , 7 ) = -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):
Stirling2 ( n , m ) = 1 m ! k = 0 m - 1 ( m - k ) m k k n
Example:
Stirling2 ( 7 , 3 ) = 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):
Fibonacci ( 0 ) = 0 Fibonacci ( 1 ) = 1 Fibonacci ( n + 1 ) = Fibonacci ( n ) + Fibonacci ( n - 1 )
Example:
Fibonacci ( 10 ) = 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):
Bell ( n ) = k = 0 n Stirling2 ( n , k )
Example:
Bell ( 7 ) = 877
Signatures:
sts


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