Give English descriptions of the languages represented by the following regular expressions. The descriptions should be simple, similar to how we have been defining languages in class(e.g., “languages of binary strings containing 0 in even positions. . .”). Note: While describing your language, you don’t want to simply spell out the conditions in your regular expressions. E.g., if the regular expression is 0(0 + 1)∗, an answer of the sort “language of all binary strings that start with a 0” will receive A grade, but an answer of the sort “language of all binary strings where the first symbol is a 0 and it is followed by an arbitrary number of 0s and 1s” will receive a B grade. Note that both are technically correct, but the former one is easier to comprehend. Basically, try to simply the description (without losing precision) to the extent possible.
a) (0* 1* ) * 0000(1+0) *
b) (a + b + c)∗b(a + b + c)∗c(a + b + c)∗ + (a + b + c)∗c(a + b + c)∗b(a + b + c)∗
a) This regular expression generates a language which accepts all string which "can start with repeated sequence of 0s and 1s followed by three 0s and then followed by any number of 0s or 1s".
b) This regular expression generates a language which accepts all string which '"can either start with any number of a's, b's or c's and then followed by b and and again followed by a sequence of any number of a's, b's or c's and then followed by c and finally followed by a sequence of a's, b's or c's" or ""can either start with any number of a's, b's or c's and then followed by c and and again followed by a sequence of any number of a's, b's or c's and then followed by b and finally followed by a sequence of a's, b's or c's".
Give English descriptions of the languages represented by the following regular expressions. The descriptions should be...
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....
1. Write regular expressions to capture the following regular languages: (a) The set of binary strings which have a 1 in every even position. (Note: odd positions may be either 0 or 1.) (b) The set of binary strings that do not contain 011 as a substring. (c) Comments in Pascal. These are delimited by (* and *) or by { and }, and can contain anything in between; they are NOT allowed to nest, however. 2. Write a DFA...
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.
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...
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
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...
3" (25%) Give regular expressions for the following languages on {a, b). (a) L,-(a"b": n 4, m 3) (b) The complement of Li. (c) L- (w: w mod 3 03. Note: lw: the length of w (d) L3 w: |w mod 30 naww) appear) 3" (25%) Give regular expressions for the following languages on {a, b). (a) L,-(a"b": n 4, m 3) (b) The complement of Li. (c) L- (w: w mod 3 03. Note: lw: the length of w...
Give concise word descriptions of the sets denoted by the following regular expressions: (a) (0+1)*010(0+1)* (b) (0 +11)*(1 + λ) (c) 00(11*)(00*) (d) (11 + 111 + 11111)*
Exercise 4.1.1: Prove that the following are not regular languages a) (0"1n|n 2 1). This language, consisting of a string of 0's followed by an cqual-length string of 1's, is the language Loi we considered informally at the beginning of the scction. Here, you should apply the pumping lemma in the proof. b) The set of strings of balanced parentheses. These are the strings of char- acters "(" and " that can appear in a well-formed arithmetic expression *c) O"IO"...
This question deals with NFAs, DFAs, and regular expressions. (a) Using only the symbols described in the lecture slides, write a regular expression that describes all strings over the alphabet Σ = {0,1} that are at are at least four bits long and begin and end with the same bit. (b) Draw a DFA, that accepts strings strings over the alphabet Σ = {0, 1} such that if you read the string from left to right, the difference between the...