Results 1 to 10 of 10

Thread: Whats the best way to express this...?

  1. #1

    Thread Starter
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Whats the best way to express this...?

    I'm at a loss here.

    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?

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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.

  3. #3

    Thread Starter
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Originally posted by kedaman
    for instance X^2Y can be written X^2+Y^1+Z^0, 0'th power is not superfluous.
    I agree in your instance, you are right. However, in the system of equations I'm building, X2+Y1+Z0 never occurs.



    Where I said:
    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
    Sum{X,Y,Z}2,1,0 expands to:

    X2Y1Z0+X2Z1Y0+Y2X1Z0+Y2Z1X0+Z2X1Y0+Z2Y1X0

    and

    Sum{X,Y,Z}2,1 expands to:

    X2Y1+X2Z1+Y2X1+Y2Z1+Z2X1+Z2Y1

    Which we see then that Sum{X,Y,Z}2,1,0 = Sum{X,Y,Z}2,1, when any general K0 is defined to equal 1.

    This was why I said that the 0 was superfluous.

    -Lou

  4. #4

    Thread Starter
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Of course, this might be a better notation:

    if we have a set of numbers : {0, 1, 2}, and all the permutations
    of this set of 3 elements taken 3 at a time can be noted as:

    3{0,1,2}3

    which physically expands to:

    {0,1,2}
    {0,2,1}
    {1,0,2}
    {1,2,0}
    {2,0,1}
    {2,1,0}


    then perhaps I could say that,
    Sum(X,Y,Z)2,1,0 should really be expressed as:

    [XYZ](3{0,1,2}3)

    ?
    -Lou

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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.

  6. #6

    Thread Starter
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    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!}





    Attached Images Attached Images  

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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.

  8. #8
    Addicted Member
    Join Date
    Aug 2002
    Location
    London UK
    Posts
    255
    You could (and I would normally) say that:

    (x + y + z)3 = Sum(x3) + Sum(x2y) + Sum(xyz)

    where Sum() can be considered to be the greek capital sigma. This can be literally translated as:

    The cube of (x + y + z) = the sum of all things like x3 added to the sum of all things like x2y added to the sum of all things like xyz.

    In fact it's fair to say that:

    {a + b + c + d + ...)3 = Sum(a3) + Sum(a2b) + Sum(abc).

    Now whether that helps anyone at all I don't know...
    Not at all related to sheep...

  9. #9
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    I'm in front of the computer.
    Posts
    270
    It looks to me like you're just expanding trinomials, unless I'm missing something... a generic trinomial expansion equation you can use is:

    (a+b+c)^n = SUM ( (n!/(x!y!z!)) * a^x * b^y * c^z)

    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.
    Alphanos

  10. #10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width