algorithmic aspects
play

Algorithmic aspects of finite semigroup and automata theory using - PDF document

Algorithmic aspects of finite semigroup and automata theory using the computer algebra system GAP Manuel Delgado Soria, 20-24/07/2009 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Outline I A short introduction


  1. Algorithmic aspects of finite semigroup and automata theory using the computer algebra system GAP Manuel Delgado Soria, 20-24/07/2009 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Outline I A short introduction to GAP 1 Generalities Basic instructions GAP Functions Semigroups (a crash course) 2 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations Automata (basics) 3 Recognizable languages Rational languages Graphs Σ ∗ -automata Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 2 / 147

  2. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Outline II Example More on automata 4 Non-deterministic automata varia Kleene’s Theorem Applications Computing kernels of monoids 5 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability Numerical Semigroups 6 Motivation PM semigroups A database Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 3 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Outline III References 7 Software references Basic references Not so basic references Specific references Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 4 / 147

  3. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic instructions GAP Functions web pages GAP: http://www.gap-system.org automata: http://www.gap-system.org/Packages/automata.html SgpViz: http://www.gap-system.org/Packages/sgpviz.html numericalsgps: http://www.gap-system.org/Packages/numericalsgps.html “GAP b´ asico para la docencia”: http://www.ugr.es/ pedro/gap/ Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 5 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic instructions GAP Functions Generalities on GAP GAP stands for “Groups, Algorithms and Programming”. GAP is a free and open computer algebra system (you can access the system’s algorithms). It is extensible in the sense that the users can write their own programs and use them the same way as those of the system. GAP is developed internationally, through the cooperation of many people. It appeared in 1986 in Aachen, Germany. In 1997, the coordination center was transferred to St. Andrews in Scotland. Currently, centers in Aachen, Braunschweig, Fort Collins and St. Andrews coordinate together the development of GAP. There are easy ways to make the installation both in Linux and in Windows or Mac. GAP contains also a high level programming language (i.e., it is a language which is close to the language we speak). Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 6 / 147

  4. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic The aspect of a shell where GAP is running: instructions GAP Functions Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 7 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic The last line of working area instructions GAP Functions gap> is ready to receive the instructions. Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 8 / 147

  5. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic instructions GAP Functions Manual The manual of GAP is composed by 5 books: Tutorial, Reference Manual, Programming Tutorial, Programming Reference Manual and New Features for Developers. In the doc folder, there is a sub-folder named htm providing access to the content of the manuals in html format. The complete path is file:///usr/local/lib/gap4r4/doc/htm/index.htm in a Linux standard installation. (In windows it is C: \ gap4r4 \ doc \ htm .) The manuals are also available in other formats, for example in pdf . The complete path in a Linux standard installation for the reference manual is /usr/local/lib/gap4r4/doc/ref/manual.pdf . Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 9 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic instructions GAP Functions Basic instructions To end a GAP session, one has simply to write quit; followed by return , or to press simultaneously the keys ctrl-d . When an error occurs, GAP enters a break loop . This is indicated by brk> The get out of the loop one can proceed as to end a GAP session: to write quit; followed by return , or pushing up the keys ctrl-d at the same time. To make a comment one should use the symbol #. All that is written in same line to the right of this symbol is ignored by GAP. In what follow, we also use this symbol to clarify some details in the examples given. Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 10 / 147

  6. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic instructions Example GAP Functions gap> 5 +34 * 2;(3 +9) * 4; 73 # The priority of the operations... 48 gap> 5(8 +9) Syntax error:; expected 5(8 +9); ^ gap> 5 *(8 +9); 85 gap>(9-7) *(46 +4; Syntax error:) expected (9-7) *(46 +4; ^ gap> # Using the ‘‘ up’’ arrow we can fix it: gap>(9-7) *(46 +4); 100 Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 11 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic In GAP the level of priority of arithmetic operators is as usual. instructions GAP Functions Example gap> 24 * 2-5 ^ 2; 23 gap> 45 = 34 +11 and 45 = 45; true gap> 34 <> 67; true gap> 56 = 56 +1; false Each instruction given should always end with ; (semicolon) then GAP executes the instruction and gives the answer. Two consecutive semicolons ;; following an instruction make GAP to execute the instruction but not to show the answer to the user. Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 12 / 147

  7. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic To save the work developed in a GAP session, one may write the instructions GAP Functions instruction LogTo( ” path / filename ” ); . To stop saving to the file filename should be written in LogTo(); . The file can then be read and edited with a text editor. Example gap> LogTo"example1"; gap> a: = 12; 12 gap> a: = a +3; 15 gap> LogTo; The command InputLogTo works like LogTo , but rather than writing the inputs and output , only writes the inputs . Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 13 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic Usually it is more practical to develop programs in a text editor instructions GAP Functions (where you can save, read later and easily change) and copy them to GAP or read them with the command Read in GAP. To read a file one must specify the path. Example gap> Read "Desktop/Soria_2009/gap/example2.g"; Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 14 / 147

  8. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic instructions GAP Functions GAP Functions A program written in the GAP language is called a function . In GAP there are many pre-defined functions. Example gap> Factorial{23}; 25852016738884976640000 gap> gcd{18,32,8}; 2 gap> s5 := SymmetricGroup(5);; gap> GeneratorsOfGroup(s5); [ (1,2,3,4,5), (1,2) ] gap> IsAbelian(s5); false ... brk> Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 15 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic Functions may be defined in two ways. One is by using the symbol instructions GAP Functions -> , as the example below illustrates. Example gap> triple: = x-> x * 3; function(x) ... end After defining the function, it can be applied to concrete cases many times. For instance, we calculate the triple to 15. Example gap> triple{15}; 45 Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 16 / 147

  9. GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic It is also possible to define functions using the following syntax: instructions GAP Functions functionname :=function( arguments ) instructions end; Example gap> name:=function(n) > Print("My name is ",n,"\n"); > end; function( n ) ... end gap> name("Manuel"); My name is Manuel Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 17 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Generalities Basic The names of the functions which are part of GAP always begin with instructions GAP Functions capitalized letters. Thus, a function whose name begins with a lowercase letter will not have compatibility problems. To complete the editing of functions, (from the GAP or defined by the user) can use to key tab after typing the first letters of the name of the desired function. In GAP, as in other programming languages, there are the following pre-defined: if (if ... then); while (while ... do); repeat (repeat ... until); for (for each object of the list do ...) Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 18 / 147

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend