CS3331 – Assignment 2 due Oct. 24, 2024
2-day no-penalty extension until: Oct. 26, 11:59pm1
-
For each of the following languages, L, prove whether L is (i) regular, (ii) context-free but not regular, or (iii) not context-free:
-
L = {xyxR | x, y ∈ {0, 1}+}.
-
L = {w ∈{0, 1}∗ | every second character of w is a 0 and every third character of w is a 1}.
-
L = {xay | x, y ∈ {a, b}∗, x is a prefix of y}.
-
L = {(abb)na(bba)n | n ≥ 0}.
-
L = Pref({anbm | n ≥ m ≥ 0}). (Pref(L) denotes the set of prefixes of strings in L.)
-
L = ∅.
-
For each regular language, L, in the above questions, fully describe the classes of ≈L.
-
-
For two languages L1, L2 ⊆ {a, b}∗, does ≈L1 = ≈L2 imply L1 = L2? Prove your answer.
-
Show that the following problem is decidable: Given a context-free language, C, and two regular languages, R1, R2, is there a string in C which has a prefix which is in R1 but not in R2?
You are allowed to use any results, algorithms and closure properties proved in class, without proof but you need to indicate clearly what you use. Any new properties, constructions or algorithms should be described in your solution.
Reviews
There are no reviews yet.