Question text is in black, my answers in blue.
L(G) can be any language that contains the empty string. The statement "G generates ε" doesn't say anything about what else G might or might not generate. If Sipser had meant "G generates ε, and does not generate any other string", he would have said that.
You reject in both those cases. It says that an input is in the language if u is a number in the range from 1 through m, and the string wu is equal to v. If u is not in the range from 1 through n, this compound statement is not true, and you should reject.
Note that, as mentioned in lecture this morning, u might have leading zeros -- for example, if u = 000100, then you want to check whether v is equal to w4. If you want to reject in the case where u has leading zeros, I don't mind, but I don't see that this makes the TM any simpler. I think you probably want to run a binary counter going downward in the place where u is, and as you count down you will develop leading zeros even if you didn't have them before...
How about some examples?
Sure. You should accept "1#01#01" because u = 1 and v = w1. But you should reject "1#01#1" because "01" and "1" are not the same string even though they represent the same number. You should reject "10#01#01" because here u = 2 and there is no string w2 -- u is out of range.
Last modified 9 March 2010