L = {w|w contains the substring bab}
give the regular expression that describes L
are the 2 languages L and L* the same language?
Is L(aba)* a regular language?
a) Regular expression is:(a+b)*bab(a+b)*
b) Regular languages are closed under closure, hence L and L* are same language
c) Yes,L(aba)* is a regular language which can be represented as below finite automata:
L = {w|w contains the substring bab} give the regular expression that describes L are the...
Construct a regular expression that defines the language L (say) containing all the words with either exactly one aba-substring or exactly one bab-substring but not both aba- and bab-substrings. (Hint: For example, the word abab does not belong to L.)
given ∑ = {a,b}: 1. describe in English the languages denoted by the regular expression: (a+b)*b(a+b)* 2. Write a regular expression: L(w) = {w | w has exactly a single substring abaa or exactly a single substring babb} 3. Write a regular expression for the following language: L(w) = {w | w ends in bb and does contain the substring aba}
Give a regular expression for each of the following languages. e. {axb | x∈{a, b}*} f. {(ab)n } g. {x ∈ {a, b}* | x contains at least three consecutive as} h. {x ∈ {a, b}* | the substring bab occurs somewhere in x} i. {x ∈ {a, b}* | x starts with at least three consecutive as}
Let L = { w∈ {a, b}∗|w has even length and contains the substring aba } Design NFA.
Give the regular expressions of the following languages (alphabet is ab): a. {w | w has a length of at least three and its second symbol is a b} b. {w | w begins with an a and ends with a b} c. {w | w contains a single b} d. {w | w contains at least three a's} e. {w | w contains the substring baba} d. {w | w is a string of even length} e. The empty...
Write a legal regular expression for the following regular language. L = { w | w ∊ (0 + 1)* and w contains an even number of 1’s AND an even number of 0’s}.
Give cfg for the following language over {0,1} {w | w contains the substring 011}
determine if the language is regular, context-free, Turing-decidable, or undecidable. For languages that are regular, give a DFA that accepts the language, a regular expression that generates the language, and a maximal list of strings that are pairwise distinguishable with respect to the language. For languages that are context-free but not regular, prove that the language is not regular and either give a context- free grammar that generates the language or a pushdown automaton that accepts the language. You need...
Give a regular expression for these languages i) {w| w is a word of the alphabet = {0,1} that represents an integer in a binary form that is a multiple of 4} ii) {w belongs to {0,1,2}* | w contains the string ab exactly 2 times but not at the end} iii) { w belongs to {0,1,2}* | w=uxvx that x belongs to {0,1,2} u,v belongs to {0,1,2}* and there isn't any string y in the sequence v that x<y}
1. Design an NFA (Not DFA) of the following languages. a) Lw E a, b) lw contain substring abbaab) b) L- [w E 10,1,2) lsum of digits in w are divisible by three) c) L-(w E {0,1,2)' |The number is divisible by three} d) The language of all strings in which every a (if there are any) is followed immediately by bb. e) The language of all strings containing both aba and bab as substrings. f L w E 0,1every...