Languages generated by kleene star are always ______________.
- AFinite
- BInfinite
- CSometimes finite & sometimes infinite
- DNone of the these
As taught, the closure of a set with a non-null string contains infinitely many strings.
MCQs, short and long questions from lecture 2.Lecture 2 ki MCQs, short aur long sawal.
4 MCQs · 4 short · 1 long question · 4 MCQs from past papers4 MCQs · 4 short · 1 long sawal · 4 MCQs past papers se
Languages generated by kleene star are always ______________.
As taught, the closure of a set with a non-null string contains infinitely many strings.
Let S = {aa, bb} be a set of strings then s* will have
S* always contains Λ, and the other strings cannot be split into aa and bb.
If S = {aa, bb}, then S* will not contain..
aaabbb has an odd run of a's, so it cannot be built from aa and bb.
S = {baa, ab}, then S* will not contain
abbaab splits as ab, baa and a leftover b, so it is not in S*; the others can be split.
No MCQs match this filter.Is filter mein koi MCQ nahi.
Is Kleene's star & Kleene's closure are different?
No. Kleene star and Kleene closure are two names for the same operation: S* is the set of all strings formed by concatenating any number of strings of S, including Λ.
What is meant by Kleene star closure of a language?
For a language (or set of strings) S, the Kleene star closure S* is the set of all strings formed by concatenating any finite number of strings of S, including the null string Λ. For an alphabet Σ, Σ* is the set of all strings over Σ.
Consider the language S*, where S = {ab, ba}. Can any word in this language contain the substrings aaa or bbb? Why or why not?
No. Each factor ab or ba contains one a and one b. Two equal letters can only be next to each other across the boundary of two factors (the last letter of one and the first letter of the next, as in ba·ab or ab·ba), so a run of the same letter has length at most 2. Hence aaa and bbb never occur.
Give an example of a set S such that S* only contains all possible strings of a's and b's that have length divisible by 3
S = {aaa, aab, aba, abb, baa, bab, bba, bbb}, all 8 strings of length 3. Every word of S* is a sequence of such blocks, so its length is a multiple of 3, and every string over {a, b} with length divisible by 3 splits into these blocks.
(i) Let S = {ab, bb} and let T = {ab, bb, bbbb}. Show that S* = T*. (ii) Let S = {ab, bb} and let T = {ab, bb, bbb}. Show that S* ≠ T*. (iii) What principle does this illustrate?
(i) S ⊆ T, so S* ⊆ T*. The only word of T not in S is bbbb = (bb)(bb), which is in S*; so T ⊆ S* and therefore T* ⊆ S*. Hence S* = T*. (ii) bbb is in T* (it is in T). It is not in S*: a word of S* starting with b must start with bb, and the remaining b cannot be formed from ab or bb. So S* ≠ T* (though S* ⊆ T*). (iii) Adding to S words that can already be formed from S does not change S*; in general S* = T* exactly when S ⊆ T* and T ⊆ S*.