-- Apr 15 In-Class Exercise Thread
Let M be a TM that has only {0,1} as its input alphabet and {0,1, □} as its tape alphabet.
To simulate a TM machine P whose input alphabet has k elements where k > 2, we can map each element of P’s input alphabet to a string of 0 and 1 whose length is at most logk.
Best case scenario: P reads 1 input and then advances to the right. To simulate this behavior, M will read logk input and stop.
Worst case scenario: P reads 1 input, overwrite it with a new one, and then goes left. To simulate this behavior, M will read logk input to determine which input of P it is reading, then go back logk squares to the left, then write a new string of logk input, then go back 2logk to the left. The total is 5logk.
Thus, in worst case scenario, P will slow down by the factor of 5logk. In best case scenario, P will slow down by the factor of logk.
Let M be a TM that has only {0,1} as its input alphabet and {0,1, □} as its tape alphabet.
To simulate a TM machine P whose input alphabet has k elements where k > 2, we can map each element of P’s input alphabet to a string of 0 and 1 whose length is at most logk.
Best case scenario: P reads 1 input and then advances to the right. To simulate this behavior, M will read logk input and stop.
Worst case scenario: P reads 1 input, overwrite it with a new one, and then goes left. To simulate this behavior, M will read logk input to determine which input of P it is reading, then go back logk squares to the left, then write a new string of logk input, then go back 2logk to the left. The total is 5logk.
Thus, in worst case scenario, P will slow down by the factor of 5logk. In best case scenario, P will slow down by the factor of logk.