(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
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
(c) Let Sigma = {0, 1}. Consider the problem of determining whether a PDA accepts some...
Let S = {0,1}. Show that the problem of determining whether a CFG generates some string in 1* is decidable. In other words, show that { <G>G is a CFG over {0,1} and 1* n L(G) != 0 }
Let sigma = {a, b, c}. Draw the transition graph of a npda that accepts the following language: L = {c(ab)^n a^m c^n: n greaterthanorequalto 1, m greaterthanorequalto 0} Write the sequence of moves done by the npda when the input sequence is w = cabc. Is the string w accepted?
Consider the following decision problems. Indicate which of these problems are undecidable and which are decidable. For decidable problems, sketch an algorithm to decide/solve the problem; for undecidable problems, justify why they are undecidable. To decide whether a PDA accepts the empty string. To decide whether the languages accepted by two context-free grammars have strings in common.
Problem 1 Substring matching is the process of determining whether shorter string (the substring) is contained within a longer string. Substring matching plays important roles in the reconstruction of an unknown DNA string from pieces, and in searching for interesting substrings within a known DNA string. Python provides a find (substring, start, end) string method that returns the lowest index (integer) where the substring is found in the index range start <= index < end. The start and end arguments...
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...
a. Let A = { < A,w > | A is a DFA that accepts w}, M is a Turing machine, and L(M) = A. Suppose M accepts the string p. p is in the form of < B,s > where B is a DFA, s is a string, and B accepts s. True False b. A linear equation is in the form of ax + b where a and b are constants and x is a variable. Let x-intercept...
1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...
1. Using the given details of a PDA with Q = {90, 91, 92, 93}; { = {a, b}; Z = 0; F = {q3} S = {90} and the following transitions construct a PDA. Show all the stack operations for the string "aaaabbbba" and tell whether the string is acceptable or not. (90, a, 0) = (91, 1) (q0, b, 0) = (q3, 1) (91, a, 1) = (92, 1) 5 (91, b, 1) = (92, 1) 5 (92,...
Consider The problem of determining whether an arbitrary sequence [x1,x2,...,xn] of n numbers contains repeated occurrences of some number. Show that this can be done in O(nlogn) time.