<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %A  wordass.xml                 GAP documentation            Alexander Hulpke -->
<!-- %% -->
<!-- %% -->
<!-- %Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland -->
<!-- %Y  Copyright (C) 2002 The GAP Group -->
<!-- %% -->
<Chapter Label="Associative Words">
<Heading>Associative Words</Heading>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Categories of Associative Words">
<Heading>Categories of Associative Words</Heading>

<#Include Label="[1]{wordass}">
<#Include Label="IsAssocWord">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Free Groups, Monoids and Semigroups">
<Heading>Free Groups, Monoids and Semigroups</Heading>

Usually a family of associative words will be generated by constructing
the free object generated by them.
See <Ref Func="FreeMonoid" Label="for given rank"/>,
<Ref Func="FreeSemigroup" Label="for given rank"/> for details.

<#Include Label="FreeGroup">
<#Include Label="IsFreeGroup">
<#Include Label="AssignGeneratorVariables">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Comparison of Associative Words">
<Heading>Comparison of Associative Words</Heading>

<#Include Label="[2]{wordass}">
<#Include Label="IsShortLexLessThanOrEqual">
<#Include Label="IsBasicWreathLessThanOrEqual">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Operations for Associative Words">
<Heading>Operations for Associative Words</Heading>

<#Include Label="[3]{wordass}">
<P/>
<#Include Label="Length:wordass">
<#Include Label="ExponentSumWord">
<#Include Label="Subword">
<#Include Label="PositionWord">
<#Include Label="SubstitutedWord">
<#Include Label="EliminatedWord">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Operations for Associative Words by their Syllables">
<Heading>Operations for Associative Words by their Syllables</Heading>

<#Include Label="[5]{wordass}">
<#Include Label="NumberSyllables">
<#Include Label="ExponentSyllable">
<#Include Label="GeneratorSyllable">
<#Include Label="SubSyllables">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Representations for Associative Words">
<Heading>Representations for Associative Words</Heading>

&GAP; provides two different internal kinds of representations of
associative words.  The first one are <Q>syllable representations</Q> in which
words are stored in syllable (i.e. generator,exponent) form. (Older versions
of &GAP; only used this representation.) The second kind are <Q>letter
representations</Q> in which each letter in a word is represented by its index
number. Negative numbers are used for inverses. Unless the syllable
representation is specified explicitly when creating the free group/monoid
or semigroup, a letter representation is used by default.
<P/>
Depending on the task in mind, either of these two representations will
perform better in time or in memory use and algorithms that are syllable or
letter based (for example <Ref Oper="GeneratorSyllable"/> and
<Ref Oper="Subword"/>) perform substantially better in the corresponding
representation.
For example when creating pc groups (see&nbsp;<Ref Chap="Pc Groups"/>),
it is advantageous to use a syllable representation while calculations in
free groups usually benefit from using a letter representation.

<#Include Label="IsLetterAssocWordRep">
<#Include Label="IsLetterWordsFamily">
<#Include Label="IsBLetterAssocWordRep">
<#Include Label="IsBLetterWordsFamily">
<#Include Label="IsSyllableAssocWordRep">
<#Include Label="IsSyllableWordsFamily">
<#Include Label="Is8BitsFamily">
<#Include Label="LetterRepAssocWord">
<#Include Label="AssocWordByLetterRep">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="The External Representation for Associative Words">
<Heading>The External Representation for Associative Words</Heading>

<#Include Label="[6]{wordass}">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Straight Line Programs">
<Heading>Straight Line Programs</Heading>

<#Include Label="[1]{straight}">
<#Include Label="IsStraightLineProgram">
<#Include Label="StraightLineProgram">
<#Include Label="LinesOfStraightLineProgram">
<#Include Label="NrInputsOfStraightLineProgram">
<#Include Label="ResultOfStraightLineProgram">
<#Include Label="StringOfResultOfStraightLineProgram">
<#Include Label="CompositionOfStraightLinePrograms">
<#Include Label="IntegratedStraightLineProgram">
<#Include Label="RestrictOutputsOfSLP">
<#Include Label="IntermediateResultOfSLP">
<#Include Label="IntermediateResultOfSLPWithoutOverwrite">
<#Include Label="IntermediateResultsOfSLPWithoutOverwrite">
<#Include Label="ProductOfStraightLinePrograms">
<#Include Label="SlotUsagePattern">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Straight Line Program Elements">
<Heading>Straight Line Program Elements</Heading>

<#Include Label="[2]{straight}">
<#Include Label="IsStraightLineProgElm">
<#Include Label="StraightLineProgElm">
<#Include Label="StraightLineProgGens">
<#Include Label="EvalStraightLineProgElm">
<#Include Label="StretchImportantSLPElement">

</Section>
</Chapter>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %E -->

