
Formal Languages and Automata 419
Example
Write an RE to specify a language over {0, 1}, having at least one 1.
The possible RE are: (0)*1(0 + 1)*, (0 + 1)*1(0 + 1)* and (0 + 1)*1(0)*. Each of them emphasis
a 1 in different positions.
Example
V
T
= {+, −, ., E, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
Let RE S = λ + ‘+’ + ‘−’
RE d = 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
Then consider an RE Sd
+
(d
+
+ .d
+
ESd
+
+ ESd
+
) – this is the format of real constants in many
programming languages.
Theorem A.4.1 Every finite language is regular.
You can prove this by induction over the number of sentences in the language. You will also have to
prove a lemma that any finite ...