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: 4183461[1X6 [33X[0;0YFinite regular languages[133X[101X23[33X[0;0YThis chapter describes some functions to deal with finite regular languages.[133X456[1X6.1 [33X[0;0YDealing with finite regular languages[133X[101X78[1X6.1-1 IsFiniteRegularLanguage[101X910[29X[2XIsFiniteRegularLanguage[102X( [3XL[103X ) [32X function1112[33X[0;0Y[3XL[103X is an automaton or a rational expression. This function tests whether its13argument represents a finite language or not.[133X1415[4X[32X Example [32X[104X16[4X[25Xgap>[125X [27XRandomRatExp(2);[127X[104X17[4X[28Xb*(aU@)[128X[104X18[4X[25Xgap>[125X [27XIsFiniteRegularLanguage(last);[127X[104X19[4X[28Xfalse[128X[104X20[4X[25Xgap>[125X [27XRandomRatExp(2);[127X[104X21[4X[28XaUbU@[128X[104X22[4X[25Xgap>[125X [27XIsFiniteRegularLanguage(last);[127X[104X23[4X[28Xtrue[128X[104X24[4X[32X[104X2526[1X6.1-2 FiniteRegularLanguageToListOfWords[101X2728[29X[2XFiniteRegularLanguageToListOfWords[102X( [3XL[103X ) [32X function2930[33X[0;0Y[3XL[103X is an automaton or a rational expression. This function outputs the31recognized language as a list of words.[133X3233[4X[32X Example [32X[104X34[4X[25Xgap>[125X [27Xr:=RationalExpression("aaUx(aUb)"); [127X[104X35[4X[28XaaUx(aUb)[128X[104X36[4X[25Xgap>[125X [27X FiniteRegularLanguageToListOfWords(r);[127X[104X37[4X[28X[ "aa", "xa", "xb" ][128X[104X38[4X[32X[104X3940[1X6.1-3 ListOfWordsToAutomaton[101X4142[29X[2XListOfWordsToAutomaton[102X( [3Xalph[103X, [3XL[103X ) [32X function4344[33X[0;0YGiven an alphabet [3Xalph[103X (a list) and a list of words [3XL[103X (a list of lists),45outputs an automaton that recognizes the given list of words.[133X4647[4X[32X Example [32X[104X48[4X[25Xgap>[125X [27XListOfWordsToAutomaton("ab",["aaa","bba",""]);[127X[104X49[4X[28X< deterministic automaton on 2 letters with 6 states >[128X[104X50[4X[25Xgap>[125X [27XFAtoRatExp(last);[127X[104X51[4X[28X(bbUaa)aU@[128X[104X52[4X[32X[104X53545556