The Sorting Index and Permutation Codes
In the combinatorial study of the coefficients of a bivariate polynomial that generalizes both the length and the reflection length generating functions for finite Coxeter groups, Petersen introduced a new Mahonian statistic , called the sorting index. Petersen proved that the pairs of statistics and have the same joint distribution over the symmetric group, and asked for a combinatorial proof of this fact. In answer to the question of Petersen, we observe a connection between the sorting index and the B-code of a permutation defined by Foata and Han, and we show that the bijection of Foata and Han serves the purpose of mapping to . We also give a type analogue of the Foata-Han bijection, and we derive the quidistribution of and over signed permutations. So we get a combinatorial interpretation of Petersen's equidistribution of and . Moreover, we show that the six pairs of set-valued statistics , , , , and are equidistributed over signed permutations. For Coxeter groups of type , Petersen showed that the two statistics and are equidistributed. We introduce two statistics and for elements of and we prove that the two pairs of statistics and are equidistributed.