CS 3613: Theoretical Foundations of Computing
CS 3613: Theoretical Foundations of Computing
Spring 2009
Homework 6 (Version 1): Context-Freedom
Due Date: April 6, 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.
Consider the following language:
K = { x $ y | xandyarein {a,b}*,andyisnotapermutationofx }.
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.
Prove that the language K is not regular.
Construct a context-free grammar that generates the language K. Briefly and precisely describe the strings generated by each variable in the grammar.
Show that the following language is context-free via context-free grammar:
{ w1 $ w2 $ ¼$ wn | n ³ 1, each wi Î {a, b}*, andforsome i and j, wir = wj }.
Briefly and precisely describe the strings generated by each variable in the grammar.
Do [Sip06] Chapter 2, exercise 2.14. Show all the important intermediate work.
¼ More problems may be given in later version.
File translated from
TEX
by
TTH,
version 3.35. On 23 Mar 2009, 13:42.