COMP::Compo2Mat
--
a planar representation of a composition
COMP::Compo2Mat(compo <,alphabet=l>)
compo | - | any list denoting a composition |
alphabet=l | - | specifying an alphabet |
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.
>> 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=["#",".",""] ) ):
+- -+ | #, #, #, #, #, , , , | | | | ., ., ., ., #, , , , | | | | ., ., ., ., #, #, , , | | | | ., ., ., ., ., #, #, #, # | +- -+
MuPAD Combinat, an open source algebraic combinatorics package