Consider the language S*, where S = {aa abba bbaa}. Which one of the following words is not in the language?
1. abbaaa
2. bbaabba
3. aabbaaaa
4. abbabbaaabba
Answer:-
From the given data we can say that option 2 is not
in the language
i.e; (2) bbaabba
Clarification:-
We know that all other strings are in S*(means those are generated
by aa abba bbaa)
then,
abbaaa = abba aa
aabbaaaa = aa bbaa aa
abbabbaaabba = abba bbaa abba
For any quires please do comment in the comment box below. Hope it will helps you. Please give Thumbs Up!! Thank you for posting the question, All the best.
Consider the language S*, where S = {aa abba bbaa}. Which one of the following words...
Consider the following grammar for a language, where a and b are called terminals while <S>, <A> and <B> are called non-terminals, where <S> is the starting entity, i.e., from which we generate strings. The goal is to generate a sequence of as
QUESTION 8 For the following equation, solve for the language L. {a, aa, ab} L = {ab,aab,abb, aa aaa, aba} O L = {bb,aa,a} O L = {b,a} O L = {b,aa} L = {4,b,a} QUESTION 9 Consider the regular expression (a+ab)*(b+ab)* Which of the followings
4. Consider the following context-free grammar S SSSS a (a) Show how the string aa+a* can be generated by this grammar (b) What language does this grammar generate? Explain
2. Find a CFG for the language of words, over alphabet 2 - (a,bl, where th two letters are different from the last two letters (first two letters are the same, likewise last two letters are the same), i.e. if it start with aa it will end with bb and vice versa. (10 points) first
= {a,b}: 1. (9 pts) Consider the following three languages, all subsets of S* where • L = {w w is a word such that we is divisible by 3). . L2 = {w w is a word whose length is divisible by 4 }. • L3 = {w w is a word such that wla >3}. (a) For each language construct a DFA that recognizes that language. (b) Construct an automaton that recognizes Lin L2. If the constructed automaton...
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...
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...
Consider the following grammar (S, A, B, and C are nonterminal symbols; S is the start symbol; 0 and 1 are terminal symbols): S → AA A → BCB B → B0 | B1 | 0 | 1 C → 00 | 11 Which of the following sentences are in the language generated by the grammar? Show derivations for the sentences that can be generated. If a sentence cannot be generated by the grammar, explain why. a) 10010001 b) 01101101...
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}
3 points) Question Three Consider the context-free grammar S >SS+1 SS 1a and the string aa Give a leftmost derivation for the string. 3 points) (4 poiots) (5 points) (3 points) sECTION IWOLAttcmpt.any 3.(or 2) questions from this.scction Suppose we have two tokens: (1) the keyword if, and (2) id-entifiers, which are strings of letters other than if. Show the DFA for these tokens. Give a nightmost derivation for the string. Give a parse tree for the string i) Is...