combinat::permutations::leequalPermutoedron
--
permutoedron order on standard permutations
Functions related to the permutoedron order on permutations.
leequalPermutoedron(standard permutations p1, p2 <, Left>)
p1
smaller than
p2
in the permutoedron order?''
predPermutoedron(standard permutation p <, Left>)
p
in the
permutoedron order, such that there is no permutation between one of those
and p
.
succPermutoedron(standard permutation p <, Left>)
p
in the
permutoedron order, such that there is no permutation between p
and
one of those.
smallerPermutoedron(standard permutation p <, Left>)
p
in
the permutoedron order.
greaterPermutoedron(standard permutation p <, Left>)
p
in
the permutoedron order.All the computations in this example are done in the Right permutoedron. To check whether a permutation is smaller than another thanks to the permutoedron order, you can use:
>> combinat::permutations::leequalPermutoedron([3,2,1,4],[4,2,1,3]);
FALSE
To compute what permutations precede a given permutation, you can use:
>> combinat::permutations::predPermutoedron([4, 2, 1, 3]);
[[2, 4, 1, 3], [4, 1, 2, 3]]
Now, you can compute the transitive ideal generated by the predecessor relation and get:
>> combinat::permutations::smallerPermutoedron([4, 2, 1, 3]);
[[1, 2, 3, 4], [1, 2, 4, 3], [2, 1, 3, 4], [2, 1, 4, 3], [2, 4, 1, 3], [1, 4, 2, 3], [4, 1, 2, 3], [4, 2, 1, 3]]
What was done with the permutations preceding a given one or smaller than it, can also be performed by the permutations succeeding a given one or greater than it by:
>> combinat::permutations::succPermutoedron([4, 2, 1, 3]);
combinat::permutations::greaterPermutoedron([4, 2, 1, 3]);
[[4, 2, 3, 1]] [[4, 3, 2, 1], [4, 2, 3, 1], [4, 2, 1, 3]]
All the computations in this example are done in the Left permutoedron. All the result can be compared with the results of the previous example. To check whether a permutation is smaller than another thanks to the permutoedron order, you can use:
>> combinat::permutations::leequalPermutoedron([3,2,1,4],[4,2,1,3],Left);
TRUE
To compute what permutations precede a given permutation in the Left permutoedron, you can use:
>> combinat::permutations::predPermutoedron([4, 2, 1, 3], Left);
[[4, 1, 2, 3], [3, 2, 1, 4]]
Now, you can compute the transitive ideal generated by the predecessor relation in the Left permutoedron and get:
>> combinat::permutations::smallerPermutoedron([4, 2, 1, 3], Left);
[[1, 2, 3, 4], [2, 1, 3, 4], [3, 1, 2, 4], [4, 1, 2, 3], [1, 3, 2, 4], [2, 3, 1, 4], [3, 2, 1, 4], [4, 2, 1, 3]]
What was done with the permutations preceding a given one or smaller than it, can also be performed by the permutations succeeding a given one or greater than it by:
>> combinat::permutations::succPermutoedron([4, 2, 1, 3], Left);
combinat::permutations::greaterPermutoedron([4, 2, 1, 3], Left);
[[4, 3, 1, 2]] [[4, 3, 2, 1], [4, 3, 1, 2], [4, 2, 1, 3]]
MuPAD Combinat, an open source algebraic combinatorics package