Here are questions and answers on HW#2, due Wed 8 October 2003. Questions are in black, answers in blue.
I have a question on r.e sets (languages) :
When we list W0,W1,W2... as all r.e. languages and say Wi = {n | Mi(n) = 1} does it mean the following:
Wi is an r.e. language such that for all strings 'n' in Wi, there exists a TM Mi, which on input 'n', halts and outputs a 1 on the tape ELSE if 'n' not in Wi, Mi is undefined (i.e. does not halt and loops forever)
You have switched the order of quantifiers. Correct is:
"W_i is the language such that there exists a machine M_i
such that for all strings n, M_i halts on input n and outputs
a 1 if n is in W_i and M_i does not do so if n is not in W_i."
Do you see the difference between this and what you said?
We will study the order of quantifiers in more detail in the
logic part of the course but as you see here it's important
to be clear on it to get anywhere with this definition.
If n is not in W_i, all we know is that M_i on input n does
not halt with a 1. It might halt with some other output or
not halt at all.
Then consequently what does it mean when we say K = {n | n in Wn} ?
K is the set of all strings n such that M_n halts on input n with output 1. Here "n" is both an input string and the name of a Turing machine -- the fact that n can be used in both ways at the same time is in some sense why the Halting Theorem works.
What is the difference between Mn(.), Mn(x)and Mn(N) ? where Mn is the TM number n?
Mn(x) is the result, if any,
of running Mn on the string/number x.
Mn(.) is the function taking x to Mn(x).
Mn(N) is the set of all results
Mn(x) over all possible strings/numbers x.
Last modified 2 October 2003