Unique permutations with no mirrored or circular repetitions
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.
When we talk about permutations, we deal with rearranging elements in a list or set. In the realm of combinatorics, permutations are a fundamental concept used to count the number of possible arrangements. However, when specific conditions or constraints are applied, such as avoiding mirrored or circular repetitions, the task becomes more challenging and intriguing. This article delves into the mechanics and theories behind unique permutations with these constraints, examining how they differ from general permutations.
Understanding Basic Permutations
Before exploring unique permutations, it's essential to start with basic permutations. The number of permutations of a set of n
elements is given by n!
(n factorial), which is the product of all positive integers up to n
.
For example, for a set of 3 elements \{A, B, C\}
, the total number of permutations is:
• {A, B, C} • {A, C, B} • {B, A, C} • {B, C, A} • {C, A, B} • {C, B, A}
Thus, there are 3! = 6
permutations.
Constraints: No Mirrored or Circular Repetitions
When applying constraints like no mirrored or circular repetitions, we reduce the set of allowable permutations.
No Mirrored Repetitions
Mirrored repetitions occur when a permutation is the reverse of another. Using the earlier example \{A, B, C\}
, {A, B, C} and {C, B, A} are mirrored. To determine the unique permutations, we must ensure no two permutations are mirrored images.
No Circular Repetitions
Circular repetitions treat rotations of elements as equivalent. For instance, for a circle of elements \{A, B, C\}
, the arrangements {A, B, C}, {B, C, A}, and {C, A, B} are considered the same.
Calculating Unique Permutations
Example: Set of 3 Elements
Consider the set \{A, B, C\}
with the constraints of no mirrored and no circular repetitions:
- We start by arranging the elements without repetition.
- We discard any mirrored arrangements.
- We account for equivalent circular shifts.
For our example, removing mirrored permutations reduces the set significantly:
Mirrored Example
• {A, B, C} is mirrored with {C, B, A} • {A, C, B} is mirrored with {B, C, A}
Now, considering circular shifts, {B, A, C} is equivalent to both {A, B, C} and {C, A, B} in the context of a circular arrangement.
Final Unique Permutations
Ultimately, the unique permutation satisfying both conditions is just one: {A, B, C}. All other permutations are either mirrored or circular equivalents.
General Formula
For a set of n
distinct elements:
- Calculate the total number of permutations:
n!. - Divide by
2for mirrored (if applicable), giving:n! / 2. - Consider equivalent circular shifts, resulting in:
n! / (2 * n).
However, for specific subsets, this formula may vary with complex patterns and combinations.
Summary Table
| Situation/Condition | Example | Number of Unique Permutations |
| Basic permutations | \{A, B, C\} | |
| 6 | ||
| No mirrored repetitions | \{A, B, C\} vs {C, B, A} | 3 |
| No circular repetitions | \{A, B, C\} vs {B, C, A} | 3 |
| No mirrored or circular repetitions (for 3 elements) | \{A, B, C\} | |
| 1 |
Additional Considerations
When dealing with larger sets or actual applications of these permutations, programming tools and algorithms become invaluable. Efficient combinatorial algorithms can generate these permutations, avoiding invalid ones early in the generation process, for example:
Related reading
- upper bound, lower bound
- Use .corr to get the correlation between two columns
- Using a QuadTree to get all points within a bounding circle
- Using circular permutations to reduce Traveling Salesman complexity
- Using machine learning ANN to classify odd numbers
- Using randomForest package in R, how to get probabilities from classification model?
- Valid Permutation of Parenthesis
- VC Dimension of Circle, a special case

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.