Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  dcrws.xml   Sprache: XML

 
<!-- ------------------------------------------------------------------- -->
<!--                                                                     -->
<!--  dcrws.xml             KAN documentation             Chris Wensley  -->
<!--                                                    & Anne Heyworth  -->
<!-- ------------------------------------------------------------------- -->

<?xml version="1.0" encoding="UTF-8"?>

<Chapter Label="chap-dcrws">
<Heading>Double Coset Rewriting Systems</Heading>

The &kan; package provides functions for the computation of normal forms
for double coset representatives of finitely presented groups.
The first version of the package was released to support the
paper <Cite Key="BrGhHeWe" />, which describes the algorithms 
used in this package.

<Section><Heading>Rewriting Systems</Heading>

<ManSection>
   <Oper Name="KnuthBendixRewritingSystem"
         Arg="grp, gensorder, ordering, alph" />
   <Oper Name="ReducedConfluentRewritingSystem"
         Arg="grp, gensorder, ordering, lim, alph" />
   <Oper Name="DisplayRwsRules"
         Arg="rws" />
<Description>
Methods for <C>KnuthBendixRewritingSystem</C> and 
<C>ReducedConfluentRewritingSystem</C> 
are supplied which apply to a finitely presented group. 
These start by calling <C>IsomorphismFpMonoid</C> and then work with
the resulting monoid.
The parameter <C>ordering</C> will normally be 
<C>"shortlex"</C> or <C>"wreath"</C>, 
while <C>gensorder</C> is an integer list for reordering the generators, 
and <C>alph</C> is an alphabet string used when printing words.
A <E>partial</E> rewriting system may be obtained by giving a <C>limit</C> 
to the number of rules calculated. 
As usual, <M>A,B</M> denote the inverses of <M>a,b</M>. 
<P/>
We take as an example the fundamental group of the oriented surface of genus 2. 
The generators are by default ordered 
<C>[A,a,B,b,C,c,D,d]</C>, 
so the list <C>L = [2,1,4,3,6,5,8,7]</C> is used to specify the order <C>[a,A,b,B,c,C,d,D]</C> 
to be used with the wreath ordering.
Specifying a limit <C>0</C> means that no limit is prescribed.
<P/>
The operation <C>DisplayRwsRules</C> prints out the rules using the letters 
in the given alphabet <C>alph4</C> rather than using the generators of the 
monoid. 
(As from September 2023 the rules are first converted to a set, 
so that the output is the same in the latest released version 
and in the development version.)
<P/>
<Index>ReducedForm</Index>
An additional method for <C>ReducedForm(G,g)</C> is provided 
for a finitely presented group <C>G</C> with a rewriting system 
and an element <C>g</C> of <C>G</C>. 
</Description>
</ManSection>
<Example>
<![CDATA[
gap> F4 := FreeGroup( 4 );;
gap> rels := [ Comm(F4.1,F4.2) * Comm(F4.3,F4.4) ];;
gap> H4 := F4/rels;; 
gap> L := [2,1,4,3,6,5,8,7];;
gap> order := "wreath";;
gap> alph4 := "aAbBcCdD";;
gap> rws4 := ReducedConfluentRewritingSystem( H4, L, order, 0, alph4 );;
gap> DisplayRwsRules( rws4 );
[ [ aA, id ], [ Aa, id ], [ bB, id ], [ Bb, id ], [ cC, id ], [ cd, dcBAba ], \
[ Cc, id ], [ Cd, dABabC ], [ CD, BAbaDC ], [ dD, id ], [ Dd, id ], [ cBAbaD, \
Dc ] ]
true
gap> a := H4.1;;  b := H4.2;;  c := H4.3;;  d := H4.4;; 
gap> ReducedForm( H4, c*d);
f4*f3*f2^-1*f1^-1*f2*f1
]]>
</Example>

<ManSection Label="nextwords">
   <Oper Name="NextWord"
         Arg="rws, w, limit" />
   <Oper Name="NextWords"
         Arg="rws, w, length, limit" />
