I'm trying to simplify a series of equations with at most 64 input terms. As the number of terms involved in the equations increase, the runtime seems to grow exponentially.
Does anyone know of ways to decrease the running time of a process like this?: http://pastebin.com/LJrdsCVD

(had to use pastebin because the equation is long. the below example uses FullSimplify and is also very slow.)

 {(a10*(b10+a01 b01 (a02+b02) (a03+b03)(a04+b04) 
   (a05+b05) (a06+b06) (a07+b07) (a08+b08) (a09+b09) (1+b10)+a00 b00 (a01+b01) 
   (a02+b02) (a03+b03) (a04+b04) (a05+b05) (a06+b06) (a07+b07) (a08+b08) (a09+b09) 
   (1+b10)+(a04 a05 a06 a07 a08 a09 b04+a05 a06 a07 a08 a09 b05+a04 a06 a07 a08 a09 b04 
   b05+a06 a07 a08 a09 b06+a04 a05 a07 a08 a09 b04 b06+a05 a07 a08 a09 b05 b06+a04 a07 
   a08 a09 b04 b05 b06+a07 a08 a09 b07+a04 a05 a06 a08 a09 b04 b07+a05 a06 a08 a09 b05 
   b07+a04 a06 a08 a09 b04 b05 b07+a06 a08 a09 b06 b07+a04 a05 a08 a09 b04 b06 b07+a05 
   a08 a09 b05 b06 b07+a04 a08 a09 b04 b05 b06 b07+a08 a09 b08+a04 a05 a06 a07 a09 b04 
   b08+a05 a06 a07 a09 b05 b08+a04 a06 a07 a09 b04 b05 b08+a06 a07 a09 b06 b08+a04 a05 
   a07 a09 b04 b06 b08+a05 a07 a09 b05 b06 b08+a04 a07 a09 b04 b05 b06 b08+a07 a09 b07 
   b08+a04 a05 a06 a09 b04 b07 b08+a05 a06 a09 b05 b07 b08+a04 a06 a09 b04 b05 b07 
   b08+a06 a09 b06 b07 b08+a04 a05 a09 b04 b06 b07 b08+a05 a09 b05 b06 b07 b08+a04 a09 
   b04 b05 b06 b07 b08+(a09+a08 (a07 b07+a06 b06 (a07+b07))+(a08+a07 b07+a06 b06 
   (a07+b07)) b08+a05 b05 (a06+b06) (a07+b07) (a08+b08)+a04 b04 (a05+b05) (a06+b06) 
   (a07+b07) (a08+b08)) b09+a03 b03 (a04+b04) (a05+b05) (a06+b06) (a07+b07) (a08+b08) 
   (a09+b09)+a02 b02 (a03+b03) (a04+b04) (a05+b05) (a06+b06) (a07+b07) (a08+b08) 
   (a09+b09)) (1+b10)))}, 

 {a00^2 - a00, b00^2 - b00, a01^2 - a01, b01^2 - b01, a02^2 - a02, b02^2 - b02, 
   a03^2 - a03, b03^2 - b03, a04^2 - a04, b04^2 - b04, a05^2 - a05, b05^2 - b05,
   a06^2 - a06, b06^2 - b06, a07^2 - a07, b07^2 - b07, a08^2 - a08, b08^2 - b08,
   a09^2 - a09, b09^2 - b09, a10^2 - a10, b10^2 - b10, a11^2 - a11, b11^2 - b11, 
   a12^2 - a12, b12^2 - b12, a13^2 - a13, b13^2 - b13, a14^2 - a14, b14^2 - b14, 
   a15^2 - a15, b15^2 - b15, a16^2 - a16, b16^2 - b16, a17^2 - a17, b17^2 - b17,
   a18^2 - a18, b18^2 - b18, a19^2 - a19, b19^2 - b19, a20^2 - a20, b20^2 - b20, 
   a21^2 - a21, b21^2 - b21, a22^2 - a22, b22^2 - b22, a23^2 - a23, b23^2 - b23,
   a24^2 - a24, b24^2 - b24, a25^2 - a25, b25^2 - b25, a26^2 - a26, b26^2 - b26,
   a27^2 - a27, b27^2 - b27, a28^2 - a28, b28^2 - b28, a29^2 - a29, b29^2 - b29, 
   a30^2 - a30, b30^2 - b30, a31^2 - a31, b31^2 - b31}, 

 {a00, b00, a01, b01, a02, b02, a03, b03, a04, b04, a05, b05, a06, b06, a07, b07, 
   a08, b08, a09, b09, a10, b10, a11, b11, a12, b12, a13, b13, a14, b14, a15, b15, 
   a16, b16, a17, b17, a18, b18, a19, b19, a20, b20, a21, b21, a22, b22, a23, b23, 
   a24, b24, a25, b25, a26, b26, a27, b27, a28, b28, a29, b29, a30, b30, a31, b31},
Modulus -> 2]]]]
  • 1
    $\begingroup$ I get 0.06 sec for the above on V9 on windows. That seems fast. $\endgroup$ – Nasser Aug 24 '13 at 7:51
  • $\begingroup$ I just edited the question to include a slower one. And that is just 20 variables, I haven't approached the 64 desired variables yet $\endgroup$ – botnet Aug 24 '13 at 7:55
  • 2
    $\begingroup$ the slow down is NOT due to PolynomialReduce ! it is due to using FullSimplify. This is very common. Try without FullSimplify. When you ask for FullSimplify you have to expect long time delay. With Simplify it took only 0.4 seconds. !Mathematica graphics I would not call that slow. $\endgroup$ – Nasser Aug 24 '13 at 7:57
  • $\begingroup$ I have examples that take forever using Simplify, but the site limits me to 30000 characters of input, is there a place I can share the equation? $\endgroup$ – botnet Aug 24 '13 at 8:37
  • $\begingroup$ Please, visit the help centre for code formatting guidelines :) $\endgroup$ – Sektor Aug 24 '13 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.