Re: Any efficient way to make complete homogeneous symmetric functions in Mathematica?
- To: mathgroup at smc.vnet.net
- Subject: [mg126831] Re: Any efficient way to make complete homogeneous symmetric functions in Mathematica?
- From: Rex <Aoirex at gmail.com>
- Date: Mon, 11 Jun 2012 00:02:07 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Cool. Thanks, Bob. On Sun, Jun 10, 2012 at 9:23 AM, Bob Hanlon <hanlonr357 at gmail.com> wrote: > homogeneousSymmetricPolynomial[k_Integer, var_List] := > Module[{n = Length[var], t}, > SeriesCoefficient[Times @@ (1/(1 - var*t)), > {t, 0, k}]] /; > 0 <= k <= Length[var] > > Table[homogeneousSymmetricPolynomial[k, {x1, x2, x3}], {k, 0, 3}] > > {1, x1 + x2 + x3, x1^2 + x1*x2 + x2^2 + x1*x3 + x2*x3 + > x3^2, x1^3 + x1^2*x2 + x1*x2^2 + x2^3 + x1^2*x3 + > x1*x2*x3 + x2^2*x3 + x1*x3^2 + x2*x3^2 + x3^3} > > With[{var = {x1, x2, x3, x4, x5}}, > Module[{m = Length[var]}, > Sum[(-1)^i*SymmetricPolynomial[i, var]* > homogeneousSymmetricPolynomial[m - i, var], > {i, 0, m}] == 0 // Simplify]] > > True > > > Bob Hanlon > > > On Sun, Jun 10, 2012 at 2:14 AM, Rex <aoirex at gmail.com> wrote: > > We do have elementary symmetric functions, > SymmetricPolynomial[k,{x_1..x_n}] > > http://reference.wolfram.com/mathematica/ref/SymmetricPolynomial.html > > > > But I didn't found complete homogeneous symmetric functions. > > > > The induction method to compute h_n from e_i and h_j (j<=n-1) is not > that efficient. > > https://en.wikipedia.org/wiki/Complete_homogeneous_symmetric_polynomial > > > > Is there any easier way to do this? > > >