<Description>
The <C>NextWord</C> operation finds the next recognizable word after <C>w</C> 
using the rewriting system <C>rws</C>. 
The third parameter is the maximum number of words that will be tested 
before giving up. 
(If no limit is provided the number <M>100,000</M> is used.) 
<P/>
The <C>NextWords</C> operation applies <C>NextWord</C> repeatedly 
and returns a list of the specified length of recognizable words. 
(If, at any stage, the limit is reached, a truncated list is returned.) 
<P/>
</Description>
</ManSection>
<Example>
<![CDATA[
gap> free4 := FreeMonoidOfRewritingSystem( rws4 );; 
gap> gens4 := GeneratorsOfMonoid( free4 );
[ f1, f1^-1, f2, f2^-1, f3, f3^-1, f4, f4^-1 ]
gap> NextWord( rws4, gens4[5]*gens4[7] ); 
f3*f4^-1
gap> NextWords( rws4, last, 20, 100 );
[ f3^-1*f1, f3^-1*f1^-1, f3^-1*f2, f3^-1*f2^-1, f3^-1^2, f4*f1, f4*f1^-1, 
  f4*f2, f4*f2^-1, f4*f3, f4*f3^-1, f4^2, f4^-1*f1, f4^-1*f1^-1, f4^-1*f2, 
  f4^-1*f2^-1, f4^-1*f3, f4^-1*f3^-1, f4^-1^2, f1^3 ]
]]>
</Example>
</Section>


<Section><Heading>Example 2 -- free product of two cyclic groups</Heading>

<Index>example -- free product</Index>
<ManSection>
   <Func Name="DoubleCosetRewritingSystem"
         Arg="G, H, K, rws" />
   <Prop Name="IsDoubleCosetRewritingSystem"
         Arg="dcrws" />
<Description>
A <E>double coset rewriting system</E> for the double cosets 
<M>H \backslash G / K</M> 
requires as data a finitely presented group <M>G</M>; 
subgroups <M>H, K</M> of <M>G</M>; 
and a rewriting system <C>rws</C> for <M>G</M>.
<P/>
A simple example is given by taking <M>G</M> to be the free group on two
generators <M>a,b</M>, a cyclic subgroup <M>H</M> with generator <M>a^6</M>,
and a second cyclic subgroup <M>K</M> with generator <M>a^4</M>.
(Similar examples using different powers of <M>a</M> are easily constructed.)
Since <C>gcd(6,4)=2</C>, we have <M>Ha^2K=HK</M>, so the double cosets have
representatives <M>[HK, HaK, Ha^iba^jK, Ha^ibwba^jK]</M>
where <M>i \in [0..5]</M>, <M>j \in [0..3]</M>, 
and <M>w</M> is any word in <M>a,b</M>.
<P/>
In the example the free group <M>G</M> is converted to a four generator
monoid with relations defining the inverse of each generator,
<C>[[Aa,id],[aA,id],[Bb,id],[bB,id]]</C>, 
where <C>id</C> is the empty word.
The initial rules for the double coset rewriting system 
comprise those of <M>G</M> plus those given by 
the generators of <M>H,K</M>, which are <M>[[Ha^6,H],[a^4K,K]]</M>.
In the complete rewrite system new rules involving <M>H</M> or <M>K</M> 
may arise, and there may also be rules involving both <M>H</M> and <M>K</M>. 
<P/>
For this example,
<List>
<Item>
there are two <M>H</M>-rules, <M>[[Ha^4,HA^2],[HA^3,Ha^3]]</M>,
</Item>
<Item>
there are two <M>K</M>-rules, <M>[[a^3K,AK],[A^2K,a^2K]]</M>,
</Item>
<Item>
and there are two <M>H</M>-<M>K</M>-rules, <M>[[Ha^2K,HK],[HAK,HaK]]</M>.
</Item>
</List>
Here is how the computation may be performed.
</Description>
</ManSection>
<Example>
<![CDATA[
gap> G1 := FreeGroup( 2 );;
gap> L1 := [2,1,4,3];;
gap> order := "shortlex";;
gap> alph1 := "AaBb";;
gap> rws1 := ReducedConfluentRewritingSystem( G1, L1, order, 0, alph1 );
Rewriting System for Monoid( [ f1, f1^-1, f2, f2^-1 ], ... ) with rules
[ [ f1*f1^-1, <identity ...> ], [ f1^-1*f1, <identity ...> ],
  [ f2*f2^-1, <identity ...> ], [ f2^-1*f2, <identity ...> ] ]
gap> DisplayRwsRules( rws1 );;
[ [ Aa, id ], [ aA, id ], [ Bb, id ], [ bB, id ] ]
gap> genG1 := GeneratorsOfGroup( G1 );;
gap> H1 := Subgroup( G1, [ genG1[1]^6 ] );;
gap> K1 := Subgroup( G1, [ genG1[1]^4 ] );;
gap> dcrws1 := DoubleCosetRewritingSystem( G1, H1, K1, rws1 );;
gap> IsDoubleCosetRewritingSystem( dcrws1 );
true
gap> DisplayRwsRules( dcrws1 );;
G-rules:
[ [ Aa, id ], [ aA, id ], [ Bb, id ], [ bB, id ] ]
H-rules:
[ [ HAAA, Haaa ],
  [ Haaaa, HAA ] ]
K-rules:
[ [ AAK, aaK ],
  [ aaaK, AK ] ]
H-K-rules:
[ [ HAK, HaK ],
  [ HaaK, HK ] ]
]]>
</Example> 

An example of obtaining the reduced form of a word using this rewriting system 
is given in the following section. 

<ManSection>
   <Oper Name="DisplayAsString"
         Arg="word, alph" />
<Description>
This operation displays a double coset using letters of the alphabet obtained 
by concatenating <Code>"HK"</Code> with the alphabet for the monoid obtained above. 
In the example a double coset <Code>w</Code> and its reduced form 
<Code>rw</Code> are displayed. 
</Description>
</ManSection>
<P/>
<Example>
<![CDATA[
gap> free := FreeMonoidOfRewritingSystem( dcrws1 );;
gap> mon := MonoidOfRewritingSystem( dcrws1 );; 
gap> gens := GeneratorsOfMonoid( free );; 
gap> H := gens[1];;  K := gens[2];; 
gap> A := gens[3];;  a := gens[4];; 
gap> B := gens[5];;  b := gens[6];;
gap> alph2 := Concatenation( "HK", alph1 ); 
"HKAaBb"
gap> w := H*a^5*b^3*a^5*K;
m1*m4^5*m6^3*m4^5*m2
gap> DisplayAsString( w, alph2 ); 
HaaaaabbbaaaaaK
gap> rw := ReducedForm( dcrws1, w );
m1*m3*m6^3*m4*m2
gap> DisplayAsString( rw, alph2 ); 
HAbbbaK
]]>
</Example>

<ManSection>
   <Attr Name="WordAcceptorOfReducedRws"
         Arg="rws" />
   <Attr Name="WordAcceptorOfDoubleCosetRws"
         Arg="rws" />
   <Prop Name="IsWordAcceptorOfDoubleCosetRws"
         Arg="aut" />
<Description>
Using functions from the &Automata; package, we may 
<List>
<Item>
compute a <E>word acceptor</E> for the rewriting system of <M>G</M>;
</Item>
<Item>
compute a <E>word acceptor</E> for the double coset rewriting system;
</Item>
<Item>
test a list of words to see whether they are recognised by the automaton;
</Item>
<Item>
obtain a rational expression for the language of the automaton. 
</Item>
</List>
</Description>
</ManSection>
<P/>
<Example>
<![CDATA[
gap> waG1 := WordAcceptorOfReducedRws( rws1 );
Automaton("det",6,"aAbB",[ [ 1, 4, 1, 4, 4, 4 ], [ 1, 3, 3, 1, 3, 3 ], [ 1, 2,\
 2, 2, 1, 2 ], [ 1, 1, 5, 5, 5, 5 ] ],[ 6 ],[ 2, 3, 4, 5, 6 ]);;
gap> wadc1 := WordAcceptorOfDoubleCosetRws( dcrws1 );
< deterministic automaton on 6 letters with 15 states >
gap> Print( wadc1 );
Automaton("det",15,"HKaAbB",[ [ 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ],\
 [ 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2 ], [ 2, 2, 13, 2, 10, 5, 2, 13,\
 2, 7, 11, 11, 12, 2, 2 ], [ 2, 2, 9, 2, 2, 14, 2, 9, 15, 2, 2, 2, 2, 7, 15 ],\
 [ 2, 2, 2, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ], [ 2, 2, 3, 2, 3, 3, 3, 2, 3,\
 3, 3, 3, 3, 3, 3 ] ],[ 4 ],[ 1 ]);;
gap> words1 := [ "HK","HaK","HbK","HAK","HaaK","HbbK","HabK","HbaK","HbaabK"];;
gap> valid1 := List( words1, w -> IsRecognizedByAutomaton( wadc1, w ) );
[ true, true, true, false, false, true, true, true, true ]
gap> lang1 := FAtoRatExp( wadc1 );
((H(aaaUAA)BUH(a(aBUB)UABUB))(a(a(aa*BUB)UB)UA(AA*BUB)UB)*(a(a(aa*bUb)Ub)UA(AA\
*bUb))UH(aaaUAA)bUH(a(abUb)UAbUb))((a(a(aa*BUB)UB)UA(AA*BUB))(a(a(aa*BUB)UB)UA\
(AA*BUB)UB)*(a(a(aa*bUb)Ub)UA(AA*bUb))Ua(a(aa*bUb)Ub)UA(AA*bUb)Ub)*((a(a(aa*BU\
B)UB)UA(AA*BUB))(a(a(aa*BUB)UB)UA(AA*BUB)UB)*(a(aKUK)UAKUK)Ua(aKUK)UAKUK)U(H(a\
aaUAA)BUH(a(aBUB)UABUB))(a(a(aa*BUB)UB)UA(AA*BUB)UB)*(a(aKUK)UAKUK)UH(aKUK)
]]>
</Example>
</Section>


