Question

In: Statistics and Probability

what is the maximum number of inversions that a permutation {1,..,n} can have? give the unique...

what is the maximum number of inversions that a permutation {1,..,n} can have? give the unique permutation with this many inversions. how many permutations have one fewer inversions than the minimum.

Solutions

Expert Solution

(a) maximum number of inversions that a permutation {1,..,n} can have

observe that the number of inversions cannot exceed the number of ways to choose two numbers (since each pair accounts for at most one inversion).

Hence, the number of inversions cannot exceed

(n2)=n(n?1)2

(b) give the unique permutation with this many inversions

Put everything in reverse order. So  {n,n-1 ,n-2,...........,3,2,1}

here every pair is inverted, and thus we have the full (n2)=n(n?1)2 inversions.

(C) permutations have one fewer inversions

Start with an arbitrary permutation with one less inversion. The only inversion must be between two adjacent elements.

  • Suppose we had a<band the permutation will be like {...,b,...,a,...}
  • If any element between b and a is less than b, then it creates another inversion with
    b
    . However, if it is greater than
    b
    , it must create an inversion with
    a
    .
  • Any element in between can't be equal to
    b
    either.
  • Hence, we can't have an element in between if there's only one inversion.

The permutations with one less inversion are then the n-1 permutations like {n,n-1,n-2,.....3,2,1}    with two adjacent elements swapped.


Related Solutions

Give the maximum number of orbitals in an atom that can have these quantum numbers: n...
Give the maximum number of orbitals in an atom that can have these quantum numbers: n = 3                                                   _______________ n = 3, l = 1                                           ______________ n=2, l=1, ml= 0                                    _______________ n=0, l=0, ml=0                                     _______________ Removing the electron from a Hydrogen atom corresponds to a raising the electron from n=1 to an orbit that has n=∞.             What is the energy needed to remove the electron from a hydrogen atom? What is the energy in terms of kJ per...
What are the inversions of four bar mechanism &give their applications ?What are the inversions of...
What are the inversions of four bar mechanism &give their applications ?What are the inversions of four bar mechanism &give their applications ?
Explain why every permutation in S(n) can be represented by a product of n-1 or fewer...
Explain why every permutation in S(n) can be represented by a product of n-1 or fewer cycles of length 2 (transpositions). Represent the permutationσ in problem (1) above as a product of 8 or fewer transpositions. Is σ an even or an odd permuation?
In an atom, what is the maximum number of electrons that can have the following quantum...
In an atom, what is the maximum number of electrons that can have the following quantum numbers? n=3, I=2, mI=-2 and n=4, I=1, mI=+1 Please explain and thank you so much!
What is the maximum number of electrons in an atom that can have the following quantum...
What is the maximum number of electrons in an atom that can have the following quantum numbers? n = 3 l = 1 18 6 3 2 1
What is the maximum number of electrons in an atom that can have the following quantum...
What is the maximum number of electrons in an atom that can have the following quantum numbers? (a) n = 3, ms = -1/2 (b) n = 6, l = 2 (c) n = 7, l = 3, ml = -1 (d) n = 2, l = 1, ml = +1, ms = +1/2
What is the maximum number of electrons in an atom that can have the following quantum...
What is the maximum number of electrons in an atom that can have the following quantum numbers? A.) n=2; ms= -1/2 B.) n=5: l=3 C.) n=4; l=3; ml= -3 D.) n=4; l=1; ml=1 Completely confused! Please explain your answer. Thanks...
What is the maximum number of electrons in an atom that can have the following quantum...
What is the maximum number of electrons in an atom that can have the following quantum numbers? (a) n = 4, ms = -1/2 ____ (b) n = 5, l = 3 ____ (c) n = 6, l = 3, ml = -2 ____ (d) n = 2, l = 1, ml = -1, ms = +1/2 ____
c++ is the language Code an O(nlog(n)) algorithm to count the number of inversions DO NOT...
c++ is the language Code an O(nlog(n)) algorithm to count the number of inversions DO NOT ADD OR EDIT FUNCTIONS USE THESE ONLY DO NOT EDIT THE TEST FILE EITHER countInv.cpp #include <vector> #include <algorithm> using namespace std; int mergeInv(vector<int>& nums, vector<int>& left, vector<int>& right) { // You will need this helper function that calculates the inversion while merging // Your code here } int countInv(vector<int>&nums) { // Your code here } countInv_test.cpp #include <iostream> #include <vector> using namespace std;...
Let P = (p1,...,pn) be a permutation of [n]. We say a number i is a...
Let P = (p1,...,pn) be a permutation of [n]. We say a number i is a fixed point of p, if pi = i. (a) Determine the number of permutations of [6] with at most three fixed points. (b) Determine the number of 9-derangements of [9] so that each even number is in an even position. (c) Use the following relationship (not proven here, but relatively easy to see) for the Rencontre numbers: Dn =(n-1)-(Dn-1 +Dn-2) (∗) to perform an...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT