0

I want a permutation to act on a set. For example: I want the permutation {2,1,3,5,4} to act on the set {2,3,4} by returning {1,3,5}. I need to do this in the same code that has functions that need Combinatorica.

I thought that maybe Orbits[pg,x] might work but I cannot understand the information in the help section.

Geoffrey Critzer
  • 1,661
  • 1
  • 11
  • 14

1 Answers1

3

You can try adding the context of the functions explicitly if you're having clashes with Combinatorica, e.g. System`PermutationReplace[] and System`PermutationCycles[]:

System`PermutationReplace[{2, 3, 4}, System`PermutationCycles[{2, 1, 3, 5, 4}]]

Another possibility is suggested in Leonid's answer here:

Block[{$ContextPath},  Needs["Combinatorica`"]];
PermutationReplace[{2, 3, 4}, PermutationCycles[{2, 1, 3, 5, 4}]]
J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574