(9) For each of the following languages L, give a simple English
description. Show two strings that are in L and two that are not
(unless there are fewer than two strings in L or two not in L, in
which case show as many as possible).
• L = {ω ∈ {a,b}∗| exactly one prefix of ω ends in a }.
• L = {ω ∈ {a,b}∗| all prefixes of ω end in a }.
• L = {ω ∈ {a,b}∗|ω = axa,x ∈ {a,b}+}.
1. Only one a is in the language
In language
-> a
-> bba
Not in language
-> aa
-> baba
2. Strings having only a's
In language
-> a
-> aa
Not in language
-> ab
-> baba
3. Strings that start and end with a
In language
-> aaa
-> aba
Not in language
-> ab
-> baba
--------------------------------------
Hit the thumbs up if you are fine with the answer. Happy
Learning!
(9) For each of the following languages L, give a simple English description. Show two strings...
2. Give the first five strings in L-ordering for each of the following languages over 2 - {0,1}. If there are fewer than five strings, give the entire language instead: Let L1= {0, 11, 101) Let L2 = {€, 0,10 a) LUL b) L2-L2 c) L L2 d) L22
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”...
4) For the alphabet S={a, b}, construct an FA that accepts the following languages. Show all of your work. (a) L = {all strings with exactly one b}. (b) L = {all strings with at least one a}. (c) L = {all strings with no more than three b's}.
4) (9 pts) Give regular expressions for the following languages on (la, b) a) L1 = { w : na(w) mod 3 = 1). b) L2w w ends in aa) c) L3 = all strings containing no more than three a's.
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...
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)...
4) For the alphabet S={a, b}, construct an FA that accepts the following languages. (d) L= {all strings with at least one a and exactly two b's} (e) L= {all strings with b as the third letter} (f) L={w, |w| mod 4 = 0} // the cardinality of the word is a multiple of 4
For context the class is about Automata, Computability, and
Formal Languages
I just need parts b & e done
14. Find grammars for E = {a, b} that gener- ate the sets of (a) all strings with exactly two a's. (b) all strings with at least two a’s. (c) all strings with no more than three a's. (d) all strings with at least three a’s. (e) all strings that start with a and end with b. (f) all strings with...
(9 pts 3 pts each) For each of the following languages, name the least powerful type of machine that will accept it, and prove your answer. (Hint: a finite state automata is less powerful than a pushdown automata, which in turn is less powerful than a Turing Machine.) For example, to prove a language needs a PDA to accept it, you would use the Pumping Lemma to show it is not regular, and then build the PDA or CFG that...