class: center, middle # CS-3110: Formal Languages and Automata ## Review --- # Parse Table $$ \begin{aligned} X \rightarrow& aXb\\\\ X \rightarrow& YZ\\\\ X \rightarrow& WW\\\\ Y \rightarrow& cX\\\\ Y \rightarrow& b\\\\ Z \rightarrow& aZ\\\\ Z \rightarrow& \varepsilon\\\\ W \rightarrow& c \\\\ W \rightarrow& cW \end{aligned} $$ --- # Pushdown Automata ### Design a Pushdown Automaton that recognizes the language of palindrome sequences over the alphabet {a,b}: Each word consists of 1 or more palindromes that are concatenated --- # Write an equivalent grammar
--- class: small # Languages Which languages are regular? Context-Free? Neither? Why? * `\(L_1 = \{a^n b^m | n \in \mathbb{N} \wedge m \in \mathbb{N}\}\)` * `\(L_2 = \{a^n b^m c^n d^m | n \in \mathbb{N} \wedge m \in \mathbb{N}\}\)` * `\(L_3 = \{a^n b^m a^n | n \in \mathbb{N} \wedge m \in \mathbb{N}\}\)` * The language of balanced parenthesis (every opening parenthesis has a corresponding closing parenthesis) * The language of all words over the alphabet `\(\Sigma = \{a,b,c\}\)` where `a`s only occur in pairs, the first letter is different from the last letter, and there are at least as many `c`s as `b`s --- # Turing Machines ### Design a Turing Machine that reads a binary number (with length at least 5) and removes the second and the second-to-last digit. The read/write-head starts on the first digit.