Draw an FSA corresponding to both of the following regular expressions (assume the alphabet is a,b,c):
(1.1.1) ([ac] + b?)+
(1.1.2) (ccab?)+
Draw an FSA corresponding to both of the following regular expressions (assume the alphabet is a,b,c):...
(a, b): 3. Construct (draw) finite automata for the following regular expressions over the alphabet ? (b) a'b
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.
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.
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...
1. Construct a DFA for each of the following regular expressions: a) ab + c b) a*b + c c) ab*c*+ ac 2. Construct an NFA for the following regular expression: a) (a + b)*ab b) a*b* c) a*b* + c d) a* + b* e) a* + b* + ac*
the following grammar generates all regular expressions over the alphabet of letters (we have used quotes to surround operators, since the vertical bar is an operator as well as a metasymbol): rexp->rexp “|” rexp | rexp rexp | rexp “*” | “(” rexp “)” | letter a. give a derivation for the regular expression (ab|b)* using this grammar. b. show this grammar is ambiguous c. Rewrite this grammar to establish the correct precendences for the operators. d. What associativity does...
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)
Find regular expressions for the languages accepted by the following automata(b and c) (b) (c)
Exercise 3.1.1: Write regular expressions for the following languages: * a) The set of strings over alphabet {a,b,c} containing at least one a and at least one b. b) The set of strings of O's and l’s whose tenth symbol from the right end is