Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.9K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How can I get Permutations of each Integer Partition?

Posted 12 years ago

Hello! Before we begin, let me mention that I am rubbish at coding.

Ok! Time to explain my question a bit more.

What I'm trying to do is get each permutation of each integer partition. You see, if I do

IntegerPartitions[7}

I get a single permutation of each list. For example, I might get {2,2,1,1,1} as an answer, but I won't get {1,2,1,2,1} and {2,2,1,1,1} as answers. So far, I've been manually taking each list and putting it into code, but this takes a while if I'm doing it for each one.

Permutations[{2,2,1,1,1}]

Depending on how large the number is for the IntegerPartitions step, there could be more than a hundred answers, so to manually copy over each list to the Permutations code would take a while.

My question is, how would I get each permutation of each partition without having to manually copy over each partition into the permutation code? Thanks for any help! :)

POSTED BY: Logan Bell
2 Replies
Posted 12 years ago

Cool! Thanks! :)

POSTED BY: Logan Bell
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard