Give a regular expression for these languages
i) {w| w is a word of the alphabet = {0,1} that represents an integer in a binary form that is a multiple of 4}
ii) {w belongs to {0,1,2}* | w contains the string ab exactly 2 times but not at the end}
iii) { w belongs to {0,1,2}* | w=uxvx that x belongs to {0,1,2} u,v belongs to {0,1,2}* and there isn't any string y in the sequence v that x<y}
i)
It accepts all the binary multiples of 4
ii)
It accepts all strings with exactly two ab and not ending in ab
iii)
Here x will not be less than any string y in v
Give a regular expression for these languages i) {w| w is a word of the alphabet...
Give a regular expression generating the following languages over the alphabet {a,b}: {w | w is any string except aa and bbb}
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...
Create DFA : a)L={w| w is a word that begins with 1 or 2,finishes with 2 or 3 and the number of the other symbols is even} alphabet={1,2,3}. b)L={w| w is a word that represents an integer in a binary form and when is divided by 4 the remaining is 3 (number&4=3)} alphabet={0,1} c)L={w| w is a word where every a is followed either from an odd number of b or from an odd number of c} alphabet={a,b,c} d)L={w| w...
Give regular expressions generating the languages of 1. {w over the alphabet of {0, 1} | w is any string except 11 and 111} 2. {w over the alphabet of {0, 1} | w contains at least two 0’s and at most one 1} 3. {w over the alphabet of {0, 1} | the length of w is at most 9} 4. {w over the alphabet of {0, 1} | w contains at least three 1 s} 5. {w over...
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)
Automata question Categorize the languages as I. Type 0 or Recursively Enumerable Languages II. Type 1 or CSL III. Type 2 or CFL IV. Type 3 or Regular in accordance to the Chomsky hierarchy (select only one of the answers designating the lowest level - Note that Type 3 is the lowest level and Type 0 is the highest level) over the alphabet {0,1} L = {0n10k |k, n is any integer} i think its type 0.. am i right ?...
Construct DFA's that recognize the following languages over the alphabet {a,b}: 1. {w|w is any string except abba or aba}. Prove that your DFA recognizes exactly the specified language. 2. {w|w contains a substring either ababb or bbb}. Write the formal description for this DFA too.
1. (Decidable languages) (c) (Prefix of a generated string) A string w is called a prefix of string s if s starts with w. i. Give a regular expression for all strings over alphabet Σ for which w is a prefix. ii. Let L = {(G, w) | G is a CFG, w is a string, and w is a prefix of some string s generated by G}.
(a) Give 2 strings that are members of language specified by the regular expression (0+ 1)∗ but are not members of the language specified by 0∗ + 1∗ . Then give 2 strings that are members of both languages. Assume the alphabet is Σ = {0, 1}. (b) For each of the following languages specified by regular expressions, give 2 strings that are members and 2 strings that are not members (a total of 4 strings for each part). Assume...
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...