CS 3613: Theoretical Foundations of Computing
CS 3613: Theoretical Foundations of Computing
Spring 2009
Homework 4: Regularity and Regular Expressions
Due Date: March 12, 2009
----------------------------------------------------
Notes:
- Read Course Information: Section 7 (Miscellaneous) and Section 9 (Academic Dishonesty or Misconduct).
- When you are giving a construction, example, etc., provide a justification with your argument. Your solutions to numerical problems must contain the derivation of your answers. In all of your presentations, strive for correctness, completeness, and clarity. When in doubt about the assumptions of problems, the interpretations of wording, etc., consult the instructor.
- You should strive to complete all problems assigned, and a subset of them will be graded.
- Read the notes above carefully.
- Let S = { 0, 1 }. Give a regular expression for each of the the following languages. Briefly and precisely annotate your answers.
- All strings in S* with at most three 0s.
- All strings in S* with a number of 0s divisible by three.
- All strings in S* with exactly one occurrence of the substring 000.
- Recall that for two regular expressions (over an alphabet) r and s, r = s means that L (r) = L (s). Prove or disprove the following for regular expressions r and s over an alphabet S.
- (r s + r)* r = r (s r + r)*
- (r + s)* = r* + s*
- ( r* s* )* = (r + s)*
- Do [Sip06] Chapter 1, exercise 1.21(a).
- Do [Sip06] Chapter 1, exercise 1.22(b).
- Do [Sip06] Chapter 1, problem 1.48.
File translated from
TEX
by
TTH,
version 3.35.
On 2 Mar 2009, 23:47.