Answer: option b is correct.
Note: my friend if you have any questions or queries just simply comment below. I will sort out your queries. Thank you my friend.
Consider the following DFA: А B Which of the following rules does NOT belong to the...
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. Let Σ = {a, b}, and consider the language L = {w ∈ Σ ∗ : 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 n b 2n : n ≥ 0} = {λ, 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...
4. Consider two grammars Gi and G2 over the alphabet (a, b], with respective start symbols E and I and specified by the respective sets of production rules below: EFab (a) Do the two grammars generate the same language? If they do, briefly argue why. If they do not, provide a counter-example, that is, a word generated by one, but not by the other (b) The grammar G2 is unnecessarily complicated. Write a grammar that generates the same language generated...
Consider the following grammar G, whose productions rules are the following (an upper case letters represents a nonterminal symbol, a lower case letter represents a terminal symbol). Untitled Note Eile Edit Format View Help S -asCB A b A -aA C B d A Which of the following sentences are in the language generated by the grammar G? |Untitled - Notepad X Eile Edit Format View Help А. асcbd B. abcd c. acccbcc D. acd Е. ассс F. CCC G....
Consider the following BNF grammar: S ::= A x | B y A ::= B y | C w B ::= x | B w C ::= y Which of the following regular expressions describes the same set of strings as the grammar? 1. xwxy + xww∗y + ywx 2. xwx + xww∗y + yw 3. xw∗y + xwxyx + ywx 4. xwy + xw∗xyx + ywx 5. xw∗y + xw∗yx + ywx 6. none of the above 7. all...
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...
Please answer any 7 of them ТОС Answer any 7 from the followings: 1. Regular expression to NFA: i) ab(aUb)* ii) (aba U a)*ab 2. Explain and construct a generalized NFA, 3. NFA to regular expression 0 3 91 93 8 a 4. DFA to regular expression 011 5. Explain the rules of pumping lemma briefly with an example. 6. Give an example of right linear grammar and left linear grammar. 7. L(G) = {1*20 m >= 1 and >=1}....
I need help with that 5. Let Σ-ta, b). Write the δ function for the following (1) dfa (δου'Qu Σ-Q) and (2) nfa (5,ra : Q x (BU {λ)) → P(D) respectively. 92 92 6. Give the languages accepted by the dfa and nfa in the above 6 (1) and 6(2), respectively 7. (1) When is a language L called as regular? (2) (i) Prove language L = {а"wb: we {a, b) *,n2 O} įs regular by design an nfa...
1(a)Draw the state diagram for a DFA for accepting the following language over alphabet {0,1}: {w | the length of w is at least 2 and has the same symbol in its 2nd and last positions} (b)Draw the state diagram for an NFA for accepting the following language over alphabet {0,1} (Use as few states as possible): {w | w is of the form 1*(01 ∪ 10*)*} (c)If A is a language with alphabet Σ, the complement of A is...