Module 14 Worksheet In class Questions

advertisement
Module 14 Worksheet
In class Questions
1) (S4) Prove that 2 is an integer given the definition of integers on this slide.
2) (S4) Is there another proof that 2 is an integer using these rules? Why or why not?
3) (S6) Prove that {a,b}* is a regular language.
4) (S8) Is (aa + ab + ba + bb)* the set of even length strings? Why or why not?
5) (S11) What “rule” is violated by the following incorrect regular expressions?
a++b
a*b+
(a+b
)(a+b)
6) (S12) Consider the string “10+11”
How many characters does it contain?
What is L(10+11)?
If we interpret this string as the addition of two binary numbers, what is 10+11?
7) (S13) Prove that {a,b}* is a regular language.
9) (S13) Prove that the set of all strings over {a,b} is a regular language.
10) (S13) Prove that {} is a regular language.
11) (S13) Prove that the set of even length strings over {a,b} is a regular language.
Take home review questions
1) Which of the following strings belong to L((b+aa)*)?
aa
aaa
aba
aab
aabbbbbaabbaa
2) Describe in English what L((b+aa)*) is.
3) Give a regular expression r such that L(r) = the set of strings over {a,b} with an even
number of a’s.
Download