next | previous | forward | backward | up | index | toc

# multinomial -- a formula for the multinomial coefficient

## Synopsis

• Usage:
multinomial(tal)
multinomial(l)
multinomial(p)
• Inputs:
• p, an instance of the type Partition, a partition
• l, a list, a list of non negative numbers
• tal, , a tally from a list
• Outputs:
• an integer, the multinomial coefficient of the given list

## Description

The multinomial coefficient is a generalization of the binomial coefficient. Given a list of number $k_1,\ldots,k_l$, the multinomial coefficient is $n!/(k_1!\ldots,k_l!)$ where $n = \sum k_i$. The multinomial coefficient is calculated because it gives the numbers of tabloids for a given partition.

The list of numbers used to calculate the multinomial can be given as a list, a partition or a tally. This last option was added to optimize this calculation.

 i1 : p = new Partition from {2,2} o1 = Partition{2, 2} o1 : Partition i2 : tabloids p o2 = {| 0 1 |, | 0 2 |, | 0 3 |, | 1 2 |, | 1 3 |, | 2 3 |} | 2 3 | | 1 3 | | 1 2 | | 0 3 | | 0 2 | | 0 1 | o2 : TableauList i3 : multinomial {2,2} o3 = 6 i4 : multinomial tally {2,2} o4 = 6

## Ways to use multinomial :

• multinomial(List)
• multinomial(Partition)
• multinomial(Tally)

## For the programmer

The object multinomial is .