Construct NFAs for the following languages:
1. The set if binary strings such that the number of 0's is a multiple of 3 or the number of 1's is a multiple of 5.
2. The set of all binary strings containing 101 or 100 as substring
3. The set of all strings such that the 12th symbol from the right end is 0
Construct NFAs for the following languages: 1. The set if binary strings such that the number...
Construct NFA that recognizes following languages, and then construct DFAs from all three NFAs that were constructed. 1. All binary numbers that contain 00 or 11 2. All binary numbers that contain a 1 in the 3rd location from the right (e.g. 100, 10111, ..) 3. All binary numbers that can be divided by .3
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!!!
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...
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
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...
Design Turing machines for the following languages: a. The set of all strings with an equal number of 0’s and 1’s. b. {an bn cn | n >= 1} c. {wwR | w is any string of 0’s and 1’s}
Express as a set using set-builder notation The set of all binary strings that contain at least one 0 and at least one 1. The set of all binary strings with even length. The set of all binary strings that contain an even number of 1’s. The set of all binary strings that read the same forward and backwards
For each of the following, construct context-free grammars that generate the given set of strings. If your grammar has more than one variable, we will ask you to write a sentence describing what sets of strings you expect each variable in your grammar to generate. For example, if your grammar were: S → EO E → EE CC 0+ EC C+01 We would expect you to say “E generates (non-empty) even length binary strings; O generates odd length binary strings;...
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)...
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”...