I'm trying to describe the following, but I'll use an example to illustrate.
Given variables X, Y, and Z.
You have an equation, E1, such that
E1 = X2Y + X2Z + Y2X + Y2Z + Z2X + Z2Y
As you can see, the right hand side is the summation of all combinations of 2 elements taken from the group (X,Y,Z) Where one element is raised to the 2nd power, while the second element is to the first.
So, I'd like to ascribe a symbolic description to this, something along the lines of
E1 = Sum{X,Y,Z}2,1,0
Of course, the 0 is superfluous, so this could also be said to be identical to:
E1 = Sum{X,Y,Z}2,1
However, is this the best way? How would you do it?
Next:
lets say you had the following:
E1 = Sum{X1,X2,X3}1,1
and E2 = E1, thus
E1 x E2 = Sum{X1,X2,X3}2,2 + 2*Sum{X1,X2,X3}2,1,1
How would you approach developing a program to input E1 and E2, and outputing their product?
your generic polynom form would be
Sum(x=0 to infinity)Sum(y=0 to infinity)Sum(z=0 to infinity) X^x + Y^y + Z^z
for instance X^2Y can be written X^2+Y^1+Z^0, 0'th power is not superfluous.
multiplying the polynoms, you have the cartesian product ex, (a+b) (c+d) = a(c+d) + b(c+d) = ac + ad + bc + bd, using distributivity * over +
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
I see now, I wasn't familiar with your notation so i just assumed you wanted to have a generic polynom form
You seem to have the summed the permutations of (X,Y,Z) passed to a function F(x,y,z) = X^x Y^y Z^z
if this is so you could write it
f(i,j,k)=å"sÎ{(x,y,z) Î Sym({i,j,k})| (X^x Y^y Z^z)})
Last edited by kedaman; Jan 5th, 2003 at 08:50 AM.
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Originally posted by kedaman I see now, I wasn't familiar with your notation so i just assumed you wanted to have a generic polynom form
You seem to have the summed the permutations of (X,Y,Z) passed to a function F(x,y,z) = X^x Y^y Z^z
if this is so you could write it
f(i,j,k)=å"sÎ{(x,y,z) Î Sym({i,j,k})| (X^x Y^y Z^z)})
Now we're getting somewhere.
Alrighty then. Useing your notation, how would you express
the expansion of:
(X1 + X2 + X3)3
The notation I used to use can be seen here:
And goal was to have a notation that I could verbally and consistantly explain, and which would reduce the amount of pencil lead used to notate such formulas.
As you can see, my old notation Reduced the amount written out significantly {If I didn't add a mapping for everything I wrote :laugh: } , but I always had a tough time trying to express what it meant, {still do!}
damn, that's some way to make it more complicated but make it look less complicated
did you come up with the ¥ notation just for your own use? In that case you could stick to it, I think its quite consise
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
for each x+y+z=n;
0<=x,y,z<=n;
x,y,z,n are elements of the whole number set.
You can also extend this for any desired polynomial expansion, just like this:
(a + b + c + d)^n = SUM ( (n!/(w!x!y!z!)) * a^w * b^x * c^y *d^z)
There are lots of interesting things about trinomials... instead of pascal's triangle, you have a tetrahedron, with three pascal's triangles running down the three sides (not including bottom) and interesting stuff in the center.