Please answer True or False on the following: 1. Consider the language L = a^n b
ID: 3785683 • Letter: P
Question
Please answer True or False on the following:
1. Consider the language L = a^n b^(n+1). This languages consists of all strings over the alphabet = { a, b } consisting of some number n of a’s, where n >= 0, followed by (n+1) b’s. Let w = . Is w L^* ? (that is, is w an element of the Kleene closure of L?)
2. Consider the language L = a^n b^(n+1). This languages consists of all strings over the alphabet = { a, b } consisting of some number n of a’s, where n >= 0, followed by (n+1) b’s. Let w = ab. Is w L^* ? (that is, is w an element of the Kleene closure of L?)
3. Consider the language L = a^n b^(n+1). This languages consists of all strings over the alphabet = { a, b } consisting of some number n of a’s, where n >= 0, followed by (n+1) b’s. Let w = baaba. Is w L^* ? (that is, is w an element of the Kleene closure of L?)
4. Consider the language L = a^n b^(n+1). This languages consists of all strings over the alphabet = { a, b } consisting of some number n of a’s, where n >= 0, followed by (n+1) b’s. Let w = aaabbbb. Is w L^* ? (that is, is w an element of the Kleene closure of L?)
5. Consider the language L = a^n b^(n+1). This languages consists of all strings over the alphabet = { a, b } consisting of some number n of a’s, where n >= 0, followed by (n+1) b’s. Let w = abbaabbbabb. Is w L^* ? (that is, is w an element of the Kleene closure of L?)
6. Consider the language L = a^n b^(n+1). This languages consists of all strings over the alphabet = { a, b } consisting of some number n of a’s, where n >= 0, followed by (n+1) b’s. Let w = aabbbabb. Is w L^* ? (that is, is w an element of the Kleene closure of L?)
Explanation / Answer
Solution 1) TRUE
Reason:for n=0 , w= will come
Solution 2) FALSE
Reason: the length of 'a' and 'b' are never same like 'ab', Hence this is false
Solution 3) FALSE
Reason: 'b' cannot come before 'a', first n times 'a' come followed by n+1 times 'b' will come.
Solution 4) TRUE
Reason: for n=3, w=aaabbbb will come.
Solution 5) FALSE
Reason: first n times 'a' come followed by n+1 times 'b' will come.
Solution 6) FALSE
Reason: first n times 'a' come followed by n+1 times 'b' will come.
Explanation:
the strings generated with the given language L = an b(n+1), where n>=0 are:
when n=0, w=
when n=1, w=abb
when n=2, w=aabbb
when n=3, w=aaabbbb
when n=4, w=aaaabbbbb and so on..
Here, we see that the number of b's are always one more than the number of a's and also 'b' always follows 'a'.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.