Search All of the Math Forum:

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

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

 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

"Sam " <ilmyounghwang@gmail.com> wrote in message
news:ke9ars\$h1d\$1@newscl01ah.mathworks.com...
> 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.

http://en.wikipedia.org/wiki/Terasecond_and_longer [Hint: look in the
"Yottaseconds and beyond" section.]

--
Steve Lord
slord@mathworks.com