Consider L = {ab, aa, baa}. Which of the following strings is NOT in L*?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. baaaaabaaaaa
Explanation
B = ab·aa·baa·ab·aa, C = aa·aa·baa·aa, D = baa·aa·ab·aa. In A, the b at position 7 must start 'baa' (leaving 'aaa' before it) or end 'ab' (leaving five a's after it). Either way an odd run of a's remains, so A ∉ L*.More Theory of Computation and Compilers questions
- Consider the NPDA M = ({q0, q1, qf}, {a, b}, {1, z}, δ, q0, z, {qf}) with δ(q0, λ, z) = {(qf, z)} δ(q0, a, z) = {(q1, 11z)} δ(q1, a, 1) = {…
- Consider two instances X and Y of the Post Correspondence Problem, each with lists A and B of three strings over {0, 1}. Which of the follo…
- Consider the following properties of recursively enumerable sets: (A) Finiteness (B) Context-freedom (C) Emptiness Which of the following i…
- Consider the grammar S → SbS | a and the string abababa. Consider the statements: the string has (A) two parse trees (B) two leftmost deriv…
- Match List I with List II. Choose the correct answer from the options given below:List I List II A. Type 0 I. Finite automata B. Type 1 II.…
- Consider the following statements: Statement I: An LALR parser is more powerful than a canonical LR parser. Statement II: An SLR parser is…