       reduce needs too much memory

• To: mathgroup at smc.vnet.net
• Subject: [mg131378] reduce needs too much memory
• From: giovanni.birolo at gmail.com
• Date: Tue, 16 Jul 2013 05:57:45 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-outx@smc.vnet.net
• Delivered-to: mathgroup-newsendx@smc.vnet.net

```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?

Thanks,
Giovanni

```

• Prev by Date: Mathematica does not recognize C Compiler
• Next by Date: MarcumQ and Speeding-up Computations
• Previous by thread: Re: Mathematica does not recognize C Compiler
• Next by thread: MarcumQ and Speeding-up Computations