Ans: The statement which is true are:
b) Grammer G is not CS
d) Grammer G is not context-free
Question 4 Consider the grammar G defined below: SabAc|Ba bAbAaac 1- Baalaa Bκαι bΒΙλ Select all...
Question 3 Consider the grammar G defined below: SaSa|Aa|abbB ABAN BaB| bb Select all the statements below which are true. Grammar G is context free. O Grammar G is regular. Grammar G is CS. O Grammar G is unrestricted. Grammar G is linear.
Question 5 10 pts Select all the statements below which are true: The grammar below is CS. SaSa bb O Any CS language is RE. The language L = {a”b"c" : n > 1}is CF. The language L = {wwR : w€ {a, b}" } is DCF, CF, CS, REC, and RE. There are languages which are not accepted by TMs. Any REC language is accepted by some Decider (a TM that halts for every input).
formal language automata 1. (15p) Consider the Context-free grammar G defined by: S → 0A1A1A1A A0A1A a) Describe L(G). (5p) b) Convert G into a Pushdown Automaton (PDA). (10p)
1. Consider the following grammar A - aB B-Sb (a) Show a derivation tree for the string aabbbb using the grammar. (b) Give an English description of the language generated by the grammar 2. Let G be the grammar below: S-ASB ab | SS (a) Show that G is ambiguous. (b) Construct an unambiguous grammar equivalent to G. 3. Find a context free grammar for the language L3- fa"b"c+m :n,m21) 4. Find a context free grammar for the language L4...
Consider the following grammar: A -> aB | b | cBB B -> aB | bA | aBb C -> aaA | b | caB Perform the pairwise disjoint test for the grammar. Rewrite the above grammar so that all grammar rules pass the pairwise disjoint test. Suppose lex() is the lexical analyzer which gets the next lexeme and puts its token code in the global variable nextToken. And suppose the token codes for terminals a, b, and c are...
10 pts Question 5 Select all the statements below which are true: Any REC language is RE. Any REC or RE language is accepted by some Turing Machine. @ Every language is accepted by some TM @ The language L (a"bc :n1 is CF. The language L (aww :n 2 0, w E (a b)') is CF cs, REC, and RE. : T The grammar below is CS A- acbA I a
Question Completion Status: QUESTION 10 10 points Save Answ Check EXACTLY THOSE claims that are TRUE. (Note on notation: for any program say X (where X may be an automaton of any type (as stated), or a grammar, or a regular expression), let L(X) stand for the language defined by X.) There exists an algorithm that operates as follows. INPUT: context free grammar G QUESTION: Is the complement of L(G) regular ? There exists an algorithm that operates as follows....
1. Give a context-free grammar for the set BAL of balanced strings of delimiters of three types (), and . For example, (OOis in BAL but [) is not. Give a nondeterministic pushdown automata that recognizes the set of strings in BAL as defined in problem 1 above. Acceptance should be by accept state. 2. Give a context free grammar for the language L where L-(a"b'am I n>-o and there exists k>-o such that m-2*ktn) 3. Give a nondeterministic pushdown...
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...
TRUE OR FALSE? (Note: E = belongs to) 1. A context-free grammar G is in Chomsky normal form. Then G is not recursive. 2. Let G be an arbitrary context-free grammar. uAv =>* u'A'v' , where u, v, u' and v' E V* and A E (V - Eps), then L(G) is infinite. 3. {ww : w E {a, b}*} is accepted by some NDPDA with exactly two states