<Section><Heading>Example 3 -- the trefoil group</Heading>

<Index>example -- trefoil group</Index>
<Index>trefoil group</Index>
<ManSection>
   <Oper Name="PartialDoubleCosetRewritingSystem"
         Arg="grp, Hgens, Kgens, rws, limit" />
   <Attr Name="WordAcceptorOfPartialDoubleCosetRws"
         Arg="grp, prws" />
<Description>
It may happen that, even when <M>G</M> has a finite rewriting system, 
the double coset rewriting system is infinite.
This is the case with the trefoil group <M>T</M> with generators 
<M>[c,d]</M> and relator <M>[c^3 = d^2]</M> when the wreath product ordering 
is used with <M>C > c > D > d</M>. 
The group itself has a rewriting system with just 6 rules. 
</Description>
</ManSection>
<Example>
<![CDATA[
gap> FT := FreeGroup( 2 );;
gap> relsT := [ FT.1^3*FT.2^-2 ];;
gap> T := FT/relsT;;
gap> genT := GeneratorsOfGroup( T );;
gap> U := Subgroup( T, [ genT[1] ] );;  
gap> V := Subgroup( T, [ genT[2] ] );;
gap> alphT := "cCdD";;
gap> ordT := [3,4,1,2];;
gap> orderT := "wreath";;
gap> rwsT := ReducedConfluentRewritingSystem( T, ordT, orderT, 0, alphT );;
gap> DisplayRwsRules( rwsT );;
[ [ C, ccDD ], [ dD, id ], [ Dc, dcDD ], [ Dd, id ], [ ccc, dd ], [ \
ddc, cdd ]\
 ]
gap> accT := WordAcceptorOfReducedRws( rwsT );
< deterministic automaton on 4 letters with 7 states >
gap> Print( "accT = ", accT );
accT = Automaton("det",7,"dDcC",[ [ 6, 2, 2, 4, 6, 4, 6 ], [ 3, 2, 3, 2, 3, 2,\
 3 ], [ 7, 2, 2, 2, 2, 7, 5 ], [ 2, 2, 2, 2, 2, 2, 2 ] ],[ 1 ],[ 1, 3, 4, 5, 6\
, 7 ]);;
gap> langT := FAtoRatExp( accT );
(dcUc)((cdUd)c)*((cdUd)(dd*U@)Uc(DD*U@)UDD*U@)Ud(dd*U@)UDD*U@
]]>
</Example>

In the following example we reduce the word <M>w = d^5c^5</M> 
to <M>dc^2d^6</M> and check that only the latter is recognised 
by the automaton <C>accT</C>. 
<P/>
<Example>
<![CDATA[
gap> free := FreeMonoidOfRewritingSystem( rwsT );;
gap> gens := GeneratorsOfMonoid( free );; 
gap> c := gens[1];;  C := gens[2];;  d := gens[3];;  D := gens[4];;
gap> w := d^5*c^5; 
f2^5*f1^5
gap> sw := WordToString( w, alphT ); 
"dddddccccc"
gap> IsRecognizedByAutomaton( accT, sw ); 
false
gap> rw := ReducedForm( rwsT, w );
f2*f1^2*f2^6
gap> srw := WordToString( rw, alphT ); 
"dccdddddd"
gap> IsRecognizedByAutomaton( accT, srw );
true
]]>
</Example>

