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 the alphabet of {0, 1} | w starts with 0 and has odd length, or starts with 1 and has even length}
Give regular expressions generating the languages of 1. {w over the alphabet of {0, 1} | w is any string except 11 and 1...
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...
Give a regular expression generating the following languages over the alphabet {a,b}: {w | w is any string except aa and bbb}
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.
Construct DFA's that recognize the following languages over the alphabet {a,b}: 1. {w|w is any string except abba or aba}. Prove that your DFA recognizes exactly the specified language. 2. {w|w contains a substring either ababb or bbb}. Write the formal description for this DFA too.
Give a DFA for the following language over the alphabet Σ = {0, 1}: L={ w | w starts with 0 and has odd length, or starts with 1 and has even length }. E.g., strings 0010100, 111010 are in L, while 0100 and 11110 are not in L.
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}
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....
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)
1. (Decidable languages) (c) (Prefix of a generated string) A string w is called a prefix of string s if s starts with w. i. Give a regular expression for all strings over alphabet Σ for which w is a prefix. ii. Let L = {(G, w) | G is a CFG, w is a string, and w is a prefix of some string s generated by G}.
Give regular expressions describing each of the following regular languages over Σ = {0,1}: {w : |w| = 3} (PLEASE SHOW WORK)