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 or NFA to recognize the languages described in each part of problem 1.
3. (a) Show the NFA that results from applying the standard construction to the regular expression letter(letter|digit)∗.
(b) Convert your NFA to a DFA
1. Write regular expressions to capture the following regular languages: (a) The set of binary 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....
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.
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
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
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!!!
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.
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”...
Answer these questions Construct regular expressions for the following languages: i. Even binary numbers without leading zeros ii, L-(a"b"(n + m) is odd) ii L fa"b"l. n 2 3, m is odd) ni m.
1. Design an NFA (Not DFA) of the following languages. a) Lw E a, b) lw contain substring abbaab) b) L- [w E 10,1,2) lsum of digits in w are divisible by three) c) L-(w E {0,1,2)' |The number is divisible by three} d) The language of all strings in which every a (if there are any) is followed immediately by bb. e) The language of all strings containing both aba and bab as substrings. f L w E 0,1every...
UueSLIORS! 1. Find the error in logic in the following statement: We know that a b' is a context-free, not regular language. The class of context-free languages are not closed under complement, so its complement is not context free. But we know that its complement is context-free. 2. We have proved that the regular languages are closed under string reversal. Prove here that the context-free languages are closed under string reversal. 3. Part 1: Find an NFA with 3 states...