Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.6K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:
GROUPS:

Upgrade to Mathematica 12 - Sum isn't evaluated in reasonable time anymore.

Posted 6 years ago

I just upgraded from Mathematica 11.3 to Mathematica 12. Unfortunately, code that previously ran in a reasonable amount of time (say 10 sec or half a minute, does now not complete anymore before I abort it after 10 minutes or so.

This is a line of such code, which I cannot evaluate in Mathematica 12 anymore. The sum is just equal to 1, and Mathematica 11.3 computed this very quickly. What do I need to do to run this code in Mathematica 12? (I suspect I should use a different command or add assumptions of some sort?)

Thanks, Max

ass := {0 < w0, w0 <= 1, 0 < v0, v0 < 1, w0 <= v0, 0 < w1, w1/c1 <= 1,
   0 < v1, v1/c1 <= 1, 0 < c1, w1 <= v1, v1 <= c1, w1 <= c1, 
  v0 <= w1/c1};
pmf := ((g0 + b0e + b0l + g1 + b1)!/(g0!*b0e!*b0l!*g1!*b1!))*((
   v0 - w0)/(1 + c1))^g0*((w1/c1 - v0)/(1 + c1))^
  b0e*((1 - w1/c1)/(1 + c1))^b0l*((v1 - w1)/(1 + c1))^
  g1*((c1 - v1)/(1 + c1))^b1*((w0 + w1)/(1 + c1))^1;

FullSimplify[
 Sum[pmf, {g0, 0, \[Infinity]}, {b0e, 0, \[Infinity]}, {b0l, 
   0, \[Infinity]}, {g1, 0, \[Infinity]}, {b1, 0, \[Infinity]}, 
  Assumptions -> ass], Assumptions -> ass] 
POSTED BY: Max Paulus
2 Replies
Posted 6 years ago

I can reproduce this. You should report it. From the Help menu select Give Feedback...

~ 25s on "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)"

~ 620s on "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)"

POSTED BY: Rohit Namjoshi
Posted 6 years ago

Thanks, Rohit! I have reported the issue. A curiosity is that the following simplified code runs fine in Mathematica 12

$Assumptions = {w0 > 0, w1 > 0, w2 > 0, w3 > 0, w4 > 0, w5 > 0};
pmf = Multinomial[x1, x2, x3, x4, x5]*(w1/(
    w0 + w1 + w2 + w3 + w4 + w5))^
   x1*(w2/(w0 + w1 + w2 + w3 + w4 + w5))^
   x2*(w3/(w0 + w1 + w2 + w3 + w4 + w5))^
   x3*(w4/(w0 + w1 + w2 + w3 + w4 + w5))^
   x4*(w5/(w0 + w1 + w2 + w3 + w4 + w5))^
   x5*(w0/(w0 + w1 + w2 + w3 + w4 + w5))^1;
Sum[pmf, {x1, 0, \[Infinity]}, {x2, 0, \[Infinity]}, {x3, 
  0, \[Infinity]}, {x4, 0, \[Infinity]}, {x5, 0, \[Infinity]}]
POSTED BY: Max Paulus
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard