*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}.
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...
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...
Problem 3. A ternary string is a sequence of O's, 1's and 2's. Just like a bit string, but with three symbols 0,1 and 2. Let's call a ternary string good provided it never contains a 2 followed immediately by a 0, i.e., does not contain the substring 20. Let Go be the number of good strings of length n. For example, G_1=3, and G. = 8 (since of the 9 ternary strings of length 2, only one is not...
Please can you show me the all intermediate steps and explain clearly in the solution? Let Ly be the language accepted by the DFA below and L2 = {0M1mom 1kok1"|n, m, k > 0}. Create a CFG that generates L3 = L; U L2 using the techniques pre- sented in textbook. 91 1 start – 40 0 92