*We have to show that the problem of determining whether a CFG generates some string 1* is decidable



Let S = {0,1}. Show that the problem of determining whether a CFG generates some string...
(c) Let Sigma = {0, 1}. Consider the problem of determining whether a PDA accepts some string that contains substring �101� is decidable. Formulate it as a language, and then show that this language is decidable
Let G be the CFG: S → aS | Sb | a | b. Show that no string in L(G) contains ba as substring.
1. (Decidable languages) (c) (Prefix of a generated string) A string w is called a prefix of string s if s starts with w. i. Give a regular expression for all strings over alphabet Σ for which w is a prefix. ii. Let L = {(G, w) | G is a CFG, w is a string, and w is a prefix of some string s generated by G}.
Write a right-linear CFG for the regular languages: (∑={0,1}) a. L = { w | w is a binary string which starts and ends with the same symbol} b. L = { w | w is a binary string with at least three 0’s } c. L = { w | w is a binary string with odd number of 0’s and even number of 1’s}
Problem 3.3: For a string x € {0,1}*, let af denote the string obtained by changing all 0's to l's and all l's to O's in x. Given a language L over the alphabet {0,1}, define FLIP-SUBSTR(L) = {uvFw: Uvw E L, U, V, w € {0, 1}*}. Prove that if L is regular, then FLIP-SUBSTR(L) is regular. (For example, (1011)F = 0100. If 1011011 e L, then 1000111 = 10(110) F11 € FLIP-SUBSTR(L). For another example, FLIP-SUBSTR(0*1*) = 0*1*0*1*.)...
Design a CFG for the strings over {0,1} which contain more 1’s than 0’s. Hint: Draw possible “hill/valley” plots. Dissect each segment you see into simpler structures you’ve seen before. Design a CFG for each, and then piece them together.
Determining whether languages are finite, regular, context free,
or recursive
1. (Each part is worth 2 points) Fill in the blanks with one of the following (some choices might not be used): a) finite b) regular but not finite d) context-free but not deterministic context-free e) recursive (that is, decidable) but not context-free f) recursively enumerable (that is, partially decidable) but not recursive g) not recursively enumerable Recall that if M is a Turing machine then "M" (also written as...
Let Σ = {0,1}and define a language L over Σ as L = {0n10n10n : n ≥1} Show that L is not context-free. Remark: Compare this with language S1 onpage106,which is context free. Hint: Let p be the pumping constant and consider the string s = 0p10p10p. Write s as in the Pumping Lemma. Either vy has no zeros,or it has at leas tone zero;consider theses cases separately.
Problem 1 Create a CFG that generates each of the languages below. [10 points] [10 points] wR is a substring of r if there are strings y, z E {a, b)" such that r = ywR2. A = {w I w E {a, b)" has more as than bs} B = {w#r l w,xe(a, b)" and wR a. b. is a substring of r). Rememb er, c. [10 points] C = {amb"ck 1 m, n > 0 and k =...
I need help with this problem. thanks
Show that the problem of deciding whether a string over has even length Iş reducible to the Blank Tape Problem. Why is it incorrect to conclude from this that the problem of determining whether a string has even length is undecidable?
Show that the problem of deciding whether a string over has even length Iş reducible to the Blank Tape Problem. Why is it incorrect to conclude from this that the problem of...