The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: reduce needs too much memory
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List

Posts: 1
Registered: 7/16/13
reduce needs too much memory
Posted: Jul 16, 2013 5:54 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have five integer variables j,k,i,nu,kappa with the following restrictions: 1 <= j <= q, 1 <= k <= q, 1 + q <= i <= n, 0 <= nu <= q,=
0 <= kappa <= q, where 1 < q < n.
I would like to know for which values we have that:
-j + r < r - =CE=BD < i + r - =CE=BA < i - k + r
where r is an integer too but irrelevant since it appears everywhere.

I need the result to be a disjunction (possibly not too long) of conditions of the form:
a1 <= v1 <= b1 && ... && a5 <= v5 <= b5
where v1, ... v5 are the variables j,k,i,nu,kappa in some order and the bounds depend only on the previous variables.

In order to get this I am using Reduce as follows:
Reduce[1 < q < n && 1 <= j <= q && 1 <= k <= q && 1 <= i <= n &=
& 0 <= nu <= q && 0 <= kappa <= q && -j + r < r - =CE=BD < i + r - =CE=BA < i - k + r, {v1,v2,v3,v4,v5},Reals]

The result of this Reduce can be easily brought in the form I need. The only problem is that its computation can take a lot of memory (and time) depending on the order of the variables. In particular, when v5 is i (which is the case I am interested in), the Mathematica kernel was taking 33Gb of ram when I decided to stop it (the pc had only 24Gb of physical ram, so it was trashing).

I also tried to use Reduce with Integers instead of Reals (after all everything is integer) and while the computation is much faster, the result is full of parameters and hard to make sense of, in particular I do not know how to translate that in ranges for my variables.

While I tried to be specific, this is part of a bigger problem. If you think you need more details on the big picture ask away.

Any suggestion? Am I doing something wrong? Should I give up on Reduce on r eals and try to make sense of the result of Reduce on integers?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.