Find a regular expression for the following language over the alphabet Σ = {a,b}.
L = {strings that begin and end with a and contain bb}.
L = {Strings that begin and end with 'a' and contain 'bb'}
Strings :-abba, aabba, abbaa, aabbba, aaaabbbba, aabbbbbaa etc....
We need to find regular expression for the given language over the alphabet {a,b}
Regular Expression :- a(a+b)*bb(a+b)*a
From above solution here we have starts with 'a'
and next (a+b)* means it contains a or b
and next bb means it should contain bb in middle of the string.
and next we take (a+b)* as usual.
finally the string ends with a .
so the Final Regular expression for given language is : a(a+b)*bb(a+b)*a
Find a regular expression for the following language over the alphabet Σ = {a,b}. L = {strings th...
Construct a regular expression that recognizes the following language of strings over the alphabet {0 1}: The language consisting of the set of all bit strings that contain two or three symbols.
************Theory of Computing ***************** 1. Generate a regular expression of “all words over the alphabet Σ = {a b} that either begin with a and end with b OR begin with b and end in a.” Thus, the first few shortest words in this language are “ab” “ba” “aab” “baa” “abb” “bba” “aaab” etc. So, if a word begins with a it must in end b, and if it begins with b it must end in a. 2. Consider the...
3) Construct a regular expression defining each of the following languages over the alphabet {a, b}. (a) L = {aab, ba, bb, baab}; (b) The language of all strings containing exactly two b's. (c) The language of all strings containing at least one a and at least one b. (d) The language of all strings that do not end with ba. (e) The language of all strings that do not containing the substring bb. (f) The language of all strings...
Construct regular expressions for the following languages over the alphabet {a, b}: a. Strings that do not begin with an “a”. b. Strings that contain both aa and bb as substrings.
Construct a regular expression that recognizes the following language of strings over the alphabet {0 1}: The language consisting of the set of all bit strings that start with 00 or end with 101 (or both). Syntax The union is expressed as R|R, star as R*, plus as R+, concatenation as RR. Epsilon is not supported but you can write R? for the regex (R|epsilon).
1. L is the set of strings over {a, b) that begin with a and do not contain the substring bb. a. Show L is regular by giving a regular expression that denotes the language. b. Show L is regular by giving a DETERMINISTIC finite automaton that recognizes the language.
John Doe claims that the language L, of all strings over the alphabet Σ = { a, b } that contain an even number of occurrences of the letter ‘a’, is not a regular language. He offers the following “pumping lemma proof”. Explain what is wrong with the “proof” given below. “Pumping Lemma Proof” We assume that L is regular. Then, according to the pumping lemma, every long string in L (of length m or more) must be “pumpable”. We...
Build deterministic finite automata that accepts the following language over the alphabet Σ = {a, b} L= {all strings that end with b}
(a) Give 2 strings that are members of language specified by the regular expression (0+ 1)∗ but are not members of the language specified by 0∗ + 1∗ . Then give 2 strings that are members of both languages. Assume the alphabet is Σ = {0, 1}. (b) For each of the following languages specified by regular expressions, give 2 strings that are members and 2 strings that are not members (a total of 4 strings for each part). Assume...
Construct an DFA automaton that recognizes the following language of strings over the alphabet {a,b}: the set of all strings over alphabet {a,b} that contain aa, but do not contain aba.