I need help with a couple HW questions I got for my models of computation course. I read the relevant chapters in the text (Michael Sipser’s Introduction to the Theory of Computation), but I feel like these HW questions necessitate knowledge the book hasn’t given me… The first question is this:
(1) Prove that there does not exist a language L such that L* = {a}* {b}*
The hint is to use contradiction.
Obviously the right side is a regular expression; zero or more a’s followed by zero or more b’s. This could also be the empty string epsilon.
My trouble comes in with the L*. I have absolutely no clue what a * applied to a language does, or how to work with this equation because of the * on the language L.
Any help, or resources for this question would be appreciated.
=====
The second question is easier, and I feel like I can almost do it. I can justify it to myself, so I guess the problem is writing it formally. The second question is this:
(2)
Prove that if A and V are languages over the same alphabet (sigma) and A (is a subset of) B, then A* (is a subset of) B*.
The hint is to use induction.
Now obviously (for example) if sigma = {1, 0}
and A = {00, 01, 10, 11}
and B = {00, 01, 10, 11, 100, 101, 110, 111}
Then anything in A* is closed under B* because B = A + some other things… If someone could help me formalize this into an inductive form I’d appreciate it.
Thanks
(1) Here’s a useful recursive definition of
L*:L*xis inL,xis inL*xandyare inL*, so isxyL*is the smallest language satisfying 1. – 3. for a givenLGiven this definition, here’s a proof by contradiction: suppose
R* = a*b*. Thenabis inR*. By 3.,ababmust also be inR*. But thenR* != a*b*, a contradiction. SoR* = a*b*must be false; in other words, for no languageRisR* = a*b*.The intuition is pretty easy:
L*is the language of all strings that can be formed by concatenating zero or more (with repeats allowed) strings fromL. The recursive definition works by allowing for zero strings (in 1.), strings taking exactly one string fromL(in 2.), and strings formed by joining potentially many strings fromL(in 3.).(2) Using the definition I give above, we proceed inductively on the number of concatenated strings in
A*. For 0 concatenations, the empty string is in bothA*andB*, so we’re good (see rule 1.). For 1 concatenation, sinceAis a subset ofB, strings inAwill be inA*(see rule 2.), and stringsfromBwill be inB*(same rule), so all strings taking one concatenation inA*are also inB*. Now, assume that all strings takingkconcatenations inA*are also inB*. What about strings takingk+1concatenations inA*? Well, these are formed using rule 3. on stringsxandyinA*taking strictly less thank+1concatenations, i.e., at mostkconcatenations. In other words, any string inA*takingk+1concatenations can be rewritten asxy, wherexandyare inA*, andxandytake at mostkconcatenations. Since all strings inA*taking at mostkconcatenations are also inB*(by our hypothesis), we have thatxandyare in B*. By rule 3.,xymust also be inB*. Therefore, strings takingk+1concatenations inA*must also belong toB*. This completes the proof.Note: this glosses over some details and isn’t terribly formal, but you should get the idea and hopefully be able to shape it up. If you need something more polished than this, let me know, and I can try to work with you on it.