Answer:
The language generated by given grammar is:
L = {0w11:w belongs to {0,1}*}U{1w0:w belongs to {0,1}*}
Question 2 Which language is generated by the grammar below? S → OA | 1B A...
Which language is generated by the grammar below? S rightarrow aaAb A rightarrow bA | CC Select the correct answer. L = {aab^n cc: n greaterthanorequalto 1} L = {aab^n cc: n greaterthanorequalto 2} L = {aaccb^n b: n greaterthanorequalto 0} L = {aab^n ccb: n greaterthanorequalto 0}
et l(a) be the language generated by g(a) - (n, 2, s, p) where 2 - [a, b), n= {s,x) and s->axb ... Question: Let L(a) be the language generated by G(a) - (N, 2, S, P) where 2 - [a, b), N= {S,X) and S->aX... Let L(a) be the language generated by G(a) - (N, 2, S, P) where 2 - [a, b), N= {S,X) and S->aXb X->aX|bX|epsilon (i) (3 marks) Describe the language L(a). (First generate a few...
What language does the grammar below generate? S rightarrow abS | aA A rightarrow aA | a Select the correct answer. L = {(ab)^n aaa^m: n greaterthanorequalto 0, m greaterthanorequalto 0} L = {(ab)^n a^m: n greaterthanorequalto 0, m greaterthanorequalto 1} L = {a^n b^n a^m: n greaterthanorequalto 0, m greaterthanorequalto 2} L = {a^n b^n a^m: n greaterthanorequalto 0, m greaterthanorequalto 1}
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).
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 8 10 pts Let S = {a,b,c}. Write a grammar that generates the language: L = {(ac)"6n+1w: n > 0, W € 2*, W contains the substring acb}
number 2 only please, could not take a smaller picture.
2 Find a regular grammar that generates the language • {w | We{0,1}* , [w] >= 4; w starts with 1 and ends with 10 or 01). 3 Find a regular expression that denotes the language accepted by the below finite automaton. 0 E B 0,1 1 D 0 с F
The language generated by the grammar in Figure 7.8 uses the
terminal x to introduce the base. Amore common convention is to
separate the base from the string of digits by some terminal
symbol. Instead of x 8 4 3 1 to represent , a language following
the common convention would use 8 x 4 3 1.
(a) Design an LALR(1) grammar for such a language and specify the
semantic actions that compute the string’s numeric value. In your
solution,...
Question 1. Let S = {a,b}, and consider the language L = {w E E* : w contains at least one b and an even number of a's}. Draw a graph representing a DFA (not NFA) that accepts this language. Question 2. Let L be the language given below. L = {a”62m : n > 0} = {1, abb, aabbbb, aaabbbbbb, ...} Find production rules for a grammar that generates L.
Question 1: Every language is regular T/F Question 2: There exists a DFA that has only one final state T/F Question 3: Let M be a DFA, and define flip(M) as the DFA which is identical to M except you flip that final state. Then for every M, the language L(M)^c (complement) = L( flip (M)). T/F Question 4: Let G be a right linear grammar, and reverse(G)=reverse of G, i.e. if G has a rule A -> w B...