07 Exercises2
07 Exercises2
1
Section 4.1
Exercise 2
2
Section 4.1
Exercise 21
• The tail of a language is de ned as the set of all su xes of its strings, that is
• tail(L) = {y : xy ∈ L for some y ∈ Σ*}.
• Show that if L is regular, so is tail(L).
3
fi
ffi
Section 4.2
Exercise 9
• Exhibit an algorithm that, given any three regular languages, L, L1, and L2,
determines whether or not L = L1L2.
4
Section 4.3
Exercise 4
5
Section 4.3
Exercise 6 (a)
6
Section 4.3
Exercise 11 (b)
7
Section 5.1
Exercise 9 (e)
8
Section 5.2
Exercise 4
n n
• Find an s-grammar for L = {a b : n ≥ 2}.
9
Section 5.2
Exercise 10
• E → T | E + T,
• T → F | T * F,
• F → I | (E),
• I → a | b | c.
10
Section 5.2
Exercise 17
11
Section 6.1
Exercise 6
12
Section 6.1
Exercise 8
13
Section 6.1
Exercise 11
14
Section 6.2
Exercise 2
15
Section 6.2
Exercise 10
16
Summary
• Remember that the facts we have discovered during the exercises can be
used during the exam, without further proof or evidence.
• You can consider them as agreed or known facts, and start your
arguments from there.
17