View Full Version : Permutations
tikki14
Oct 5, 2011, 05:21 AM
1.[math]\[
\sigma =
\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & 2n-2 & 2n-1 & 2n \\
1 & 2n & 3 & 2n-1 & \cdots & 2n-3 & 4 & 2n-1 & 2
\end{pmatrix}
\][\math]
2.[math]\[
\sigma =
\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & 2n-2 & 2n-1 & 2n \\
2n-1 & 2 & 2n-3 & 4 & \cdots & 3 & 2n-2 & 1 & n
\end{pmatrix}
\][\math]
How to calculate [math]\varepsilon(\sigma)[\math]? [math]\varepsilon(\sigma)= (-1)^(m(\sigma))[\math]
ebaines
Oct 5, 2011, 05:46 AM
1.\[
\sigma =
\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & 2n-2 & 2n-1 & 2n \\
1 & 2n & 3 & 2n-1 & \cdots & 2n-3 & 4 & 2n-1 & 2
\end{pmatrix}
\]
2.\[
\sigma =
\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & 2n-2 & 2n-1 & 2n \\
2n-1 & 2 & 2n-3 & 4 & \cdots & 3 & 2n-2 & 1 & n
\end{pmatrix}
\]
how to calculate \varepsilon(\sigma)? \varepsilon(\sigma)= (-1)^{(m(\sigma))}
I quoted your original question and fixed the Latex error. For future reference - the ending delimiter for Latex is "[/math]," not "[\math]." I also put braces {} around the exponent - let me know if that's what you meant.
But after making these corrections I'm afraid I don't understand the question - please be more explicit.
jcaron2
Oct 5, 2011, 06:01 AM
1.\[
\sigma =
\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & 2n-3 & 2n-2 & 2n-1 & 2n \\
1 & 2n & 3 & 2n-1 & \cdots & 2n-3 & 4 & 2n-1 & 2
\end{pmatrix}
\]
2.\[
\sigma =
\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & 2n-3 & 2n-2 & 2n-1 & 2n \\
2n-1 & 2 & 2n-3 & 4 & \cdots & 3 & 2n-2 & 1 & n
\end{pmatrix}
\]
How to calculate \varepsilon(\sigma)? \varepsilon(\sigma)= (-1)^{(m(\sigma))}
I think you also have a slight misalignment in your columns on the right-hand side of your permutations. I think I fixed them in the quote above, but please make sure I interpreted you correctly.
I know these are two permutations written in two-line notation (from Group Theory). But I'm not familiar with m(\sigma ). Can you tell us what m means?
tikki14
Oct 5, 2011, 06:11 AM
Yes, this what I meant and thank you for fixing the problem.
I need to find the sign of the permutations ([/math]\varepsilon(\sigma)= \Pi \frac{\sigma(j) - \sigma(I)}{j-i}[\math]) but I think it would be easier to find it by using the number of inversions [/math]m(\sigma)[\math] so that [/math]\epsilon(\sigma)=(-1)^(m(\sigma))[\math].
In both cases there are some 'rules' between the elements of the second row, but I just can't spot them. So, on the whole, it's not the sign that interests me, but the rule.
!The permutations are not linked together.
Thank you, again.
tikki14
Oct 5, 2011, 06:15 AM
Sorry for committing the same mistakes, I hope this time it works.
I need to find the sign of the permutations (\varepsilon(\sigma)= \Pi \frac{\sigma(j) - \sigma(i)}{j-i}) but I think it would be easier to find it by using the number of inversions m(\sigma) so that \epsilon(\sigma)=(-1)^(m(\sigma)).
In both cases there are some 'rules' between the elements of the second row, but I just can't spot them. So, on the whole, it's not the sign that interests me, but the rule.
!The permutations are not linked together.
tikki14
Oct 5, 2011, 06:44 AM
An example of how I generally solve this type of problem:
\[
\sigma =
\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & n & n+1 & n+2 & \cdots & 2n \\
2 & 4 & 6 & 8 & \cdots & 2n & 1 & 3 & \cdots & 2n-1
\end{pmatrix}
\]
m(\sigma)=1+2+3+...+n=\frac{n(n+1)}{2}
This actually means:
2 > 1 => 1 (2 is bigger than one element)
4 > 1 && 4 > 3 => (4 is bigger than 2 elements)
6 > 1 && 6 > 3 && 6 > 5 (6 is bigger than 3 elements)
...
2n > n elements
So, the sign is \varepsilon(\sigma)=(-1)^{\frac{n(n+1)}{2})} and depending on n \varepsilon(\sigma)=1 or -1
I hope this make my question more clear
jcaron2
Oct 5, 2011, 12:20 PM
Ahh, I understand now.
In both of these examples, it seems easiest to break the problem into four separate sums: (1) The inversions where the first number is odd and the second is odd; (2) those where the first is odd and the second is even; (3) those where the first is even and the second is odd; and (4) those where both are even. The total number of inversions is simply the sum of these four different scenarios, of course.
For example, for your first permutation,
\[\sigma =\begin{pmatrix}
1 & 2 & 3 & 4 & \cdots & 2n-3 & 2n-2 & 2n-1 & 2n \\
1 & 2n & 3 & 2n-2 & \cdots & 2n-3 & 4 & 2n-1 & 2
\end{pmatrix}
\],
the number of inversions where both the first and second numbers are odd is zero. That's because the odd numbers are increasing from left to right. (By the way, note that I corrected your formula once more to say "2n-2", not "2n-1". I'm pretty sure that's what you meant).
In the case of the first number being odd but the second number being even, however, the situation is different. Beginning at 1, there are no smaller even numbers to its right. Moving down two places to the 3, there is exactly one even number to its right (the number 2). Moving on to 5, there are two even numbers to its right (the numbers 4 and 2). This pattern of increasing by one for each subsequent odd number continues until you get to the vicinity of half-way through, where you get to the point that ALL of the evens to the right of the odd number in question are less than it, so they all represent inversions. At this point, the total number of inversions begins to go DOWN by one every time you move over to the right (that's because every time you move one odd number higher, there is one fewer even number remaining to its right).
If you write this out for increasing values of n, you'll see that the pattern goes something like:
1 1; 1 2 1; 1 2 2 1; 1 2 3 2 1; 1 2 3 3 2 1; 1 2 3 4 3 2 1; etc.
Unfortunately, the formula for this sum is slightly different depending on whether 2n is evenly divisible by 4 (i.e. whether n is even or odd). If n is even, the sum works out to \frac{n^2}{4}. If it's odd, the sum is \frac{n^2-1}{4}.
Now you can do the same thing for the other two scenarios (when the first number is even). The even-even case is again quite trivial; the even numbers are decreasing to the right. Therefore the number of even-even inversions is simply the sum of the number of even numbers to the right of each even number. That should work out to (n-1) + (n-2) +... 1 + 0, which should work out to \frac{n(n-1)}{2}.
I'll let you take a crack at the even-odd scenario and try the second example on your own. Let me know if you get stuck. I don't know whether this is true or not, but hopefully you'll find that the even-odd scenario for the first example also has a slightly different answer depending on whether n is even or odd, and hopefully you'll furthermore find that when you add the even-odd and odd-even sums together, the n-being-even-or-odd differences will wash out. That would make the answer a lot more elegant.
Let me know how it works out!
tikki14
Oct 6, 2011, 08:06 AM
Now it is more clear... and yes, I meant 2n-2 instead of 2n-1, thank you for pointing the mistake.
Here is what I succeeded on solving for the first permutation:
Case 1 (odd-odd): 1<3<5<... <2n-3<2n-1 => S1=0
Case 2 (odd-even):
1 -> 0 numbers
3 -> 1 number (2)
5 -> 2 numbers (2,4)
...
n -> (n-1)/2
...
2n-3 -> 2 (4,2)
2n-1 -> 1 (2)
Here I don't quite understand which element is in the middle and how to establish the number of smaller elements. I suppose that n should be the middle and therefore (n-1)/2 smaller elements. Despite this, I still don't know how to calculate the sum. Supposing I've determined the correct values, how do I know if I have
1 2 3 4... (n-1)/2... 4 3 2 1 or 1 2 3 4... (n-1)/2, (n-1)/2... 4 3 2 1 ?
Case 3 (even-odd):
2n -> (2n-2)/2 = n-1 (the total number of elements - the number of elements before 2n, including 2n)/2
2n-2 -> (n-1)-2 = n-3 (the odd numbers go down by 2)
...
n-2 -> 1
n -> 0 (starting from the half, there are zero odd numbers smaller than the even ones)
S_3 = 1 + 3 + 5 + ... + (n-3) + (n-1) =
= 1 + 2 + 3 + ... + (n-3) + (n-2) + (n-1) - [2 + 4 + 6 + ... + (n-2)] =
= \frac{(n-1)n}{2} - 2(1 + 2 + 3 + ... + \frac{n-2}{2})=
= \frac{(n-1)n}{2} - \frac{n-2}{2} \frac{n}{2} = \frac{n^2}{4}
And now I know that I made a mistake since in case 2 and 3 n is odd and then even, which is false.
Case 4 (even-even):
2n -> (2n-2)/2 = n-1
2n-2 -> n-2 (the even numbers go down by 1)
...
4 -> 1
2 -> 0
S_4 = 1 + 2 + 3 + ... + (n-2) + (n-1) = \frac{(n-1)n}{2}
tikki14
Oct 6, 2011, 08:07 AM
S_3=\frac{n^2}{4}