How many permutations τ on 8 elements are there such that τ ∘ τ is the identity permutation?
Details and assumptions
You may think of a permutation on 8 elements as a way to shuffle a deck of 8 cards. The identity permutation would correspond to the shuffle where we do nothing (hence it stays the same = identity). If τ corresponds to only exchanging the top 2 cards, then τ ∘ τ would return the deck to it's unchanged state.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Firstly, note that when one of the elements is moved to another position in the ordering, it has to be moved back after another shuffle. Thus elements can only be swapped in pairs.
Thus we come with our 5 cases: No pairs swapped, 1 pair swapped, 2 pairs swapped, 3 pairs swapped or 4 pairs swapped.
Case 1: No pairs swapped. This corresponds with the identity permutation.
Case 2: One pair swapped. This corresponds to an arrangement of 2 "1"s and 6 "0"s. Example: 00100010 means the third card (Third position is a 1) and the seventh card (seventh position is a 1) are swapped.
Total in this case = 2 ! × 6 ! 8 ! = 2 8 .
Case 3: 2 pairs swapped. This corresponds to an arrangement of 2 "1"s, 2 "2"s and 4 "0"s, then divided by 2.
Note that 00212010 and 00121020 mean the same thing: 3rd card is swapped with 5th card, 4th card is swapped with 7th card. Thus we have to divide by 2.
Total in this case = 4 ! × 2 ! × 2 ! × 2 8 ! = 2 1 0 .
Case 3: 3 pairs swapped. This corresponds to an arrangement of 2 "1"s, 2 "2"s, 2 "3"s and 2 "0"s, then divided by 6.
Note that there are 6 ways to write a swapping by permuting the "1"s, "2"s and "3"s. Thus we have to divide by 6.
Total in this case = 2 ! × 2 ! × 2 ! × 2 ! × 6 8 ! = 4 2 0 .
Case 4: 4 pairs swapped. This corresponds to an arrangement of 2 "1"s, 2 "2"s, 2 "3"s and 2 "4"s, then divided by 24.
Note that there are 24 ways to write a swapping by permuting the "1"s, "2"s, "3"s and "4"s. Thus we have to divide by 24.
Total in this case = 2 ! × 2 ! × 2 ! × 2 ! × 2 4 8 ! = 1 0 5 .
Thus the total number of permutations = 1 + 2 8 + 2 1 0 + 4 2 0 + 1 0 5 = 7 6 4
Clarence approaches this problem by understanding the effect of pairing up the elements and directly counting the different cases, which gives a closed-form formula. Eric approaches it by constructing a recurrence relation that expresses f ( n ) in terms of f ( n − 1 ) , f ( n − 2 ) , and then calculating the smaller cases.
Let the 8 elements be a ? ? ? ? ? ? ? . WLOG, let τ include moving the element in the 1st position, a , to the 3rd position. That is, τ ( a ? ? ? ? ? ? ? ) = ? ? a ? ? ? ? ? .
Since τ ∘ τ ( a ? ? ? ? ? ? ? ) = τ ( ? ? a ? ? ? ? ? ) = a ? ? ? ? ? ? ? , then τ must also include moving the element in the 3rd position to the 1st position.
Hence, τ should exchange the position of elements in a pair.
To exchange elements in:
(a) 0 pairs, there is 1 way. This counts as 1 τ .
(b) 1 pair (which involves 2 elements), there are 8 C 2 = 2 8 ways to choose 2 elements. These count as 28 τ 's.
(c) 2 pairs (which involves 4 elements), there are 8 C 4 = 7 0 ways to choose 4 elements. To pair up the 4 elements, say a b c d , there are 3 possible options for the pair of a . If a is paired with b , only 1 option is left for c (or d ). So there are 3 ⋅ 1=3 ways to form pairs out of 4 elements. These count as 70 ⋅ 3=210 τ 's.
(d) 3 pairs, there are 8 C 6 = 2 8 ways to choose 6 elements. Using the counting technique above, there are 5 ⋅ 3 ⋅ 1=15 ways to pair up the 6 elements. These count as 28 ⋅ 15=420 τ 's.
(e) 4 pairs, there is 1 way to choose all 8 elements. Using the same technique, there are 7 ⋅ 5 ⋅ 3 ⋅ 1=105 ways to pair up the 8 elements. These count as 1 ⋅ 105=105 τ 's.
All in all, there are 7 6 4 possible τ 's.
We can map every permutation τ to a function f from the set S = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 } to itself. For example, we will denote the permutation ( 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 ) of ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) as such:
f ( 1 ) = 8 , f ( 2 ) = 7 , f ( 3 ) = 6 , f ( 4 ) = 5 , f ( 5 ) = 4 , f ( 6 ) = 3 , f ( 7 ) = 2 , f ( 8 ) = 1 or, if making easier, f ( previous position ) = new position
We will call it the identity fucntion of a permutation τ .
Now, τ ∘ τ = identity implies that, all elements return to it's original positions after permuting it twice in that way, or as to say, if f is the identity function of τ , then if f ( a ) = b , then f ( b ) = a , which also means f ( f ( a ) ) = a for all a ∈ S .
Now, If we can count the number of such functions then we are done. Notice that, if f ( a ) = b , f ( b ) = a for some f , identity function of τ , then τ does not meet the requirements. So, we need to find the number of functions f : S → S which satisfies f ( f ( a ) ) = a
Now, there is two options for some f ( a ) , it can be equal b , with f ( b ) = a , or f ( a ) = a , which would both imply f ( f ( a ) ) = a .
Now, we can first select i pairs of ( a , b ) from S and define f sucht that f ( a ) = b and f ( b ) = a , and then define the remaining f ( x ) 's as x , i.e. define f ( x ) = x for all else x ∈ S .
Now, we can pick i elements from 8 in ( i 8 ) ways, then pick another i elements and pair them with the previously picked i elements in ( i 8 − i ) ⋅ i ! ways. But defining f ( x ) = y is the same as defining f ( y ) = x , as one implies the other, so if we pick i pairs, we have to divide it by 2 i to avoid double counting. So, for i pairs, we have total 2 i 1 ( i 8 ) ( i 8 − i ) i ! ways to construct such an τ .
As the number of pairs can be 0 to 4 , the answer we need is ∑ i = 0 5 2 i 1 ( i 8 ) ( i 8 − i ) i ! , which is ( 0 8 ) ( 0 8 ) × 0 ! + 2 1 ( ( 1 8 ) ( 1 7 ) × 1 ! ) + 4 1 ( ( 2 8 ) ( 2 6 ) × 2 ! ) + 8 1 ( ( 3 8 ) ( 3 5 ) × 3 ! ) + 1 6 1 ( ( 4 8 ) ( 4 4 ) × 4 ! ) which equals to 7 6 4 , which is the number of such τ s.
First, let us prove that for τ ∘ τ to be the identity permutation, the permutations come in pairs (i.e a 1 switches to a j while a j switches to a i ). Let us assume the contrary, that a i switches to a j , while a j switches to a k where k = i . But when the permutation is done twice, a i , which is now at a j 's spot, must switch back to a i . However, we know that a j switches to a k , and since k = i , we have a contradiction, and the proof is complete.
Now we have 5 cases: 4 switching pairs, 3 pairs, 2 pairs, 1 pair, or 0 pairs (the identity permutation itself).
4 pairs: 2 4 ( 2 8 ) ⋅ ( 2 6 ) ⋅ ( 2 4 ) ⋅ ( 2 2 ) = 1 0 5 .
3 pairs: 6 ( 2 8 ) ⋅ ( 2 6 ) ⋅ ( 2 4 ) = 4 2 0 .
2 pairs: 2 ( 2 8 ) ⋅ ( 2 6 ) = 2 1 0
1 pair: ( 2 8 ) = 2 8
0 pairs: 1 .
Adding these together, we get 1 0 5 + 4 2 0 + 2 1 0 + 2 8 + 1 = 7 6 4 and we are done.
My solution exactly. In other words, excellent solution! :P
This is what I did, but I made computation errors twice before getting the right answer..
Essentially, the concept is this: τ must reverse anything it does.
More formally, if τ moves element i to position j , then it must move element j to position i . Otherwise, we would have that τ ∘ τ ⇒ i ↦ j ↦ (not i ) , a contradiction from the assumption that τ ∘ τ is the identity permutation.
We have two cases of movements for any element i to consider: i to i or i to not i . The first case is obvious in terms of the permutation; it is merely i ↦ i . In the second case, due to the condition we have established above, we must have i ↦ not i and not i ↦ i . So these are the only two possible movements inside the permutation. Denote the first movement → 1 and the second → 2 . We split into casework based on the number of → 2 s in τ .
0 → 2 s: Thus every element maps to itself. There is exactly 1 way for this to happen, so there is 1 permutation in this case.
1 → 2 : There are ( 2 8 ) ways to choose which elements map to each other. All of the other elements map to themselves, with again 1 way. Thus there are ( 2 8 ) = 2 8 permutations in this case.
2 → 2 s: There are ( 4 8 ) ways to choose which elements will be in the group of being mapped to each other. Then there are 3 ways to map these elements to each other (just consider which element the first in this group is mapped to - there are 3 ways of choosing this), and again 1 way for the elements that map to themselves. Thus there are 3 ( 4 8 ) = 2 1 0 permutations in this case.
3 → 2 s: There are ( 6 8 ) ways to choose which elements will be in the group of being mapped to each other. In this group, we can map them in 5 ⋅ 3 ways (using similar reasoning as in the above case), and of course 1 way to map the remaining elements. So in this case there are 5 ⋅ 3 ( 6 8 ) = 4 2 0 permutations in this case.
4 → 2 s: All of the elements will be in the group of being mapped to each other. There are 7 ⋅ 5 ⋅ 3 ways to map these. Thus there are 7 ⋅ 5 ⋅ 3 = 1 0 5 permutations in this case.
Summing over all the cases, we obtain 1 + 2 8 + 2 1 0 + 4 2 0 + 1 0 5 = 7 6 4 total permutations.
I don't know how to submit my own solution, but I used a recurrence relation: element 1 must either be by itself or paired with one of the other (n-1) elements; then the rest must also form a valid set.
Therefore, if C(n) is the number of possible permutations of n elements, then C(n) = C(n-1) + (n-1) * C(n-2), with base cases C(1) = 1 and C(2) = 2.
As clarification, when I say "So these are the only two possible movements inside the permutation", I am referring to the two movements i ↦ i and i ↦ not i ⇔ not i ↦ i - I am not referring to i ↦ not i and not i ↦ i .
Wow. This is a way better and simpler way of doing this than I came up with. Well done.
Suppose that group permutation S 8 ,
τ o τ ( x ) = I , If x identitiy element in S 8 and order of x are 2 in S 8
Identity of S 8 is ( 1 ) ( 2 ) ( 3 ) ( 4 ) ( 5 ) ( 6 ) ( 7 ) ( 8 )
Now, we will counting x ∈ S 8 have order 2
x have order 2 if L C M for long of cycle is 2 , there is 4 case for that:
permutation formed ( a ) ( b ) ( c ) ( d ) ( e ) ( f ) ( g h ) where 1 ≤ a , b , c , d , e , f , g , h ≤ 8 There is C ( 8 , 6 ) × 1 ! C ( 2 , 2 ) = 2 8 way
permutation formed ( a ) ( b ) ( c ) ( d ) ( e f ) ( g h ) where 1 ≤ a , b , c , d , e , f , g , h ≤ 8 There is C ( 8 , 4 ) × 2 ! C ( 4 , 2 ) × C ( 2 , 2 ) = 2 1 0 way
permutation formed ( a ) ( b ) ( c d ) ( e f ) ( g h ) where 1 ≤ a , b , c , d , e , f , g , h ≤ 8 There is C ( 8 , 2 ) × 3 ! C ( 6 , 2 ) × C ( 4 , 2 ) × C ( 2 , 2 ) = 4 2 0 way
permutation formed ( a b ) ( c d ) ( e f ) ( g h ) where 1 ≤ a , b , c , d , e , f , g , h ≤ 8 There is C ( 8 , 0 ) × 4 ! C ( 8 , 2 ) × C ( 6 , 2 ) × C ( 4 , 2 ) × C ( 2 , 2 ) = 1 0 5 way
So, total permutation are 1 + 2 8 + 2 1 0 + 4 2 0 + 1 0 5 = 7 6 4
I tried solving the problem using the fact that we are using S 8 . Thus, in my head, we could just use Lagrange's Theorem to find the kernel of the squaring homomorphism. A few minutes later, I figured out that φ : S 8 → S 8 , x ↦ x 2 is not a homomorphism because S 8 is nonabelian. So much for turning this into basic algebra. >_<
If S 8 → S 8 homomorphism, I think simple prove τ 2 : S 8 → S 8 is not a homomorphism, Hence, (a)(b)(c)(d)(e)(f)(gh) as kernel from function τ 2 have more than one in S 8 , τ 2 ( x ) are not homomorphism, this is not onto function. Now, I don't know relation homomorphism τ 2 with "Lagrange's Theorem" can construction to solve this problem. After see this problem, in my head, this problem similiar with count element in S 8 have order 2 , and element identity of this group. :),
Log in to reply
Indeed, I was being stupid and frivolous with my algebra. :P
Using Lagrange's Theorem and a homomorphism ϕ : S 8 → S 8 , we have that 8 ! = 4 0 3 2 0 = ∣ k e r ϕ ∣ ∣ S 8 / k e r ϕ ∣ . Unfortunately, as I so belatedly discovered, x ↦ x 2 is not a homomorphism on S 8 .
Log in to reply
Oh, but it's S 8 / k e r τ 2 are not group factor because S 8 not abelian. But if S 8 abelian group. I am sorry for my statement was wrong. Homomorphism must not onto function, but homomorphism only preverse selected structured from two structure. In other word, (f *g)(x)=f(x)og(x). Onto (surjective) if "epimorfisma". I am forgot for homomorphism theory , very long not read it...
To go about this problem, it would be useful to have an idea as to how repeated permutations work. As an example, let's look at the permutation τ 1 = 1 → 3 , 2 → 6 , 3 → 1 , 4 → 2 , 5 → 5 , 6 → 4 . It keeps certain values separated; it is easy to see that as τ 1 gets repeated, 1 will never map to 6 , 5 will always map to itself, and so on. In fact, τ 1 has three 'loops' that it repeats: ( 1 , 3 ) , ( 2 , 6 , 4 ) , and ( 5 ) . As such, it is useful to think of any permutation τ as a collection of loops that numbers go through as τ iterates. It happens that these loops are just disjoint subsets of the set τ permutes. (This is fairly simple to prove: if u were an element of two loops, then τ ( u ) would not be unique, and τ wouldn't be a function.)
If ( τ ∘ τ ) ( x ) = x , then the largest of these loops is of at most size 2 , and therefore, the problem is equivalent to finding the number of partitions with loops of size 2 or smaller, or, equivalently, partitioning our set S = 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 into blocks of size 2 or 1 .
Now that we have our problem in terms of structures on S , we can apply the theory of Generating Functions. If the function f ( x ) = number of partitions of a set of size x into subsets of size 2 or less (what a mouthful!) and F ( t ) is its exponential generating function, then by the Composition Principle, we have F ( t ) = ( G ∘ H ) ( x ) = e x + 2 x 2 , where G ( t ) = e x , the trivial generating function, and H ( t ) = x + 2 x 2 , the 'of size 1 or 2 ' generating function. Expanding at t = 0 , F ( t ) = e x + 2 x 2 = 1 + x + . . . + 7 6 4 8 ! x 8 + . . . , and our answer is 7 6 4 .
Sorry about the use of Generating Functions if you don't understand them; they're a kind of deeper topic in counting problems that I don't have the space or expertise to write about here, but if you're interested in finding out more, here are some resources (these are off-site, FYI):
This problem has been a good opportunity to study a bit of theory behind permutations.
Let it be m the least integer such that τ m = ϵ , where τ is a permutation of the set S = { 1 , 2 , . . . , 8 } and ϵ is the identity permutation. We call m the order of τ , also indicated as m = order ( τ ) .
In our particular case, we are looking for all the permutation of S such that their order m = 2 :
τ 2 = τ ∘ τ = ϵ .
The Order Theorem for Permutations states that, given a permutation τ written as a product of k disjoint cycles 1
τ = t 1 ∘ t 2 ∘ ⋯ ∘ t k
and being m i = order ( t i ) for i ∈ [ 1 , k ] , the order of τ is
m = order ( τ ) = lcm ( m 1 , . . . , m k )
where lmc ( ⋅ ) is the least common multiple .
Since, in our case, m = 2 , we have to find all the permutation of S that can be written as the product of 2-cycles 2 , since it can be proved that order ( σ ) = 2 only if σ is a 2-cycle .
Hence, the number N of permutation composed of only 2-cycles (plus the identity permutation itself) is
N = 1 + ( 2 8 ) + 2 ! 1 ( 2 8 ) ( 2 6 ) + 3 ! 1 ( 2 8 ) ( 2 6 ) ( 2 4 ) + 4 ! 1 ( 2 8 ) ( 2 6 ) ( 2 4 ) ( 2 2 ) = k = 0 ∑ 4 2 ! k ( 2 ( 4 − k ) ! ) 8 ! ⋅ k ! 1 = 7 6 4
1 : you can find the definition of cycle and some of its properties here .
2 : a k-cycle is a cycle of length k .
The problem of asking for the number of permutations τ on n elements such that τ ∘ τ is the identity permutation is equivalent to asking the following question: what is the number of involutions in S n , the symmetric group on n letters? It can be proved that the number of involutions in S n is given by:
∑ k = 0 ⌊ 2 n ⌋ 2 k k ! ( n − k ) ! n !
In this particular case, we are looking for the number of involutions in S 8 , the symmetric group on 8 letters. From our previous formula, we have that the number of involutions in S 8 is:
∑ k = 0 ⌊ 2 8 ⌋ 2 k k ! ( 8 − k ) ! 8 ! = 764.
Break it down into cases depending on how many elements are fixed .
f = No. of fixed elements ( f is always even )
n(f) = no. of requisite permutations with f elements fixed .
So the no. of reqd. permutations = n(8) + n(6) + n(4) + n(2) + n(0) = 1 + 28 + 210 + 420 + 105 = 764
There are five cases to consider.
Case 1: No cards are exchanged. There is exactly one such permutation.
Case 2: One pair of cards is interchanged. There are ( 2 8 ) = 2 8 such permutations.
Case 3: Two pairs of cards are interchanged. There are 2 ! ( 2 8 ) ⋅ ( 2 6 ) = 2 1 0 such permutations.
Case 4: Three pairs of cards are interchanged. There are 3 ! ( 2 8 ) ⋅ ( 2 6 ) ⋅ ( 2 4 ) = 4 2 0 such permutations.
Case 5: All pairs of cards are interchanged. There are 4 ! ( 2 8 ) ⋅ ( 2 6 ) ⋅ ( 2 4 ) ⋅ ( 2 2 ) = 1 0 5 such permutations.
Summing these gives 7 6 4
Problem Loading...
Note Loading...
Set Loading...
Let f ( n ) be the number of permutations τ on a set of n elements such that τ ∘ τ is the identity permutation. We can calculate that f ( 1 ) = 1 and f ( 2 ) = 2 . If n = 3 , the first element could either remain in position, or be moved to another position. If it remains in position, the number of ways to permute the remaining 2 elements is given by f ( 2 ) . There are 2 ways for it to change positions, either to the second or third position. In each case, if the first element is shifted to another position, the element in that position must be shifted to the first position for τ ∘ τ to be the identity permutation. This leaves just one element behind to permute. ( f ( 1 ) = 1 way to permute) From this: f ( 3 ) = f ( 2 ) + 2 f ( 1 ) = 2 + 2 = 4 .
The more general case holds similarly. If the first element remains in position, there are f ( n − 1 ) ways. Otherwise, it has n − 1 places to be permuted to, and that element must be shifted to the first position, so there are f ( n − 2 ) ways to permute the remaining element. Hence, f ( n ) = f ( n − 1 ) + ( n − 1 ) f ( n − 2 ) .
Working up to f ( 8 ) gives: f ( 3 ) = 4 f ( 4 ) = 4 + 2 ∗ 3 = 1 0 f ( 5 ) = 1 0 + 4 ∗ 4 = 2 6 f ( 6 ) = 2 6 + 5 ∗ 1 0 = 7 6 f ( 7 ) = 7 6 + 6 ∗ 2 6 = 2 3 2 f ( 8 ) = 2 3 2 + 7 ∗ 7 6 = 7 6 4 There answer to the problem is 7 6 4 .
[Edits for clarity - Calvin]