Provide a regular expression for the set of strings over {a, b, c} such that the number of a’s equals the number of b’s and is less than or equal to 2.
Provide a regular expression for the set of strings over {a, b, c} such that the...
1. Give a regular expression for the set of strings over {a, b, c} such that the sum of the number of a’s and the number of b’s is equal to 3.
Basic compiler question: Construct a regular expression for the regular language representing the set of strings where the number of b’s is a multiple of 3 and there can be any number of a’s. The alphabet is {a,b}
Provide a regular expression for the following languages: (a) the set of all strings over {a, b} that start with ab and end with ba, (b) the set of strings over {a, b} where four consecutive occurrences of both letters occur in every word.
Give regular expressions for the following languages: (a) The language of all strings over {a,b} except the empty string. (b) The language of all strings over {a,b} that contain both bab and bba as substrings. (c)L k = {w ∈ {a,b} * | w contains a substring having 3 more b’s than a’s}. (d) The language of all strings over {a,b} that have a b in every odd position (first symbol is considered position 1; empty string should be accepted)...
****** Theory of Computing ********* 1. Provide a regular expression for “all even length strings of b’s”. 2. List all words of length 4 in Language((a+b)* a). Also, provide an English description of this language.
1. Write DFA, NFA (small), regular expression and right linear grammar for strings over {a,b} a. End in either aa or bb b. ( an | bna) n >= 0 c. {w : w such that w contains the substring “bb” or w contains an odd number of a’s (or both). d. {w : w does not contain exactly two a’s} e. { w : w starts with substring abb and contains substring bba}
Write a regular expression that captures the set of strings composed of 'a', 'b', and 'c', where any string uses at most two of the three letters (for example, "abbab" is a valid string, or "bccbb", or "ccacaa", but not "abccba": strings that contain only one of the three letters are also fine). Give a non-deterministic finite automaton that captures the regular expression from Using the construction described in class, give a deterministic version of the automaton. Repeat the previous...
For each problem below (except #8), show a regular expression representing the described set. The set of strings over {c, l, e, a, n} with length less than 5. The set of strings over {c, l, e, a, n} with length greater than 7 If you take the union of the regular expressions from the previous two problems, how many strings more does the corresponding set need to contain all of Σ* , where Σ = {c, l, e, a,...
Provide regular expressions for the following languages: a.) The set of strings over {0,1} whose tenth symbol from the right end is 1. b) The set of strings over {0,1} not containing 101 as a sub-string. ***IMPORTANT: PLEASE SHOW ALL WORK AND ALL STEPS, NOT JUST THE ANSWERS!!!
Write down the regular expressions for the following set of strings over {a, b}: 1.Strings that contain no more than one occurrence of the string aa. 2.All strings containing aba: 3.All strings of odd length 4.A string in this language must have at least two a's. 5.All strings that begin with a, and have an even number of b Bonus - All strings with “a” at every odd position