Fwd: Permutation
- To: mathgroup at smc.vnet.net
- Subject: [mg9189] Fwd: [mg9161] Permutation
- From: BobHanlon at aol.com
- Date: Tue, 21 Oct 1997 02:03:02 -0400
- Sender: owner-wri-mathgroup at wolfram.com
In the expansion, Sum cannot be used since it would evaluate to the
original expression. Consequently, a new function "summ" is used to
hold the
evaluation. Evaluate the following:
summ[x_ * summ[y_, iterInner__], iterOuter__] :=
summ[x y, iterOuter, iterInner]; (* nested summation *)
binomialExpand[m_] :=
(x_ + y_)^k_ -> summ[Binomial[k, m] x^m * y^(k-m), {m, 0, k}];
((a+y) + (b+c*x+d*x^2))^k /. binomialExpand[m1] % /. binomialExpand[m2]
% /. binomialExpand[m3]
% /. binomialExpand[m4]
ans1 = % // PowerExpand
Check:
ans1 /. summ -> Sum
% // PowerExpand
Looking at an alternate representation:
ans1 // FunctionExpand
% /. Gamma[x_ + 1] -> x!
ans2 = % /. k! -> Multinomial[m1, m2, m3, m4, k-m1-m2-m3-m4] *
m1! m2! m3! m4! (k-m1-m2-m3-m4)!
Check:
ans2 /. summ -> Sum
% // FunctionExpand
% // PowerExpand
Bob Hanlon
---------------------
Forwarded message:
From: dd4b at virginia.edu (David Djajaputra) To: mathgroup at smc.vnet.net
To: mathgroup at smc.vnet.net
Hello,
Is it possible to ask Mathematica to expand an abstract algebraic
formula? I mean, to do
something like
(1+x)^n = Sum[Binomial[n,m] x^m, {m,0,n}]
I have in mind problems like determining, in closed form, the
coefficient of (x^m y^n) in
((a+y) + (b+cx+dx^2))^k
for example, which then can help in proving formulas, etc.
Thanks a lot.
David Djajaputra