Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have some huge expressions which can be written as:

$$\sum _{n=1}^N \left(\prod _{i=1}^{I_n} a_{n,i}\right)$$

$N$ is between 10 and 100, $I_n$ is between 1 and 10 and $a_{i,n}$ represent symbols for positive variables. I got around 30 variables, all with positive values.

This is the first part of one of the expanded expressions

$$c f g+b f h+a f i+2 c j c_1+2 a b f g s_2+18 a b c j s_2+a f h a_1 s_2+6 b c i b_1 s_2+3 b j b_1 b_2 s_2+5 b c h c_1 s_2+5 a c i c_1 s_2+c g c_1 c_2 s_2+2 a c f f_1 s_2+b f b_1 f_1 s_2+5 b c f b_1 c_1 s_2 s_3+2 a c f c_1 c_2 s_2 s_3$$

The complexity function is Length[Level[#, {-1}]] &, which simply counts the amount of symbols, without including parentheses.

The problem is, when I use it Simplify/FullSimplify, the complexity function is far from minimized?

share|improve this question
Could you please post some of your code? –  partial81 May 26 '13 at 12:23
Maybe you don't really want Simplify, but rather something like Collect, Factor or MonomialList –  wolfies May 26 '13 at 14:19
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.