pPart | R Documentation |
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
.
pPart(n = 0)
n |
integer, the degree of the polynomial |
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.
string |
the expression of the polynomial |
The value of the first parameter is the same as the MFB
function
in the univariate with univariate case composition.
This function calls the MFB
function in the kStatistics
package.
Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it
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)
MFB
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.