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 » Software » comp.soft-sys.matlab

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

Topic: Generate perms([1:1:36])
Replies: 2   Last Post: Jan 29, 2013 4:48 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 18,038
Registered: 12/7/04
Re: Generate perms([1:1:36])
Posted: Jan 29, 2013 4:48 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Sam " <> wrote in message
> Hi all,
> I am trying to created a matrix that contains all possible permutations of
> [1:1:36]. It is obvious that this is too large a matrix. One option is to
> divide the huge matrix into many smaller pieces. But if I do not know how
> large a matrix will be, it would not be possible to have matlab divide it.
> Does anyone know what I can do in this case?

Why are you trying to create this matrix? It will be factorial(36)-by-36 or
of size [3.7199e+41, 36]. You don't have anywhere NEAR enough memory to
store it, and processing 1000 rows per second would require about 1e31 years
to process the whole thing.

I recommend you describe the problem you're trying to solve using these
permutations so that someone can suggest alternate approaches that don't
require such LONG periods of time. [Hint: look in the
"Yottaseconds and beyond" section.]

Steve Lord
To contact Technical Support use the Contact Us link on

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.