[Previous] [Next] [Contents]

[ImplState=stable,TestState=stable,DocState=stable]

combinat::permutations::leequalPermutoedron -- permutoedron order on standard permutations

Introduction

Functions related to the permutoedron order on permutations.

Details

Method leequalPermutoedron: Test of the order relation of two permutations

Method predPermutoedron: list of the precedessors of a permutation

Method succPermutoedron: list of the successors of a permutation

Method smallerPermutoedron: list of the permutations smaller than a permutation

Method greaterPermutoedron: list of the permutations greater than a permutation

Example 1

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]]
        

Example 2

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]]
        

[Previous] [Next] [Contents]


MuPAD Combinat, an open source algebraic combinatorics package