Permutations of ordered set where only one object changes its position.

1 visualización (últimos 30 días)
Is there a quick way to get all possible permutations where we put one object at all position, while keeping the order of all other objects?
As an examle, consider {A,B,C}.
  1. Change position of A: ABC, BAC, BCA
  2. Change position of B: ACB [BAC, ABC both done in 1.]
  3. Change position of C: CAB [ACB, ABC, done in 1. and 2.]

Respuesta aceptada

David Goodmanson
David Goodmanson el 15 de Abr. de 2021
Hi Michael,
no there is not. CBA is a permutation, and it cannot be made to fit the pattern.

Más respuestas (0)

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by