From: bn77 on 25 Mar 2010 07:11 Hi, I'm trying to write a program in mathematica that compares roughly (15!)^2 / 2 pairs of permutations of length 15. Can mathematica do this in a reasonable time? Any experience of this sort? TIA, bn77
From: Sjoerd C. de Vries on 26 Mar 2010 06:35 I don't think any PC could do this in reasonable time. Just assume that every comparison would take one clock cycle on a 4 GHz PC. The whole process would then take more than 7 million years. Cheers -- Sjoerd On Mar 25, 1:11 pm, bn77 <nayantara.bhatna...(a)gmail.com> wrote: > Hi, > > I'm trying to write a program in mathematica that compares roughly (15!)^2 / 2 pairs of permutations of length 15. Can mathematica do this in a reasonable time? Any experience of this sort? > > TIA, > bn77
From: Bill Rowe on 26 Mar 2010 06:36 On 3/25/10 at 6:11 AM, nayantara.bhatnagar(a)gmail.com (bn77) wrote: >I'm trying to write a program in mathematica that compares roughly >(15!)^2 / 2 pairs of permutations of length 15. Can mathematica do >this in a reasonable time? Any experience of this sort? Forget execution time for a moment. Have you considered how much memory would be needed to hold these pairs? In[1]:= Log[10, (15!)^2] // N Out[1]= 24.233 I am absolutely certain you don't have access to a machine with any where near 10^25 bytes. You very much need to consider a different approach to whatever problem you are trying to solve.
From: Leonid Shifrin on 26 Mar 2010 06:38 Hi, Looks like too large of a number to me, and not just for Mathematica, but pretty much any language. In[2]:= (15!)^2 Out[2]= 1710012252724199424000000 A simple estimate for a single 3Ghz machine gives about 10^11 hours to perform (15!)^2 operations, assuming that we have 1 operation per clock cycle. Looks like you have to greatly reduce your search space. In addition to that, for problems of this type I'd consider using CUDA or something similar to parallelize your problem. Regards, Leonid On Thu, Mar 25, 2010 at 4:11 AM, bn77 <nayantara.bhatnagar(a)gmail.com> wrote: > Hi, > > I'm trying to write a program in mathematica that compares roughly (15!)^2 > / 2 pairs of permutations of length 15. Can mathematica do this in a > reasonable time? Any experience of this sort? > > TIA, > bn77 > >
From: Nicola Mingotti on 26 Mar 2010 06:35 On 2010-03-25 12:11:52 +0100, bn77 said: > Hi, > > I'm trying to write a program in mathematica that compares roughly > (15!)^2 / 2 pairs of permutations of length 15. Can mathematica do this > in a reasonable time? Any experience of this sort? > > TIA, > bn77 The number of permutations is then : N[((15!)^2)/2] => 8.55006*10^23 Supposing you can compare 10^9 objects per second you would need 10^4 seconds that is 3.171 milion years according to Wolfram Alpha conversion. So, no ! If you really need to cycle through all these objects it's impossible. Brute force here fails, you need to find a smarter way to solve it. bye Nicola.
|
Next
|
Last
Pages: 1 2 Prev: Fourier transform of exponential function Next: Mathematica starts badly 1 time over 5 in OSX |