COMP::Compo2MajorIndex
--
major index of a composition
COMP::Compo2MajorIndex(compo)
compo | - | any list denoting a composition |
The COMP::Compo2MajorIndex
function computes the major index of a given composition.
Let
I = [i1, i2, ..., im]
be a composition, then
COMP::Compo2MajorIndex
(I)
is set to be
(m-1) i1 + (m-2) i2 + ... + i{m-1}.
>> muEC::COMP::Compo2MajorIndex( [2,3,1,2] );
13
MuPAD Combinat, an open source algebraic combinatorics package