In earlier versions of &kan;, from about 1.01 up to 1.21, 
the complementary automaton and language were returned in the example above. 
This error has now been rectified. 
<P/>
In even earlier versions of &kan; (in 0.95 for example) a shorter rational 
expression for the language was obtained from &Automata;. 
In what follows, we check that the two expressions define the same language

<Example>
<![CDATA[
gap> alph := AlphabetOfRatExpAsList( langT );; 
gap> a1 := RatExpOnnLetters( alph, [ ], [1] );;   ## y
gap> a2 := RatExpOnnLetters( alph, [ ], [2] );;   ## Y
gap> a3 := RatExpOnnLetters( alph, [ ], [3] );;   ## x
gap> a4 := RatExpOnnLetters( alph, [ ], [4] );;   ## X
gap> s1 := RatExpOnnLetters( alph, "star", a1 );; ## y*
gap> s2 := RatExpOnnLetters( alph, "star", a2 );; ## Y*
gap> a1a3 := RatExpOnnLetters( alph, "product", [ a1, a3 ] );;  ## yx 
gap> u1 := RatExpOnnLetters( alph, "union", [ a1a3, a3 ] );;    ## yxUx
gap> a3a1 := RatExpOnnLetters( alph, "product", [ a3, a1 ] );;  ## xy
gap> u2 := RatExpOnnLetters( alph, "union", [ a3a1, a1 ] );;    ## xyUy
gap> u2a3 := RatExpOnnLetters( alph, "product", [ u2, a3 ] );;  ## (xyUy)x
gap> su2a3 := RatExpOnnLetters( alph, "star", u2a3 );;          ## ((xyUy)x)*
gap> u2s1 := RatExpOnnLetters( alph, "product", [ u2, s1 ] );;  ## (xyUy)y*
gap> a3s2 := RatExpOnnLetters( alph, "product", [ a3, s2 ] );;  ## xY*
gap> u3 := RatExpOnnLetters( alph, "union", [u2s1,a3s2,s2] );; 
gap> prod := RatExpOnnLetters( alph, "product", [u1,su2a3,u3] );;  
gap> a1s1 := RatExpOnnLetters( alph, "product", [ a1, s1 ] );;  ## yy*
gap> r := RatExpOnnLetters( alph, "union", [ prod, a1s1, s2] );
(yxUx)((xyUy)x)*((xyUy)y*UxY*UY*)Uyy*UY*
gap> AreEqualLang( langT, r ); 
true
]]>
</Example>

If we now take subgroups <M>H=\langle c \rangle</M> 
and <M>K = \langle d \rangle</M> we find that 
the double coset rewriting system has an infinite number of <M>H</M>-rules.
It turns out that only a finite number of these are needed to produce
the required automaton.
The function <C>PartialDoubleCosetRewritingSystem</C> allows a limit to be 
specified on the number of rules to be computed. 
In the listing below a limit of 20 is used, but in fact 10 is sufficient.
<Example>
<![CDATA[
gap> prwsT := PartialDoubleCosetRewritingSystem( T, U, V, rwsT, 20 );;
#I WARNING: reached supplied limit 20 on number of rules
gap> DisplayRwsRules( prwsT );
G-rules:
[ [ C, ccDD ], [ dD, id ], [ Dc, dcDD ], [ Dd, id ], [ ccc, dd ], [ ddc, cdd ]\
 ]
H-rules:
[ [ Hc, H ],
  [ HD, Hd ],
  [ Hdd, H ],
  [ Hdcdd, Hdc ],
  [ HdcD, Hdcd ],
  [ Hdcdcdd, Hdcdc ],
  [ Hdccdd, Hdcc ],
  [ HdccD, Hdccd ],
  [ HdcdcD, Hdcdcd ],
  [ Hdcdcdcdd, Hdcdcdc ],
  [ Hdcdccdd, Hdcdcc ],
  [ Hdccdcdd, Hdccdc ],
  [ HdccdcDD, Hdccdc ] ]
K-rules:
[ [ dK, K ],
  [ DK, K ] ]
]]>
</Example>

