2

Given a single taped deterministic turing machine what's the least amount of calculations needed in order to receive the language $L_k=${$0,1$}$^*0${$0,1$}$^{k-1}$.

My intuition says that i'll need at least $n+k$ calculations.

I will start at the leftmost digit, and go through whole the tape until i reach blank on the rightmost corner of the tape.

Then i'll create {$\sigma_1,...\sigma_{k-1}$} new alphabets in order to the 'count' the digits, Once i'm done using $\sigma_{k-1}$ digits i know i should reach $0$, If i don't i reject.

The solution above has 2 problem:

  1. Since {$0,1$}$^*$ can be infinite, The machine above will never reach accept state.
  2. I'm not sure it's the most efficent way.

Help please.

  • 2
    I assume you mean letters rather than alphabets? You can do it in $n$ steps if you allow $O(2^k)$ states. – Thomas Andrews Dec 30 '13 at 22:59
  • 1
  • Well, $L_k$ is indeed an infinite set of words, as ${0,1}^$ is infinite, but each actual member of it (i.e. a $0$-$1$-word having $0$ as its $k$th digit from the right) is actually finite. In other words, all inputs are considered finite* so you don't have to worry about infinite words (whence indeed the machine would never reach state $\sigma_1$...).
  • – Berci Dec 30 '13 at 23:00
  • 2
    As for objection (1), ${0,1}^*$ cannot be infinite. It is unbounded, but it doesn't match any infinite string. – Thomas Andrews Dec 30 '13 at 23:01