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 string
f. The empty language
a) (a+b) * b (a+b) *
b) a (a+b) * ab
C) a* b a*
d) (a+b) * aaa (a+b) *
e) (a+b)*(abba)(a+b)*
F) (aa + bb +ba +ab) *
Give the regular expressions of the following languages (alphabet is ab): a. {w | w has...
Give regular expressions generating the languages of 1. {w over the alphabet of {0, 1} | w is any string except 11 and 111} 2. {w over the alphabet of {0, 1} | w contains at least two 0’s and at most one 1} 3. {w over the alphabet of {0, 1} | the length of w is at most 9} 4. {w over the alphabet of {0, 1} | w contains at least three 1 s} 5. {w over...
Regular expressions, DFA, NFA, grammars, languages Regular Languages 4 4 1. Write English descriptions for the languages generated by the following regular expressions: (a) (01... 9|A|B|C|D|E|F)+(2X) (b) (ab)*(a|ble) 2. Write regular expressions for each of the following. (a) All strings of lowercase letters that begin and end in a. (b) All strings of digits that contain no leading zeros. (c) All strings of digits that represent even numbers. (d) Strings over the alphabet {a,b,c} with an even number of a's....
Question 1 - Regular Expressions Find regular expressions that define the following languages: 1. All even-length strings over the alphabet {a,b}. 2. All strings over the alphabet {a,b} with odd numbers of a's. 3. All strings over the alphabet {a,b} with even numbers of b’s. 4. All strings over the alphabet {a,b} that start and end with different symbols. 5. All strings over the alphabet {a, b} that do not contain the substring aab and end with bb.
4. A regular expression for the language over the alphabet fa, b) with each string having an even number of a's is (b*ab*ab*)*b*. Use this result to find regular expressions for the following languages a language over the same alphabet but with each string having odd number of a's. (3 points) a. b. a language over the same alphabet but with each string having 4n (n >- 0) a's. (3 points)
The pumping lemma for regular languages is Theorem 1.70 on page 78 of the required text. Definition: w is a string if and only if there exists an alphabet such that w is a string over that alphabet. Note: For every alphabet, the empty string is a string over that alphabet. Notation: For any symbol o, gº denotes the empty string, and for every positive integer k, ok denotes the string of length k over the alphabet {o}. 1) (20%]...
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}
Give regular expressions describing each of the following regular languages over Σ = {0,1}: {w : w begins and ends with the same symbols} show work!
1. (a) Give state diagrams of DFA’s recognizing the following languages. That alphabet is Σ = {a,b} L1 = {w | w any string that does not contain the substring aab} L2 = {w | w ∈ A where A = Σ*− {a, aa, b}} 2. (a) Give state diagrams of DFA’s recognizing the following languages. The alphabet is {0, 1}. L3 = {w | w begins with 0 ends with 1} (b) Write the formal definition of the DFA...
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...
4) (9 pts) Give regular expressions for the following languages on (la, b) a) L1 = { w : na(w) mod 3 = 1). b) L2w w ends in aa) c) L3 = all strings containing no more than three a's.