This list of partial rules is then used to produce a modified 
word acceptor function. 
<P/>
We then construct the double coset <M>Hd^5c^5K</M> 
and find its reduced form (compare this with the earlier example). 
<P/>
<Example>
<![CDATA[
gap> paccT := WordAcceptorOfPartialDoubleCosetRws( T, prwsT );;
< deterministic automaton on 6 letters with 6 states >
gap> Print( paccT, "\n" );
Automaton("det",6,"HKyYxX",[ [ 2, 2, 2, 6, 2, 2 ], [ 2, 2, 1, 2, 2, 1 ], [ 2, \
2, 5, 2, 2, 5 ], [ 2, 2, 2, 2, 2, 2 ], [ 2, 2, 6, 2, 3, 2 ], [ 2, 2, 2, 2, 2, \
2 ] ],[ 4 ],[ 1 ]);;
gap> plangT := FAtoRatExp( paccT );
H(yx(yx)*x)*(yx(yx)*KUK)
gap> wordsT := ["HK""HxK""HyK""HYK""HyxK""HyxxK""HyyH""HyxYK"];;
gap> validT := List( wordsT, w -> IsRecognizedByAutomaton( paccT, w ) );
[ true, false, false, false, true, true, false, false ]

gap> pfree := FreeMonoidOfRewritingSystem( prwsT );; 
gap> pgens := GeneratorsOfMonoid( pfree );; 
gap> H := pgens[1];;  K := pgens[2];; 
gap> c := pgens[3];;  C := pgens[4];; 
gap> d := pgens[5];;  D := pgens[6];;
gap> palphT := Concatenation( "HK", alphT ); 
"HKcCdD"
gap> pw := H*d^5*c^5*K;;  DisplayAsString( pw, palphT );
HdddddcccccK
gap> rpw := ReducedForm( prwsT, pw );; 
gap> spw := WordToString( rpw, palphT ); 
"HdccK"
gap> ok := IsRecognizedByAutomaton( paccT, spw ); 
true
]]>
</Example>
</Section>



<Section><Heading>Example 4 -- an infinite rewriting system</Heading>

<Index>example -- infinite rws</Index>
<ManSection>
   <Attr Name="KBMagRewritingSystem"
         Arg="fpgrp" />
   <Attr Name="KBMagWordAcceptor"
         Arg="fpgrp" />
   <Oper Name="KBMagFSAtoAutomataDFA"
         Arg="fsa, alph" />
   <Oper Name="WordAcceptorByKBMag"
         Arg="grp, alph" />
   <Oper Name="WordAcceptorByKBMagOfDoubleCosetRws"
         Arg="grp, dcrws" />
<Description>
When the group <M>G</M> has an infinite rewriting system, 
the double coset rewriting system will also be infinite.
In this case we may use the function <C>KBMagWordAcceptor</C> 
which calls <Package>KBMag</Package> 
to compute a word acceptor for <M>G</M>,
and <C>KBMagFSAtoAutomataDFA</C> to convert this to a deterministic automaton 
as used by the &Automata; package.
The resulting <C>dfa</C> forms part of the double coset automaton, 
together with sufficient <M>H</M>-rules, <M>K</M>-rules 
and <M>H</M>-<M>K</M>-rules found by the function 
<C>PartialDoubleCosetRewritingSystem</C>.
(Note that these five attributes and operations will not be available 
if the <Package>KBMag</Package> package has not been loaded.)
<P/>
In the following example we take a two generator group <M>G4</M> 
with relators <M>[a^3,b^3,(a*b)^3]</M>, 
the normal forms of whose elements are some of the strings with 
<M>a</M> or <M>a^{-1}</M> alternating with <M>b</M> or <M>b^{-1}</M>.
The automatic structure computed by <Package>KBMag</Package> 
has a word acceptor with 17 states.
</Description>
</ManSection>
<Example>
<![CDATA[
gap> F4 := FreeGroup("a","b");;
gap> rels4 := [ F4.1^3, F4.2^3, (F4.1*F4.2)^3 ];;
gap> G4 := F4/rels4;;
gap> alph4 := "AaBb";;
gap> waG4 := WordAcceptorByKBMag( G4, alph4 );;
gap> Print( waG4, "\n");
Automaton("det",18,"aAbB",[ [ 2, 18, 18, 8, 10, 12, 13, 18, 18, 18, 18, 18, 18\
, 8, 17, 12, 18, 18 ], [ 3, 18, 18, 9, 11, 9, 12, 18, 18, 18, 18, 18, 18, 11, \
18, 11, 18, 18 ], [ 4, 6, 6, 18, 18, 18, 18, 18, 6, 12, 16, 18, 12, 18, 18, 18\
, 12, 18 ], [ 5, 5, 7, 18, 18, 18, 18, 14, 15, 5, 18, 18, 7, 18, 18, 18, 15, 1\
8 ] ],[ 1 ],[ 1 .. 17 ]);;
gap> langG4 := FAtoRatExp( waG4 );
((abUAb)AUbA)(bA)*(b(aU@)UB(aB)*(a(bU@)U@)U@)U(abUAb)(aU@)U((aBUB)(aB)*AUba(Ba\
)*BA)(bA)*(b(aU@)U@)U(aBUB)(aB)*(a(bU@)U@)Uba(Ba)*(BU@)UbUaUA(B(aB)*(a(bU@)UAU\
@)U@)U@
gap> IsRecognizedByAutomaton( waG4, "Aba" );
true
gap> IsRecognizedByAutomaton( waG4, "AbaB" );
false
]]>
</Example>

<ManSection>
   <Oper Name="DCrules"
         Arg="dcrws" />
   <Attr Name="Hrules"
         Arg="dcrws" />
   <Attr Name="Krules"
         Arg="dcrws" />
   <Attr Name="HKrules"
         Arg="dcrws" />
<Description>
We now take <M>H</M> to be generated by <M>ab</M> and <M>K</M> 
to be generated by <M>ba</M>.  
If we specify a limits of 50, 75, 100, 200 
for the number of rules in a partial double coset rewrite system, 
we obtain lists of  <M>H</M>-rules, <M>K</M>-rules 
and <M>H</M>-<M>K</M>-rules of increasing length.
The numbers of states in the resulting automata also increase. 
We may deduce by hand (but not computationally -- see <Cite Key="BrGhHeWe" />) 
three infinite sets of rules and a limit for the automata.
</Description>
</ManSection>
<Example>
<![CDATA[
gap> lim := 100;;
gap> genG4 := GeneratorsOfGroup( G4 );;
gap> a := genG4[1];;  b := genG4[2];; 
gap> H4 := Subgroup( G4, [ a*b ] );;  
gap> K4 := Subgroup( G4, [ b*a ] );;
gap> rwsG4 := KnuthBendixRewritingSystem( G4, "shortlex", [2,1,4,3], alph4 );;
gap> dcrws4 := PartialDoubleCosetRewritingSystem( G4, H4, K4, rwsG4, limit );;
#I using PartialDoubleCosetRewritingSystem with limit 100
#I  51 rules, and 1039 pairs
#I WARNING: reached supplied limit 100 on number of rules
gap> Print( Length( Rules( dcrws4 ) ), " rules found.\n" );
101 rules found.
gap> dcaut4 := WordAcceptorByKBMagOfDoubleCosetRws( G4, dcrws4 );;
gap> Print( "Double Coset Minimalized automaton:\n", dcaut4 );
Double Coset Minimalized automaton:
Automaton("det",44,"HKaAbB",[ [ 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2\
, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2\
, 2, 2 ], [ 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, \
2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1 ], [ 2, 2, 2,\
 2, 3, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, 2, 43, 2, 27, 2, 2, 2\
, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], [ 2, 2, 2, 2, 44, 3, 29, 2\
, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 2, 2, 2, 26, 2, 29, 2\
, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, 41, 2, 2 ], [ 2, 2, 2, 2, 21, 2, 2, 28, 2\
, 9, 2, 11, 2, 13, 2, 15, 2, 17, 2, 19, 2, 42, 2, 3, 2, 28, 3, 2, 7, 2, 30, 2,\
 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 2, 28 ], [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2\
, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 25, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2,\
 2, 2, 2, 2, 2, 2, 23, 6 ] ],[ 4 ],[ 1 ]);;
gap> dclang4 := FAtoRatExp( dcaut4 );;
gap> Print( "Double Coset language of acceptor:\n", dclang4, "\n" );
Double Coset language of acceptor:
(HbAbAbAbAbAbAbAbUHAb)(Ab)*(A(Ba(Ba)*bKUK)UK)UHbAbA(bA(bA(bA(bA(bAKUK)UK)UK)UK\
)UK)UH(A(B(aB)*(abUA)KUK)UaKUb(a(Ba)*BA(bA(bA(bA(bA(bA(bA(bA(bA)*(bKUK)UK)UK)U\
K)UK)UK)UK)UK)UAK)UK)
gap> ok := DCrules(dcrws4);;
gap> alph4e := dcrws4!.alphabet;;
gap> Print("H-rules:\n");  DisplayAsString( Hrules(dcrws4), alph4e, true );
H-rules:
[ HB, Ha ]
[ HaB, Hb ]
[ Hab, H ]
[ HbAB, HAba ]
[ HbAbAB, HAbAba ]
[ HbAbAbAB, HAbAbAba ]
[ HbAbAbAbAB, HAbAbAbAba ]
[ HbAbAbAbAbAB, HAbAbAbAbAba ]
[ HbAbAbAbAbAbAB, HAbAbAbAbAbAba ]
[ HbAbAbAbAbAbAbAB, HAbAbAbAbAbAbAba ]
gap> Print("K-rules:\n");  DisplayAsString( Krules(dcrws4), alph4e, true );;
K-rules:
[ BK, aK ]
[ BaK, bK ]
[ baK, K ]
[ BAbK, abAK ]
[ BAbAbK, abAbAK ]
[ BAbAbAbK, abAbAbAK ]
[ BAbAbAbAbK, abAbAbAbAK ]
[ BAbAbAbAbAbK, abAbAbAbAbAK ]
[ BAbAbAbAbAbAbK, abAbAbAbAbAbAK ]
[ BAbAbAbAbAbAbAbK, abAbAbAbAbAbAbAK ]
gap> Print("HK-rules:\n");  DisplayAsString( HKrules(dcrws4), alph4e, true );;
HK-rules:
[ HbK, HAK ]
[ HbAbK, HAbAK ]
[ HbAbAbK, HAbAbAK ]
[ HbAbAbAbK, HAbAbAbAK ]
[ HbAbAbAbAbK, HAbAbAbAbAK ]
[ HbAbAbAbAbAbK, HAbAbAbAbAbAK ]
[ HbAbAbAbAbAbAbK, HAbAbAbAbAbAbAK ]
]]>
</Example>

