************Theory of Computing *****************
1. Generate a regular expression of “all words over the alphabet Σ = {a b} that either begin with a and end with b OR begin with b and end in a.” Thus, the first few shortest words in this language are “ab” “ba” “aab” “baa” “abb” “bba” “aaab” etc. So, if a word begins with a it must in end b, and if it begins with b it must end in a.
2. Consider the language “all words that can be constructed from the alphabet Σ = {a b} that contain exactly two b’s.”
a. List the four shortest words in the language
b. Generate a regular expression that for this language.
************Theory of Computing ***************** 1. Generate a regular expression of “all words over the alphabet Σ...
• Build an FA that accepts the language of all words with only a’s or only b’s in them. For example, a, aa, aaa, b, bb, bbb, etc are in the language, while null string, ab, ba, aab, aba, bab, bba, baa, etc are not in the language. • Give a regular expression for this language.
****** 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.
Find a regular expression for the following language over the alphabet Σ = {a,b}. L = {strings that begin and end with a and contain bb}.
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...
(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...
4.[10 points] Let A be the language over the alphabet E-(a, b} defined by regular expression (ab U b)*a U b. Give an NFA that recognizes A. Draw an NFA for A here. 4.[10 points] Let A be the language over the alphabet E-(a, b} defined by regular expression (ab U b)*a U b. Give an NFA that recognizes A. Draw an NFA for A here.
4(10 points] Let A be the language over the alphabet -(a, b) defined by regular expression (ab Ub)aUb. Give an NFA that recognizes A. Draw an NFA for A here 5.10 points] Convert the following NFA to equivalent DFA a, b 4(10 points] Let A be the language over the alphabet -(a, b) defined by regular expression (ab Ub)aUb. Give an NFA that recognizes A. Draw an NFA for A here 5.10 points] Convert the following NFA to equivalent DFA...
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)
Give a regular expression that generates C In certain programming languages, comments appear between delimiters such as /# and #. Let C be the language of all valid delimited comment strings. A mem- ber of C must begin with /# and end with #/ but have no intervening #. For simplicity, assume that the alphabet for Cis Σ {a, b, /
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.