CS 3613: Theoretical Foundations of Computing CS 3613: Theoretical Foundations of Computing
Spring 2008
Final Examination
Student Name:
----------------------------------------------------
  1. The examination contains 4 problems. You have 110 minutes for 70 points.

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

----------------------------------------------------
  1. [15 points] Prove, or disprove by giving a counter-example, each of the following statements.
    1. [5 points] "For arbitrary languages L1, L2, and L3 over an alphabet S, (L1 ÇL2) L3 = (L1 L3) Ç(L2 L3)."




























    2. [5 points] "If L* is a regular language, then L is a regular language."


    3. [5 points] (Note: For a context-free grammar G = (V, S, P, S), a variable A Î V is called terminating if A Þ* w for some w Î S*.)
      "For a context-free grammar G = (V, S, P, S), if A and B are two variables of V with A Þ* a1 B b1 and B Þ* a2 A b2 for some a1, b1, a2, b2 Î V*, then A is terminating if and only if B is terminating."



  2. [20 points] Consider the following language:

    K = { x $ y | x and y are in {a, b}*, and y is not a permutation of x }.
    Example strings in K are a a a b $, a $ a a a b and b a b a $ a a a b; example strings not in K are a b b a, a b b b a $ a b b b a, and a b b b a $ b a b a b.
    1. [10 points] Prove that the language K is not regular.


    2. [10 points] Construct a context-free grammar that generates the language K. Briefly and precisely describe the strings generated by each variable in the grammar.



  3. [20 points] For each of the following languages, either:
    1. [10 points] { ai bj ck | i, j, k ³ 1, and j £ max{ i, k } }.


    2. [10 points] { ai bj ck | i, j, k ³ 1, and j ³ max{ i, k } }.



  4. [15 points] Consider the following language:

    L = { x Î {a, b}* | #a (x) = #b (x) }.
    (Note: #u (v) denotes the number of occurrences of a substring u in a string v.)
    Give the formal 7-tuple definition of a deterministic Turing machine that accepts/decides the language L. Briefly and precisely comment on the states and transitions in the machine. You may assume that an input string is left-delimited with $.




File translated from TEX by TTH, version 3.35.
On 10 Feb 2009, 13:39.