Transforming a long sum of products for efficient computation (based on spanning trees in a complete graph)

48 Views Asked by At

Let's say there is a set of $n$ real coefficients: $a_1,...,a_n$. My task is to calculate the value of a rather simple sum of k products: x_1+x_2+...+x_k, where x_i=a_alpha*...*a_lambda. In other words - each of the summed elements x is a product of z of the coefficients. This sum is very "regular": each of the coefficients appears equal number of times in the whole expression (they are combinatorically distributed among the summed elements, n<<k, z<n).
The problem is that the is so many elements to sum up that the straightforward calculation would take months to compute. I need a transformation that with which I could calculate the final value in minutes max. I have been trying to move it all to log space but nothing came up...