\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Torvak} \pdfinfo{ /Title (sets-languages-and-automata.pdf) /Creator (Cheatography) /Author (Torvak) /Subject (Sets | Languages \& Automata Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{2FA3A3} \definecolor{LightBackground}{HTML}{F2F9F9} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Sets | Languages \& Automata Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Torvak} via \textcolor{DarkBackground}{\uline{cheatography.com/32041/cs/12709/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Torvak \\ \uline{cheatography.com/torvak} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 16th September, 2017.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{1.16956 cm} p{0.45947 cm} x{1.2531 cm} x{1.29487 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Set symbols}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Set}} & \{\} & a collection of elements & A = \{3,7,9,14\}, \{\{nl\}\} B = \{9,14,28\} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Such that}} & | & such that & A = \{x | x∈\textbackslash{}mathbb\{R\}, x\textless{}0\} \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{Intersection}} & A∩B & belongs to both A AND B at & A ∩ B = \{9,14\} \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} {\bf{Union}} & A∪B & belongs to either A OR B & A ∪ B = \{3,7,9,14,28\} \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{Subset}} & A⊆B & A is a subset of B. \{\{nl\}\}Set A is included in set B. & \{9,14,28\} ⊆ \{9,14,28\} \tn % Row Count 16 (+ 5) % Row 5 \SetRowColor{white} {\bf{Proper subset / strict subset}} & A⊂B & A is a subset of B, but A is not equal to B & \{9,14\} ⊂ \{9,14,28\} \tn % Row Count 20 (+ 4) % Row 6 \SetRowColor{LightBackground} {\bf{Not a subset}} & A⊄B & Set A is not a subset of set B & \{9,66\} ⊄ \{9,14,28\} \tn % Row Count 23 (+ 3) % Row 7 \SetRowColor{white} {\bf{Superset}} & A⊇B & A is a superset of B.\{\{nl\}\}Set A includes set B & \{9,14,28\} ⊇ \{9,14,28\} \tn % Row Count 27 (+ 4) % Row 8 \SetRowColor{LightBackground} {\bf{Proper superset / strict superset}} & A⊃B & A is a superset of B, but B is not equal to A & \{9,14,28\} ⊃ \{9,14\} \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.16956 cm} p{0.45947 cm} x{1.2531 cm} x{1.29487 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Set symbols (cont)}} \tn % Row 9 \SetRowColor{LightBackground} {\bf{Not superset}} & A⊅B & Set A is not a superset of set B & \{9,14,28\} ⊅ \{9,66\} \tn % Row Count 3 (+ 3) % Row 10 \SetRowColor{white} {\bf{Power set}} & 2\textasciicircum{}A\textasciicircum{} & All subsets of A & \tn % Row Count 5 (+ 2) % Row 11 \SetRowColor{LightBackground} {\bf{Power set}} & P(A) & All subsets of A & \tn % Row Count 7 (+ 2) % Row 12 \SetRowColor{white} {\bf{Equality}} & A=B & Both sets have the same members & A=\{3,9,14\}, B=\{3,9,14\}, A=B \tn % Row Count 10 (+ 3) % Row 13 \SetRowColor{LightBackground} {\bf{Complement}} & A\textasciicircum{}c\textasciicircum{} & All the objects that do not belong to set A & \tn % Row Count 14 (+ 4) % Row 14 \SetRowColor{white} {\bf{Relative complement}} & A\textbackslash{}B or A-B & Objects that belong to A and not to B & A = \{3,9,14\}, B = \{1,2,3\}, A \textbackslash{} B = \{9,14\} \tn % Row Count 18 (+ 4) % Row 15 \SetRowColor{LightBackground} {\bf{Symmetric difference}} & A∆B or A⊖B & Objects that belong to A or B but not to their \seqsplit{intersection} & A = \{3,9,14\}, B = \{1,2,3\}, A ∆ B = \{1,2,9,14\} \tn % Row Count 23 (+ 5) % Row 16 \SetRowColor{white} {\bf{Element of}} & a∈A & Set membership & A=\{3,9,14\}, 3 ∈ A \tn % Row Count 25 (+ 2) % Row 17 \SetRowColor{LightBackground} {\bf{ Not element of}} & x∉A & No set membership & A=\{3,9,14\}, 1 ∉ A \tn % Row Count 27 (+ 2) % Row 18 \SetRowColor{white} {\bf{Ordered pair}} & (a,b) & Collection of 2 elements & \tn % Row Count 29 (+ 2) % Row 19 \SetRowColor{LightBackground} {\bf{Cartesian product}} & A×B & Set of all ordered pairs from A and B & \tn % Row Count 33 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.16956 cm} p{0.45947 cm} x{1.2531 cm} x{1.29487 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Set symbols (cont)}} \tn % Row 20 \SetRowColor{LightBackground} \seqsplit{cardinality} & |A| or \#A & The number of elements of set A & A=\{3,9,14\}, |A|=3 \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Set operations}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Associativity} & (A∪B) ∪ C = A∪(B∪C)\{\{nl\}\}(A∩B)∩C = A∩(B∩C) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \seqsplit{Commutativity} & A∪B = B∪A \{\{nl\}\} A∩B = B∩A \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{Complementation} & A∪Not(A) = U\{\{nl\}\} A∩Not(A) = ∅ \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{Idempotence} & A∪A = A et A∩A \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} Identité & A∪∅ = A\{\{nl\}\} A∩U = A \tn % Row Count 10 (+ 1) % Row 5 \SetRowColor{white} \seqsplit{Extrémité} & A∪U = U\{\{nl\}\}A∩∅ = ∅ \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{Involution} & Not(A) = A \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} Morgan's law & (Not(A∪B)) = Not(A)∩Not(B)\{\{nl\}\}(Not(A∩B)) = Not(A)∪Not(B) \tn % Row Count 16 (+ 3) % Row 8 \SetRowColor{LightBackground} \seqsplit{Distribuvité} & A∪(B∩C) = (A∪B) ∩ (A∪C)\{\{nl\}\}A∩(B∪C) = (A∩B) ∪ (A∩C) \tn % Row Count 19 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Languages - Definitions}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Formal language}} & vocabulary + grammar rules \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Monoid}} & Set having an internal binary operation (+,-,*/, U,...) and having a neutral element ∈. Ex: \textless{}E,+,∈\textgreater{} means all strings of E will be concaneted with operator + \tn % Row Count 9 (+ 7) % Row 2 \SetRowColor{LightBackground} {\bf{Grammar}} & (Vn, Vt, P, S) when:\{\{nl\}\}- Vn is a finite non-empty set whose elements are variables\{\{nl\}\}- VT is a finite non-empy set of terminal states\{\{nl\}\}- Vn∩ε = ∅\{\{nl\}\} -P is a finite set whose elements are α -\textgreater{} β, known as production rules when α, β, ∈ (Vn∪ε)* but α should contain at least 1 symbol from Vn\{\{nl\}\}- S is a start symbol, where S ∈ Vn\{\{nl\}\} \tn % Row Count 24 (+ 15) % Row 3 \SetRowColor{white} {\bf{Symbol}} & Element of a set. Ex for set A = \{1, 2, 3\}, 2 is an element \tn % Row Count 27 (+ 3) % Row 4 \SetRowColor{LightBackground} {\bf{Alphabet}} & A finite and non empty set of symbols \tn % Row Count 29 (+ 2) % Row 5 \SetRowColor{white} {\bf{Length of a string}} & Number of symbols in a string. Ex: for w = aabbc, |w| = 5 \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Languages - Definitions (cont)}} \tn % Row 6 \SetRowColor{LightBackground} {\bf{Empty language}} & ∅ contains no string \tn % Row Count 2 (+ 2) % Row 7 \SetRowColor{white} {\bf{Empty string}} & ε where |ε| = 0 \tn % Row Count 4 (+ 2) % Row 8 \SetRowColor{LightBackground} {\bf{A\textasciicircum{}n\textasciicircum{}}} & Word of length {\bf{n}} from the alpabet {\bf{A}} \tn % Row Count 6 (+ 2) % Row 9 \SetRowColor{white} {\bf{A\textasciicircum{}*\textasciicircum{}}} & Words of finite length from the alphabet A or null (can be empty: ε) \tn % Row Count 9 (+ 3) % Row 10 \SetRowColor{LightBackground} {\bf{A\textasciicircum{}+\textasciicircum{}}} & Words of finite length from the alphabet A and NOT NULL (no ε) \tn % Row Count 12 (+ 3) % Row 11 \SetRowColor{white} {\bf{Regular expression}} & Rercursive language, the rules of the expression must be indepent.Ex:\{\{nl\}\}L1 = \{a\textasciicircum{}n\textasciicircum{}n\textasciicircum{}2n\textasciicircum{}|n\textgreater{}=0, m\textgreater{}= 0\} and\{\{nl\}\}L2 = \{a\textasciicircum{}n\textasciicircum{}b\textasciicircum{}m\textasciicircum{} | n = 2m\}\{\{nl\}\}{\emph{Here {\bf{L1 is regular and L2 is not}}. Because in L2 there is a dependency between n and m}} \tn % Row Count 21 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Maths set reminders}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{N}} & \{0,1,2,3,...\} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Z}} & \{...,-3,-2,-1,0,1,2,3,...\} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{D}} & \{d | d is a nb. having a finite number of decimals \} \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} {\bf{Q}} & \{ r | r is a rational nb. that can be written as the quotien a/b of a real integer number a by a whole integer (not null) b\}\} \tn % Row Count 9 (+ 5) % Row 4 \SetRowColor{LightBackground} {\bf{IR}} & \{...,-3,-2,-1,0,Ɣ, 1, √2, 2, e, 3, π,...\} \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} Successive inclusions & N ⊂ Z ⊂ D ⊂ Q ⊂ IR \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.84609 cm} x{4.13091 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Automata definitions}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{DFA}} & Deterministic Finite Automata. A DFA has a is deterministic because from each state we are able to determine the next state. \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} {\bf{NDFA}} & Non Deterministic Finite Automata. A NDFA is non deterministic because we can't always determiner determine which will be the next state from the present state. \tn % Row Count 9 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Operations on Languages}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Union}} & L∪M = \{x | x ϵ L or x ϵ M\} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Intersection}} & L∩M = \{x | x ϵ L and x ϵ M\} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Difference(exclusion)}} & L\textbackslash{}M = \{x | x ϵ L and x ∉ M\} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Complement on A\textasciicircum{}*\textasciicircum{}}} & Comp(L) = A\textasciicircum{}{\emph{\textasciicircum{}\textbackslash{}L = \{x|x ϵ A\textasciicircum{}}}\textasciicircum{} and x ∉ L\} \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{L∪Ø = L \newline L∩Ø = L} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Identity of Regular Expressions}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Ø + R = R} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Ø.R = R.Ø = Ø} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Λ.R = R.Λ = R} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Λ* = Λ and Ø* = Λ} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{R+R = R} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{R*R*=R*} \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{R.R* = R.*R} \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{(R*)=R*} \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Λ+R.R* = R* = Λ+R*.R} \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{(P.Q)*P=P(Q.P)*} \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{(P+Q)*=(P*.Q*)*=(P*+Q*)*} \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{(P+Q).R=P.R+Q.R and R(P+Q)=R.P+R.Q} \tn % Row Count 12 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Graph types}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Reflexif}} & All states have a loop, meaning δ(state1, input) = state1 \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Symetric}} & All states have a direct way back , meaning:\{\{nl\}\}δ(A, x) = B and δ(B,y) = A \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{Anti symetric}} & There never is a direct way back to the same state meaning, if :\{\{nl\}\}δ(A,x) = B then δ(B, y) ≠ A \tn % Row Count 10 (+ 4) % Row 3 \SetRowColor{white} {\bf{Transitive}} & There a shortcuts to a state, meaning if: \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Grammar construction}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Problem}} − {\emph{Suppose :}} \newline % Row Count 1 (+ 1) {\bf{L(Gr) = \{a\textasciicircum{}n\textasciicircum{}b\textasciicircum{}m\textasciicircum{}c\textasciicircum{}k\textasciicircum{} | n \textgreater{}= 0, k \textgreater{} 1, m = n+k\}}} \newline % Row Count 3 (+ 2) {\emph{We have to find out the grammar Gr which produces L(Gr).}} \newline % Row Count 5 (+ 2) {\bf{Solution:}} \newline % Row Count 6 (+ 1) {\emph{Possible word}} {\bf{w = a\textasciicircum{}4\textasciicircum{}b\textasciicircum{}9\textasciicircum{}c\textasciicircum{}5\textasciicircum{}}} \newline % Row Count 7 (+ 1) {\emph{We need to decompose b\textasciicircum{}9\textasciicircum{}:}} {\bf{w = a\textasciicircum{}4\textasciicircum{}b\textasciicircum{}4\textasciicircum{}b\textasciicircum{}5\textasciicircum{}c\textasciicircum{}5\textasciicircum{}}} \newline % Row Count 9 (+ 2) {\emph{Now we can define :}} \newline % Row Count 10 (+ 1) - {\bf{S1}} having the {\bf{same number of a}} followed by the {\bf{same number of b}}. \newline % Row Count 12 (+ 2) - {\bf{S2}} having the {\bf{same number of b}} followed by the {\bf{same number of a}}. \newline % Row Count 14 (+ 2) {\emph{So:}} \newline % Row Count 15 (+ 1) S = S1 S2 \newline % Row Count 16 (+ 1) S1 = a S1 b | Λ \newline % Row Count 17 (+ 1) S2 = b S2 a | bbcc \newline % Row Count 18 (+ 1) {\emph{Why {\bf{bbcc}} as alternative to S2? Because in the case of a minimum word {\bf{w = b\textasciicircum{}2\textasciicircum{}c\textasciicircum{}2\textasciicircum{} = bbcc}} because k \textgreater{} 1 so in this case we do have m = n+k = 0+2}}% Row Count 22 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}