pPart: Partition polynomials

View source: R/pPart.R

pPartR Documentation

Partition polynomials

Description

The function generates the partition polynomial of degree n, whose coefficients are the number of partitions of n into k parts for k from 1 to n.

Usage

pPart(n = 0)

Arguments

n

integer, the degree of the polynomial

Details

Faa di Bruno's formula gives the coefficients of the exponential formal power series obtained from the composition f[g()] of the exponential formal power series f and g. The partition polynomial F[n] of degree n is obtained using the Faa di Bruno's formula, output of the MFB function, in the case "composition of univariate f with univariate g" with f[i]=1/n!, g[i]^k=(i!)^k*k!*y^k for i and k from 1 to n. Note the symbolic substitution of g[i], as the power of g[i] appears in the substitution. This function is an example of application of Faa di Bruno's formula and the symbolic calculus with two indexes.

Value

string

the expression of the polynomial

Warning

The value of the first parameter is the same as the MFB function in the univariate with univariate case composition.

Note

This function calls the MFB function in the kStatistics package.

Author(s)

Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it

References

E. Di Nardo E., G. Guarino, D. Senato (2011) A new algorithm for computing the multivariate Faa di Bruno's formula. Appl. Math. Comp. 217, 6286-6295. (download from https://arxiv.org/abs/1012.6008)

See Also

MFB

Examples


# Return the partition polynomial F[5]
pPart(5)

# Return the partition polynomial F[11] and its evaluation when y=7  
#
s<-pPart(11)          # run the command
s<-paste0("1",s)      # add the coefficient to the first term (fixed command)
s<-gsub(" y","1y",s)  # replace the variable y without coefficient (fixed command)
s<-gsub("y", "*7",s)  # assignment y = 7
eval(parse(text=s))   # evaluation of the expression (fixed command)

kStatistics documentation built on June 8, 2022, 5:05 p.m.