(1p) What ε-NFA is the result of using the construction from Theorem 3.7 in the main text book to convert the regular expression (ε + 10)* into an ε-NFA over {0, 1}?
ε | 0 | 1 | |
---|---|---|---|
→ 0 | {1} | ∅ | ∅ |
1 | {2, 4} | ∅ | ∅ |
2 | {3} | ∅ | ∅ |
3 | {7} | ∅ | ∅ |
4 | ∅ | ∅ | {5} |
5 | ∅ | {6} | ∅ |
6 | {7} | ∅ | ∅ |
7 | {1, 8} | ∅ | ∅ |
* 8 | ∅ | ∅ | ∅ |
ε | 0 | 1 | |
---|---|---|---|
→ 0 | {1, 8} | ∅ | ∅ |
1 | {2, 4} | ∅ | ∅ |
2 | {3} | ∅ | ∅ |
3 | {7} | ∅ | ∅ |
4 | ∅ | ∅ | {5} |
5 | ∅ | {6} | ∅ |
6 | {7} | ∅ | ∅ |
7 | {1, 8} | ∅ | ∅ |
* 8 | ∅ | ∅ | ∅ |
ε | 0 | 1 | |
---|---|---|---|
→ 0 | {1} | ∅ | ∅ |
1 | {2, 4} | ∅ | ∅ |
2 | {3} | ∅ | ∅ |
3 | {8} | ∅ | ∅ |
4 | ∅ | ∅ | {5} |
5 | {6} | ∅ | ∅ |
6 | ∅ | {7} | ∅ |
7 | {8} | ∅ | ∅ |
8 | {1, 9} | ∅ | ∅ |
* 9 | ∅ | ∅ | ∅ |
ε | 0 | 1 | |
---|---|---|---|
→ 0 | {1, 9} | ∅ | ∅ |
1 | {2, 4} | ∅ | ∅ |
2 | {3} | ∅ | ∅ |
3 | {8} | ∅ | ∅ |
4 | ∅ | ∅ | {5} |
5 | {6} | ∅ | ∅ |
6 | ∅ | {7} | ∅ |
7 | {8} | ∅ | ∅ |
8 | {1, 9} | ∅ | ∅ |
* 9 | ∅ | ∅ | ∅ |
(1p) Which of the following regular expression equivalences are valid?
L(M + N + M) = LN + LM
MN = (N + ∅)(Mε)
(∅M)* = ((εε)*)*
(M + N)* = M* + N*
M* = ε + MM*
(1p) Which of the following regular expression equivalences are valid?
(ε + M)* = M*
(MN)+ = M(NM)*N
(M + N)(M + N) = MM + MN + NN
(1p) Consider the language L over {0, 1} defined by the regular expression (01)*. According to the pumping lemma for regular languages there is some m ∈ ℕ such that P(m) holds, where P(m) is the property ∀w ∈ L. |w| ≥ m ⇒ ∃t, u, v ∈ {0, 1}*. w = tuv ∧ u ≠ ε ∧ |tu| ≤ m ∧ ∀n ∈ ℕ. tunv ∈ L. What is the smallest m ∈ ℕ for which P(m) holds?
(1p) Which of the following languages are regular?
{w ∈ {0, 1}* | (|w| = 5 ∧ ∄u, v ∈ {0, 1}*. w = u00v) ∨ |w| = 3}
{(uv)² | u ∈ {0}+, v ∈ {1}+}
{u²v² | u ∈ {0}+, v ∈ {1}+}
{w² | w ∈ {0, 1}*}