#Please do not post homework #Ravali Bommanaboina, 10/11/20, Assignment 10 #Question 1 #P1 = [3,8,4,9,1,5,6,7,2] #P2 = [8,5,6,4,3,9,7,2,1] # 1,2,3,4,5,6,7,8,9 1,2,3,4,5,6,7,8,9 #(3,8,4,9,1,5,6,7,2)(8,5,6,4,3,9,7,2,1) #P1*P2 = [6,2,4,1,8,3,9,7,5] # 1,2,3,4,5,6,7,8,9 1,2,3,4,5,6,7,8,9 #(8,5,6,4,3,9,7,2,1)(3,8,4,9,1,5,6,7,2) #P2*P1 = [7,1,5,9,4,2,6,8,3] #inverse #P = [2, 4, 1, 5, 8, 9, 7, 3, 6] # 1,2,3,4,5,6,7,8,9 # (2,4,1,5,8,9,7,3,6) # 2,3,1,5,8,9,7,3,6 # (1,2,3,4,5,6,7,8,9) #P^(-1) = [3, 1, 8, 2, 4, 9, 7, 5, 6] #cycle structure #P := [4, 6, 9, 1, 3, 7, 5, 8, 2] -> [[4, 1], [8], [9, 2, 6, 7, 5, 3]] # 1,2,3,4,5,6,7,8,9 # (4,6,9,1,3,7,5,8,2) #4->1 #6->7->5->3->9->2 #8 #number of inversions #P = [5, 7, 1, 4, 9, 8, 3, 6, 2] ->20 #5 precedes 1,4,3,2 (4) #7 precedes 1,4,3,6,2 (5) #1 precedes nothing (0) #4 precedes 3,2 (2) #9 precedes 8,3,6,2 (4) #8 precedes 3,6,2 (3) #3 precedes 2 (1) #6 precedes 2 (1) #2 precedes nothing (0) #major index -> 21 #P = [5, 7, 1, 4, 9, 8, 3, 6, 2] # descents #7->1 (2) #9->8 (5) #8->3 (6) #6->2 (8) #2+5+6+8 #Question 2 #enter the first permutation InvGF:=proc(S) local i,permutations,sum: permutations:=permute(S): sum:=0: for i in permutations do sum:=inv(i)+sum: end do: return(sum): end: MajGF:=proc(S) local i,permutations,sum: permutations:=permute(S): sum:=0: for i in permutations do sum:=maj(i)+sum: end do: return(sum): end: #it is true for n=1,...,7 that InvGF(S)=MajGF(S) #Question 3 # 9, 8, 25/3, 54432/5, 7/864 #Question 4 #Question 5