CS 3613: Theoretical Foundations of Computing CS 3613: Theoretical Foundations of Computing
Spring 2009
Test 2
Student Name:
----------------------------------------------------
  1. The examination contains 4 problems. You have 90 minutes for 40 points.

  2. Show all important steps in your work. Your answers will be graded on its correctness and clarity.

----------------------------------------------------
  1. [10 points]
    1. [6 points] Let L = { ai bj ck | i, j, k ³ 0, i + k = j }. Prove that L is not regular by using the pumping lemma for regular languages.





































    2. [4 points] Using the closure properties of regular languages (regularity-preserving operators) to show that L is not regular.



  2. [10 points] Give context-free grammars generating the following languages.
    Notes: No conversion from pushdown automaton to context-free grammar is accepted. For each grammar, give a brief and precise interpretation of each variable (that is, the set of strings derived from the variable).
    1. [5 points] L1, the set of all non-palindromes over alphabet { a, b }. (A palindrome over an alphabet S is a string over S that reads the same backward and forward; what is a non-palindrome?)


    2. [5 points] L2 = { am bn cp dq | m, n, p, q ³ 0, m + n = p + q }. Note that the condition m + n = p + q does not necessarily imply that m = q and/or n = p.



  3. [10 points] Consider the following language:

    L = { z Î { a, b }* | z is of the form x y x for some x and y with |x| ³ 1 }.
    For examples: The strings aaa (with x = a and y = a) and abababa (with x = a and y = babab, or x = aba and y = b) are in L, but the string aaab is not in L.
    Decide if L is regular. Prove your answer.


  4. [10 points] Give the 6-tuple definition of a pushdown automaton for the language:

    L = { a, b }* - { w w | w Î { a, b }* }.
    Note: A direct construction of a pushdown automaton is required. Give a brief and precise interpretation of the states and transitions of your machine.




File translated from TEX by TTH, version 3.35.
On 20 Apr 2009, 13:17.