CMPSCI 401: Theory of Computation

Solutions to First Midterm Exam, Spring 2012

David Mix Barrington

21 February 2012


Question text is in black, solutions in blue.

  Q1: 10 points
  Q2: 10 points
  Q3: 10 points
  Q4: 10 points
  Q5: 10 points
  Q6: 10 points
  Q7: 10 points
  Q8: 10 points
  Q9: 10 points
  Q10: +10 points
  Q11: 10 points
  Q12: 10 points
  Q13: 10 points

  Total: 120+10 points

The regular language L1 is over the alphabet Σ = {a, b, c} and is defined by the regular expression Σ*(aa ∪ bb ∪ cc)Σ*.

The language L2 is the complement of L1, that is, Σ* ∖ L1.

The context-free language L3 over the alphabet {a, b} is defined by the grammar with start symbol S and rules S → bSS and S → a.

Last modified 26 February 2012