RS1: Regular Languages and Finite Automata
This Review Set asks you questions on regular languages and finite automata. Each of the questions has a short answer. You may discuss the RS with other students and work on the problems together.
Note
For the following, unless specified otherwise, the alphabet is \(\{a, b\}\).
-
Create DFA's that recognize the following languages.
L1
: strings that contain at least onea
and an even ofb
's follow the lasta
L2
: strings that start and end with the same symbolL3
: strings that contain the stringaab
as a substringL4
: strings with lengths at most 3
-
For the following DFA, (1) give a one-sentence description of the language recognized by the DFA and (2) write a regular expression for the same language.
-
Create an NFA that recognizes the language \(L\) consisting of strings that contain a \(b\) in the 3rd position from the end (e.g., \(aabaa \in L\) but \(aabb \notin L\)).
-
Convert the following NFA to an equivalent DFA
-
Determine whether or not the following languages are regular. If yes, create a DFA for it. If no, explain in a couple of sentences.
L1
is all strings over the alphabet \(\{(,)\}\) where the parentheses are balanced. For example, \((()(())) \in\)L1
but \((() \notin\)L1
.L2
is all binary representations (i.e., strings over the alphabet \(\{0, 1\}\)) of integers that divisible by 3.- Note that the right-most bit of \(w\) is the least-significant bit.
- For example, the following strings are members of
L2
: \(\varepsilon\), 0, 11, 110, 1001, 1100, 1111, 10010, 10101, 00, 0011.