Skip to main content
Tweeted twitter.com/#!/StackMma/status/181803260267593728
added 4 characters in body
Source Link
rm -rf
  • 89.3k
  • 21
  • 297
  • 479

I want to get the Permutations on the elements of a list. Then i'mI'm doing this:

a = Drop[Permutations[Range[1, 16], 2], {1, 17}]
i = 15;
While[i <= (240 - 16), a = Drop[a, {i, i}]; i = (i + (16 - 1))]

The first line of the code gives me all the permutations, but I do not want repetitions, like: I already have {1,2}{1,2}, iI do not want the {2,1}{2,1}.

I'm trying to do this way but there's no result yet.

Any help?

I want to get the Permutations on the elements of a list. Then i'm doing this:

a = Drop[Permutations[Range[1, 16], 2], {1, 17}]
i = 15;
While[i <= (240 - 16), a = Drop[a, {i, i}]; i = (i + (16 - 1))]

The first line of the code gives me all the permutations, but I do not want repetitions, like: I already have {1,2}, i do not want the {2,1}.

I'm trying to do this way but there's no result yet.

Any help?

I want to get the Permutations on the elements of a list. Then I'm doing this:

a = Drop[Permutations[Range[1, 16], 2], {1, 17}]
i = 15;
While[i <= (240 - 16), a = Drop[a, {i, i}]; i = (i + (16 - 1))]

The first line of the code gives me all the permutations, but I do not want repetitions, like: I already have {1,2}, I do not want the {2,1}.

I'm trying to do this way but there's no result yet.

Any help?

Source Link
Red Banana
  • 5.6k
  • 2
  • 29
  • 48

How to remove repeated permutations?

I want to get the Permutations on the elements of a list. Then i'm doing this:

a = Drop[Permutations[Range[1, 16], 2], {1, 17}]
i = 15;
While[i <= (240 - 16), a = Drop[a, {i, i}]; i = (i + (16 - 1))]

The first line of the code gives me all the permutations, but I do not want repetitions, like: I already have {1,2}, i do not want the {2,1}.

I'm trying to do this way but there's no result yet.

Any help?