********************************
*********** Automata ***********
To give an automaton to GAP use the function Automaton

gap> Automaton("det",3,2,[ [ 0, 3, 0 ], [ 2, 3, 0 ] ],[ 3 ],[ 1, 3 ]);;

A random function is also available

gap> x := RandomAutomaton("det",3,2);;Display(x);
   |  1  2  3
--------------
 a |     3
 b |  2  3
Initial state:    [ 3 ]
Accepting states: [ 1, 3 ]

Now using Print and String you obtain

gap> Print(String(x));
Automaton("det",3,"ab",[ [ 0, 3, 0 ], [ 2, 3, 0 ] ],[ 3 ],[ 1, 3 ]);;

and through the use of copy/paste and some small changes it is easy to give your favourite automaton to GAP.

********************************************
*********** Rational Expressions ***********
To give a rational expression to GAP use the function RationalExpression

gap> RationalExpression("aUba*","ab");
aUba*