<ManSection>
   <Oper Name="WordToString"
         Arg="word, alph" />
   <Oper Name="IdentityDoubleCoset"
         Arg="dcrws" />
<Description>
The <C>NextWord</C> operation (see <Ref Subsect="nextwords"/>) 
may be used to find normal forms of increasing length 
for double coset representatives. 
In the example below a limit of <M>50,000</M> (for the number of words tested) 
is specified since the <M>29</M> numbers of words tested can be shown to be: 
<Display
\begin{array}{c}
[\ 1,\ 1,\ 6,\ 9,\ 12,\ 4,\ 91,\ 12,\ 153,\ 12,\ 192,\ 52,\ 1435,\ 192,\ 12,\ 2457,\ 192,\\ 
12,\ 3072,\ 820,\ 22939,\ 3072,\ 19,\ 12,\ 39321,\ 3072,\ 192,\ 12,\ 49152\ ]
\end{array} 
</Display>
</Description>
</ManSection>
<Example>
<![CDATA[
gap> idc := IdentityDoubleCoset( dcrws4 );
m1*m2
gap> ## List of the next 29 normal forms for double cosets: 
gap> L4 := NextWords( dcrws4, idc, 29, 50000 );;
gap> DisplayAsString( L4, alph4e, true );
[ HAK, HaK, HAbK, HbAK, HABAK, HAbAK, HABabK, HAbAbK, HbAbAK, HbaBAK, HABaBAK,\
 HAbAbAK, HABaBabK, HAbABabK, HAbAbAbK, HbAbAbAK, HbaBAbAK, HbaBaBAK, HABaBaBA\
K, HAbAbAbAK, HABaBaBabK, HAbABaBabK, HAbAbABabK, HAbAbAbAbK, HbAbAbAbAK, HbaB\
AbAbAK, HbaBaBAbAK, HbaBaBaBAK, HABaBaBaBAK ]
gap> w := NextWord( dcrws4, L4[29] );;
gap> Print( w, "\n" );
m1*(m3*m6)^4*m3*m2
gap> s := WordToString( w, alph4e );;
gap> Print( s, "\n" );
HAbAbAbAbAK
]]>
</Example>
</Section>
</Chapter>

94%


¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge