[Previous] [Next] [Contents]

## `COMP::Compo2Mat` -- a planar representation of a composition

#### Call(s)

`COMP::Compo2Mat(compo <,alphabet=l>)`

#### Parameters

`compo` | - | any list denoting a composition

#### Options

`alphabet=l` | - | specifying an alphabet

#### Introduction

The `COMP::Compo2Mat` function gives the diagram of a composition (i.e. a skew diagram of width 1, also called a ribbon), in the cartesian plane.

A composition is a list of strictly positive integers.

The following option is allowed: `alphabet= l` where `l` is a list of 1 to 3 components, l[1] filling the skew diagram, l[2] the inner diagram and l[3] the outside.

#### Example 1

    >> muEC::COMP::Compo2Mat( [4,2,1,5] );

                          +-                           -+
                          |  1, 1, 1, 1, 1, 0, 0, 0, 0  |
                          |                             |
                          |  0, 0, 0, 0, 1, 0, 0, 0, 0  |
                          |                             |
                          |  0, 0, 0, 0, 1, 1, 0, 0, 0  |
                          |                             |
                          |  0, 0, 0, 0, 0, 1, 1, 1, 1  |
                          +-                           -+

    >> print(Unquoted,
             muEC::COMP::Compo2Mat( [4,2,1,5], alphabet=["#",".",""] ) ):

                          +-                           -+
                          |  #, #, #, #, #,  ,  ,  ,    |
                          |                             |
                          |  ., ., ., ., #,  ,  ,  ,    |
                          |                             |
                          |  ., ., ., ., #, #,  ,  ,    |
                          |                             |
                          |  ., ., ., ., ., #, #, #, #  |
                          +-                           -+

#### Related Functions

`ListCompo`, `TYP::IsCompo`

[Previous] [Next] [Contents]

MuPAD Combinat, an open source algebraic combinatorics package