Recognizing even or odd permutation easily?

In summary, the conversation discusses how to determine if a permutation is even or odd without manually counting the number of swaps. The suggested methods include counting the number of swaps required to reach the original set, counting the number of inversions, and examining the cycle structure of the permutation.
  • #1
vulpe
6
0
Hello folks, I'm not even sure if this is the place to put this but with some luck it might be.

I just have a general question about permutations. I understand the concept of even and odd permutations of a set of numbers, what I am hoping for is an easy way to figure out if (given a scrambled arrangement of the original set) the new set is even or odd? Obviously other than the trivial solution of going through it permutation by permutation and counting.

Thanks for any input!
 
Physics news on Phys.org
  • #2
The most basic odd permutations are those that swap 2 numbers. So count how many of those permutations must be applied to reach the identity. For example, 321 is odd (swap 3 and 1) but 312 is even (two swaps are required). It's a simple as that.
 
  • #3
I understand what odd and even permutations are, my question makes more sense if I use an example perhaps. Imagine that instead of 1,2,3 you have a set that's 1,2,3,4,5,6 . Now tell me, is 5,2,1,4,6,3 even or odd without taking forever haha :P
 
  • #4
Hi, vulpe,
I'd attempt the swaps that put each peg in place. In your example,
5,2,1,4,6,3
1,2,5,4,6,3 (1,5)
1,2,3,4,6,5 (3,5)
1,2,3,4,5,6 (5,6)
hence this one is odd. At worst, you'd do as many swaps as elements are (minus 1, actually).
 
  • #5
Go through all 2-element subsets of the numbers in the permutation and see for how many of these the greater number comes before the smaller in the permutation, call it an inversion if this is the case. If the number of inversions is odd, the permutaion is odd, otherwise even.

For example, in the permutation given by (2 6 1 4 3 5), (that is: 1 is mapped to 2, 2 to 6, 3 to 1, etc.) there are 6 inversions: (2,1), (6,1), (6,4), (6,3), (6,5), (4,3). 6 is en even number, so the permutation is even.
 
  • #6
Another approach using the cycle structure.

In your example: the permutation taking 1, 2, 3, 4, 5, 6 to 5, 2, 1, 4, 6, 3 has cycle structure (1 5 6 3) (2) (4). (If you don't know how to write down the cycle structure of a permutation, learn!) Now, a 4-cycle is odd and a 1-cycle is even, so we have odd × even × even = odd, so the permutation is odd.
 

1. What is the definition of a permutation?

A permutation is a rearrangement of elements in a set. It is a one-to-one mapping of the elements in the set onto themselves.

2. How do you determine if a permutation is even or odd?

To determine if a permutation is even or odd, you need to count the number of inversions in the permutation. An even permutation has an even number of inversions, while an odd permutation has an odd number of inversions.

3. What is an inversion in a permutation?

An inversion in a permutation is when two elements are in reverse order compared to their original position in the set. For example, in the permutation (1,3,2), the elements 3 and 2 are in reverse order compared to their original position (1 and 2, respectively).

4. Can you provide an example of an even and odd permutation?

Yes, the permutation (2,1,3) has one inversion (2 and 1), making it an odd permutation. The permutation (1,3,2) has two inversions (3 and 2, and 1 and 2), making it an even permutation.

5. Why is it important to be able to recognize even and odd permutations?

Recognizing even and odd permutations is important in fields such as cryptography, where it is used in encryption algorithms. It is also used in certain mathematical proofs and in determining the solvability of certain puzzles, such as the Rubik's Cube.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Quantum Interpretations and Foundations
2
Replies
45
Views
3K
  • Calculus and Beyond Homework Help
Replies
6
Views
3K
  • Precalculus Mathematics Homework Help
Replies
5
Views
790
Replies
2
Views
627
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
4K
  • Linear and Abstract Algebra
Replies
3
Views
4K
Replies
80
Views
4K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
Back
Top