Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346% This file was created automatically from autom.msk.1% DO NOT EDIT!2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3\Chapter{Noninitial automata}45In this chapter we present the functionality applicable to noninitial automata.67%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8\Section{Definition}910\>MealyAutomaton( <table>[, <names>[, <alphabet>]] ) O11\>MealyAutomaton( <string> ) O12\>MealyAutomaton( <autom> ) O13\>MealyAutomaton( <tree_hom_list> ) O14\>MealyAutomaton( <list>, <name_func> ) O15\>MealyAutomaton( <list>, <true> ) O1617Creates the Mealy automaton (see "Short math background") defined by the argument <table>, <string>18or <autom>. Format of the argument <table> is19the following: it is a list of states, where each state is a list of20positive integers which represent transition function at the given state and a21permutation or transformation which represent the output function at this22state. Format of the string <string> is the same as in `AutomatonGroup' (see~"AutomatonGroup").23The third form of this operation takes a tree homomorphism <autom> as its argument.24It returns noninitial automaton constructed from the sections of <autom>, whose first state25corresponds to <autom> itself. The fourth form creates a noninitial automaton constructed26of the states of all tree homomorphisms from the <tree_hom_list>.2728\beginexample29gap> A := MealyAutomaton([[1,2,(1,2)],[3,1,()],[3,3,(1,2)]], ["a","b","c"]);30<automaton>31gap> Display(A);32a = (a, b)(1,2), b = (c, a), c = (c, c)(1,2)33gap> B:=MealyAutomaton([[1,2,Transformation([1,1])],[3,1,()],[3,3,(1,2)]],["a","b","c"]);34<automaton>35gap> Display(B);36a = (a, b)[ 1, 1 ], b = (c, a), c = (c, c)[ 2, 1 ]37gap> D := MealyAutomaton("a=(a,b)(1,2), b=(b,a)");38<automaton>39gap> Display(D);40a = (a, b)(1,2), b = (b, a)41gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );42< u, v >43gap> M := MealyAutomaton(u*v*u^-3);44<automaton>45gap> Display(M);46a1 = (a2, a5), a2 = (a3, a4), a3 = (a4, a2)(1,2), a4 = (a4, a4), a5 = (a6, a3)47(1,2), a6 = (a7, a4), a7 = (a6, a4)(1,2)48\endexample4950If <list> consists of tree homomorphisms, it creates a noninitial automaton51constructed of their states. If <name_func> is a function then it is used52to name the states of the newly constructed automaton. If it is <true>53then states of automata from the <list> are used. If it <false> then new54states are named a_1, a_2, etc.5556\beginexample57gap> G := AutomatonGroup("a=(b,a),b=(b,a)(1,2)");58< a, b >59gap> MealyAutomaton([a*b]);; Display(last);60a1 = (a2, a4)(1,2), a2 = (a3, a1), a3 = (a3, a1)(1,2), a4 = (a2, a4)61gap> MealyAutomaton([a*b], true);; Display(last);62<a*b> = (<b^2>, <a^2>)(1,2), <b^2> = (<b*a>, <a*b>), <b*a> = (<b*a>, <a*b>)(1,2), <a^2> = (<b^2>, <a^2>)63gap> MealyAutomaton([a*b], String);; Display(last);64a*b = (b^2, a^2)(1,2), b^2 = (b*a, a*b), b*a = (b*a, a*b)(1,2), a^2 = (b^2, a^2)65\endexample6667\>IsMealyAutomaton( <A> ) C6869A category of non-initial finite Mealy automata with the same input and70output alphabet.717273\>NumberOfStates( <A> ) A7475Returns the number of states of the automaton <A>.76777879\>SizeOfAlphabet( <A> ) A8081Returns the number of letters in the alphabet the automaton <A> acts on.82838485\>`AutomatonList( <A> )'{AutomatonList}!{[automaton]} A8687Returns the list of <A> acceptable by `MealyAutomaton' (see "MealyAutomaton")888990919293%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%94\Section{Tools}9596\>IsTrivial( <A> ) P9798Computes whether the automaton <A> is equivalent to the trivial automaton.99\beginexample100gap> A := MealyAutomaton("a=(c,c), b=(a,b), c=(b,a)");101<automaton>102gap> IsTrivial(A);103true104\endexample105106107\>IsInvertible( <A> ) P108109Is `true' if <A> is invertible and `false' otherwise.110111112\>MinimizationOfAutomaton( <A> ) F113114Returns the automaton obtained from automaton <A> by minimization. The115implementation of this function was significantly optimized by Andrey Russev116starting from Version 1.3.117\beginexample118gap> B := MealyAutomaton("a=(1,a)(1,2), b=(1,a)(1,2), c=(a,b), d=(a,b)");119<automaton>120gap> C := MinimizationOfAutomaton(B);121<automaton>122gap> Display(C);123a = (1, a)(1,2), c = (a, a), 1 = (1, 1)124\endexample125126127\>MinimizationOfAutomatonTrack( <A> ) F128129Returns the list `[A_new, new_via_old, old_via_new]', where `A_new' is an130automaton obtained from automaton <A> by minimization,131`new_via_old' describes how new states are expressed in terms of the old ones, and132`old_via_new' describes how old states are expressed in terms of the new ones.133The implementation of this function was significantly optimized by Andrey Russev134starting from Version 1.3.135\beginexample136gap> B := MealyAutomaton("a=(1,a)(1,2), b=(1,a)(1,2), c=(a,b), d=(a,b)");137<automaton>138gap> B_min := MinimizationOfAutomatonTrack(B);139[ <automaton>, [ 1, 3, 5 ], [ 1, 1, 2, 2, 3 ] ]140gap> Display(B_min[1]);141a = (1, a)(1,2), c = (a, a), 1 = (1, 1)142\endexample143144145\>IsOfPolynomialGrowth( <A> ) P146147Determines whether the automaton <A> has polynomial growth in terms of Sidki~\cite{Sid00}.148149See also `IsBounded' ("IsBounded") and150`PolynomialDegreeOfGrowth' ("PolynomialDegreeOfGrowth").151\beginexample152gap> B := MealyAutomaton("a=(b,1)(1,2), b=(a,1)");153<automaton>154gap> IsOfPolynomialGrowth(B);155true156gap> D := MealyAutomaton("a=(a,b)(1,2), b=(b,a)");157<automaton>158gap> IsOfPolynomialGrowth(D);159false160\endexample161162163\>IsBounded( <A> ) P164165Determines whether the automaton <A> is bounded in terms of Sidki~\cite{Sid00}.166167See also `IsOfPolynomialGrowth' ("IsOfPolynomialGrowth")168and `PolynomialDegreeOfGrowth' ("PolynomialDegreeOfGrowth").169\beginexample170gap> B := MealyAutomaton("a=(b,1)(1,2), b=(a,1)");171<automaton>172gap> IsBounded(B);173true174gap> C := MealyAutomaton("a=(a,b)(1,2), b=(b,c), c=(c,1)(1,2)");175<automaton>176gap> IsBounded(C);177false178\endexample179180181\>PolynomialDegreeOfGrowth( <A> ) A182183For an automaton <A> of polynomial growth in terms of Sidki~\cite{Sid00}184determines its degree of185polynomial growth. This degree is 0 if and only if automaton is bounded.186If the growth of automaton is exponential returns `fail'.187188See also `IsOfPolynomialGrowth' ("IsOfPolynomialGrowth")189and `IsBounded' ("IsBounded").190\beginexample191gap> B := MealyAutomaton("a=(b,1)(1,2), b=(a,1)");192<automaton>193gap> PolynomialDegreeOfGrowth(B);1940195gap> C := MealyAutomaton("a=(a,b)(1,2), b=(b,c), c=(c,1)(1,2)");196<automaton>197gap> PolynomialDegreeOfGrowth(C);1982199\endexample200201202\>AdjacencyMatrix( <A> ) A203204Returns the adjacency matrix of a Mealy automaton <A>, in which the $ij$-th entry205contains the number of arrows in the Moore diagram of <A> from state $i$ to state $j$.206207\beginexample208gap> A:=MealyAutomaton("a=(a,a,b)(1,2,3),b=(a,c,b)(1,2),c=(a,a,a)");209<automaton>210gap> AdjacencyMatrix(A);211[ [ 2, 1, 0 ], [ 1, 1, 1 ], [ 3, 0, 0 ] ]212\endexample213214215\>IsAcyclic( <A> ) P216217Computes whether or not an automaton <A> is acyclic in the sense of Sidki~\cite{Sid00}.218I.e. returns `true' if the Moore diagram of <A> does not contain cycles with two or more219states and `false' otherwise.220\beginexample221gap> A := MealyAutomaton("a=(a,a,b)(1,2,3),b=(c,c,b)(1,2),c=(d,c,1),d=(d,1,d)");222<automaton>223gap> IsAcyclic(A);224true225gap> A := MealyAutomaton("a=(a,a,b)(1,2,3),b=(c,c,d)(1,2),c=(d,c,1),d=(b,1,d)");226<automaton>227gap> IsAcyclic(A);228false229\endexample230231232\>DualAutomaton( <A> ) O233234Returns the automaton dual of <A>.235\beginexample236gap> A := MealyAutomaton("a=(b,a)(1,2), b=(b,a)");237<automaton>238gap> D := DualAutomaton(A);239<automaton>240gap> Display(D);241d1 = (d2, d1)[ 2, 2 ], d2 = (d1, d2)[ 1, 1 ]242\endexample243244245\>InverseAutomaton( <A> ) O246247Returns the automaton inverse to <A> if <A> is invertible.248\beginexample249gap> A := MealyAutomaton("a=(b,a)(1,2), b=(b,a)");250<automaton>251gap> B := InverseAutomaton(A);252<automaton>253gap> Display(B);254a1 = (a1, a2)(1,2), a2 = (a2, a1)255\endexample256257258\>IsBireversible( <A> ) P259260Computes whether or not the automaton <A> is bireversible, i.e. <A>, the dual of <A> and261the dual of the inverse of <A> are invertible. The example below shows that the262Bellaterra automaton is bireversible.263\beginexample264gap> Bellaterra := MealyAutomaton("a=(c,c)(1,2), b=(a,b), c=(b,a)");265<automaton>266gap> IsBireversible(Bellaterra);267true268\endexample269270271\>IsReversible( <A> ) P272273Computes whether or not the automaton <A> is reversible, i.e. the dual of <A>274is invertible.275276277\>IsIRAutomaton( <A> ) P278279Computes whether or not the automaton <A> is an IR-automaton, i.e. <A> and its dual are invertible.280The example below shows that the automaton generating lamplighter group is an IR-automaton.281\beginexample282gap> L := MealyAutomaton("a=(b,a)(1,2), b=(a,b)");283<automaton>284gap> IsIRAutomaton(L);285true286\endexample287288289The next three commands deal with the, so-called, MD-reduction procedure developed290in~\cite{AKL}. Particularly, according291to~\cite{KLI}, a 2-letter or 2-state invertible reversible automaton292generates a finite group if and only if the MD-reduction procedure terminates with the293trivial automaton. In this case an automaton is called MD-trivial.294295\>MDReduction( <A> ) O296297Performs the process of MD-reduction of automaton <A> (alternating298applications of minimization and dualization procedures) until a pair of299minimal automata dual to each other is reached. Returns this pair. The main300point of this procedure is in the fact that the (semi)group generated by the301original automaton is finite if and only each of the (semi)groups generated302by the output automata is finite.303\beginexample304gap> A:=MealyAutomaton("a=(d,d,d,d)(1,2)(3,4),b=(b,b,b,b)(1,4)(2,3),\\305> c=(a,c,a,c), d=(c,a,c,a)");306<automaton>307gap> NumberOfStates(MinimizationOfAutomaton(A));3084309gap> MDR:=MDReduction(A);310[ <automaton>, <automaton> ]311gap> Display(MDR[1]);312d1 = (d2, d2, d1, d1)(1,4,3), d2 = (d1, d1, d2, d2)(1,4)313gap> Display(MDR[2]);314d1 = (d4, d4)(1,2), d2 = (d2, d2)(1,2), d3 = (d1, d3), d4 = (d3, d1)315\endexample316317\>IsMDTrivial( <A> ) P318319Returns `true' if <A> is MD-trivial (i.e. if MD-reduction proedure returns the320trivial automaton) and `false' otherwise.321322\>IsMDReduced( <A> ) P323324Returns `true' if <A> is MD-reduced and `false' otherwise.325326\>DisjointUnion( <A>, <B> ) O327328Constructs the disjoint union of automata <A> and <B>329\beginexample330gap> A := MealyAutomaton("a=(a,b)(1,2), b=(a,b)");331<automaton>332gap> B := MealyAutomaton("c=(d,c), d=(c,e)(1,2), e=(e,d)");333<automaton>334gap> Display(DisjointUnion(A, B));335a1 = (a1, a2)(1,2), a2 = (a1, a2), a3 = (a4, a3), a4 = (a3, a5)336(1,2), a5 = (a5, a4)337\endexample338339340\>`<A> \* <B>'{product}!{for noninitial automata}341342Constructs the product of 2 noninitial automata <A> and <B>.343\beginexample344gap> A := MealyAutomaton("a=(a,b)(1,2), b=(a,b)");345<automaton>346gap> B := MealyAutomaton("c=(d,c), d=(c,e)(1,2), e=(e,d)");347<automaton>348gap> Print(A*B);349a1 = (a1, a5)(1,2), a2 = (a3, a4), a3 = (a2, a6)350(1,2), a4 = (a2, a4), a5 = (a1, a6)(1,2), a6 = (a3, a5)351\endexample352353\>SubautomatonWithStates( <A>, <states> ) O354355Returns the minimal subautomaton of the automaton <A> containing states <states>.356\beginexample357gap> A := MealyAutomaton("a=(e,d)(1,2),b=(c,c),c=(b,c)(1,2),d=(a,e)(1,2),e=(e,d)");358<automaton>359gap> Display(SubautomatonWithStates(A, [1, 4]));360a = (e, d)(1,2), d = (a, e)(1,2), e = (e, d)361\endexample362363364\>AutomatonNucleus( <A> ) O365366Returns the nucleus of the automaton <A>, i.e. the minimal subautomaton367containing all cycles in <A>.368\beginexample369gap> A := MealyAutomaton("a=(b,c)(1,2),b=(d,d),c=(d,b)(1,2),d=(d,b)(1,2),e=(a,d)");370<automaton>371gap> Display(AutomatonNucleus(A));372b = (d, d), d = (d, b)(1,2)373\endexample374375376\>AreEquivalentAutomata( <A>, <B> ) O377378Returns `true' if for every state `s' of the automaton <A> there is a state of the automaton <B>379equivalent to `s' and vice versa.380\beginexample381gap> A := MealyAutomaton("a=(b,a)(1,2), b=(a,c), c=(b,c)(1,2)");382<automaton>383gap> B := MealyAutomaton("b=(a,c), c=(b,c)(1,2), a=(b,a)(1,2), d=(b,c)(1,2)");384<automaton>385gap> AreEquivalentAutomata(A, B);386true387\endexample388389390391392393%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%394395396