  
  [1X9 Catenary and Tame degrees of numerical semigroups[0X
  
  
  [1X9.1 Factorizations in Numerical Semigroups[0X
  
  Let  S  be  a  numerical  semigroup  minimally generated by {m_1,...,m_n}. A
  factorization  of  an  element  sin  S  is  an  n-tuple  a=(a_1,...,a_n)  of
  nonnegative  integers  such that n=a_1 n_1+cdots+a_n m_n. The lenght of a is
  |a|=a_1+cdots+a_n.  Given  two  factorizations  a  and  b of n, the distance
  between   a   and   b  is  d(a,b)=max  {  |a-gcd(a,b)|,|b-gcd(a,b)|},  where
  gcd((a_1,...,a_n),(b_1,...,b_n))=(min(a_1,b_1),...,min(a_n,b_n)).
  
  If  l_1>cdots > l_k are the lenghts of all the factorizations of s in S, the
  Delta set associated to s is Delta(s)={l_1-l_2,...,l_k-l_k-1}.
  
  The  catenary degree of an element in S is the least positive integer c such
  that  for  any  two  of  its factorizations a and b, there exists a chain of
  factorizations  starting  in  a  and  ending  in  b and so that the distance
  between  two consecutive links is at most c. The catenary degree of S is the
  supremum of the catenary degrees of the elements in S.
  
  The tame degree of S is the least positive integer t for any factorization a
  of  an  element  s in S, and any i such that s-m_iin S, there exists another
  factorization b of s so that the distance to a is at most t and b_inot = 0.
  
  The  basic  properties  of  these  constants  can  be  found  in [GH06]. The
  algorithm  used  to compute the catenary and tame degree is an adaptation of
  the algorithms appearing in [PR06] for numerical semigroup (see [CL07]). The
  computation  of the elascitiy of a numerical semigroup reduces to m/n with m
  the  multiplicity  of the semigroup and n its largest minimal generator (see
  [CM06] or [GH06]).
  
  [1X9.1-1 FactorizationsElementWRTNumericalSemigroup[0m
  
  [2X> FactorizationsElementWRTNumericalSemigroup( [0X[3Xn, S[0X[2X ) _______________[0Xfunction
  
  [3XS[0m  is  a  numerical semigroup and [3Xn[0m a nonnegative integer. The output is the
  set of factorizations of [3Xn[0m in terms of the minimal generating set of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> FactorizationsElementWRTNumericalSemigroup(1100,s);[0X
    [4X[ [ 0, 0, 0, 2, 2, 0 ], [ 0, 2, 3, 0, 0, 1 ], [ 0, 8, 1, 0, 0, 0 ],[0X
    [4X  [ 5, 1, 1, 0, 0, 1 ] ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-2 LengthsOfFactorizationsElementWRTNumericalSemigroup[0m
  
  [2X> LengthsOfFactorizationsElementWRTNumericalSemigroup( [0X[3Xn, S[0X[2X ) ______[0Xfunction
  
  [3XS[0m  is  a  numerical semigroup and [3Xn[0m a nonnegative integer. The output is the
  set of lengths of the factorizations of [3Xn[0m in terms of the minimal generating
  set of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> LengthsOfFactorizationsElementWRTNumericalSemigroup(1100,s);[0X
    [4X[ 4, 6, 8, 9 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-3 ElasticityOfFactorizationsElementWRTNumericalSemigroup[0m
  
  [2X> ElasticityOfFactorizationsElementWRTNumericalSemigroup( [0X[3Xn, S[0X[2X ) ___[0Xfunction
  
  [3XS[0m  is  a  numerical  semigroup  and  [3Xn[0m a positive integer. The output is the
  maximum  length  divided by the minimum length of the factorizations of [3Xn[0m in
  terms of the minimal generating set of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> ElasticityOfFactorizationsElementWRTNumericalSemigroup(1100,s);[0X
    [4X9/4[0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-4 ElasticityOfNumericalSemigroup[0m
  
  [2X> ElasticityOfNumericalSemigroup( [0X[3XS[0X[2X ) ______________________________[0Xfunction
  
  [3XS[0m is a numerical semigroup. The output is the elasticity of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> ElasticityOfNumericalSemigroup(s);[0X
    [4X286/101[0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-5 DeltaSetOfFactorizationsElementWRTNumericalSemigroup[0m
  
  [2X> DeltaSetOfFactorizationsElementWRTNumericalSemigroup( [0X[3Xn, S[0X[2X ) _____[0Xfunction
  
  [3XS[0m  is  a  numerical semigroup and [3Xn[0m a nonnegative integer. The output is the
  Delta  set of the factorizations of [3Xn[0m in terms of the minimal generating set
  of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> DeltaSetOfFactorizationsElementWRTNumericalSemigroup(1100,s);[0X
    [4X[ 1, 2 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-6 MaximumDegreeOfElementWRTNumericalSemigroup[0m
  
  [2X> MaximumDegreeOfElementWRTNumericalSemigroup( [0X[3Xn, S[0X[2X ) ______________[0Xfunction
  
  [3XS[0m  is  a  numerical semigroup and [3Xn[0m a nonnegative integer. The output is the
  maximum length of the factorizations of [3Xn[0m in terms of the minimal generating
  set of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> MaximumDegreeOfElementWRTNumericalSemigroup(1100,s);[0X
    [4X9[0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-7 CatenaryDegreeOfNumericalSemigroup[0m
  
  [2X> CatenaryDegreeOfNumericalSemigroup( [0X[3XS[0X[2X ) __________________________[0Xfunction
  
  [3XS[0m is a numerical semigroup. The output is the catenary degree of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> CatenaryDegreeOfNumericalSemigroup(s);[0X
    [4X8[0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-8 CatenaryDegreeOfElementNS[0m
  
  [2X> CatenaryDegreeOfElementNS( [0X[3Xn, S[0X[2X ) ________________________________[0Xfunction
  
  [3Xn[0m is a nonnegative integer and [3XS[0m is a numerical semigroup. The output is the
  catenary degree of [3Xn[0m relative to [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> CatenaryDegreeOfElementNS(157,NumericalSemigroup(13,18));[0X
    [4X0[0X
    [4Xgap> CatenaryDegreeOfElementNS(1157,NumericalSemigroup(13,18));[0X
    [4X18[0X
  [4X------------------------------------------------------------------[0X
  
  [1X9.1-9 TameDegreeOfNumericalSemigroup[0m
  
  [2X> TameDegreeOfNumericalSemigroup( [0X[3XS[0X[2X ) ______________________________[0Xfunction
  
  [3XS[0m is a numerical semigroup. The output is the tame degree of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(101,113,196,272,278,286);[0X
    [4X<Numerical semigroup with 6 generators>[0X
    [4Xgap> TameDegreeOfNumericalSemigroup(s);[0X
    [4X14[0X
  [4X------------------------------------------------------------------[0X
  
