8 Find CFGs that for these regular languages over the alphabet a, b. Draw a Finite...
This is from CS 4110 1. Find CFGs that generate these regular languages over the alphabet 2 - la bl: (i) The language defined by (aaa + b)*. (iv) All strings that end in b and have an even number of b's in total (vi) All strings with exactly one a or exactly one b.
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...
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....
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.
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)
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.
Please Answer Question#02 Solution of Question 1 is attached. Solution of Questions #01 Please do Questions #01 As soon as possible. = {a, b} will be used for all of the following exercises. The alphabet 1. Give regular expressions which exactly define the following languages. [7 marks] (a) L1 which has exactly one b but any number of as. (b) L2 which has an even number of as and an even number of bs. [7 marks] (c) L3 which contains...
(a, b): 3. Construct (draw) finite automata for the following regular expressions over the alphabet ? (b) a'b
2. Find a CFG for the language of words, over alphabet 2 - (a,bl, where th two letters are different from the last two letters (first two letters are the same, likewise last two letters are the same), i.e. if it start with aa it will end with bb and vice versa. (10 points) first
3. For each of the following languages, . State whether the language is finite or infinite. . State whether the language is regular or nonregular. . If you claim the language is regular: give a DFA (graphical representation) that recog- nizes the language. . If you claim that the language is not regular, describe the intuition for why this is so. Consider the following languages (a) [8 marks] The language of 8 bit binary strings that begin and end with...