Syntactic Confectionery Delight  
PerlMonks 
comment on 
( #3333=superdoc: print w/replies, xml )  Need Help?? 
I believe that to solve this you would need to create two separate arrays; one to contain the variables on the left side of the equation and another to contain each of the terms on the right side of the equation. Since you know that you will have 2**N variables on the left side, you would want to create an array named, say, Variable{2**N1) to contain the variables. Then you would create an array Terms[2**N1] to contain the terms generated by multiplying the polynomials. I don't think one would need a two dimensional array. The first part of the program code could pop up a message box asking what N is, and then it would create the arrays as I described above. Then the code would step through array Variable[] multiplying the variables as appropriate and placing the resulting terms into array Terms[]. So the expansion is simply the sum of the elements of array Terms[2**N1]. I am new to Perl so I am still working on actual code to do what I've described. I think that this is an interesting problem.
jdporter added code and p tags In reply to Re^3: Obtaining terms in an expansion
by Scott7477

