COMS W3261
Computer Science Theory
Lecture 2: September 14, 2009
Regular Expressions

1. Outline

2. Review

3. Two inductive proofs

4. Regular Expressions

5. Examples of Regular Expressions and the Languages They Denote

6. Practice Problems

  1. Do the two regular expressions (a+b)* and (a*b*)* denote the same language?
  2. Write a regular expression for all strings of a's and b's with an even number of a's.
  3. Write a regular expression for all strings of a's and b's with an even number of a's and an odd number of b's.
  4. Write a regular expression for all strings of a's and b's that do not contain aba as a substring.
  5. Write a regular expression for all strings of a's, b's, and c's that do not contain two identical adjacent characters.
  6. Write a Unix regular expression for all English words ending in dous.
  7. Write a Unix regular expression for all English words with the five vowels a,e,i,o,u in order. (The vowels do not have to be next to one another.)

7. Reading Assignment



aho@cs.columbia.edu