4

We're being asked to create a Turing Machine that accepts {0^(2^n); n>0} that is not the commonly accepted one published by Michael Sipser.

Sane Turing Machine

Instead, we are being asked to create one for the algorithm as follows:

  • On the first pass of the head, the Turing Machine will cross out one zero.
  • On the next, it will cross out another single zero.
  • On the next, it will cross out two zeros.
  • On the next, four.

It will continue in such a fashion, crossing out as many zero's in each pass as were crossed out in all the previous passes combined (1, 1, 2, 4, 8, 16, etc.), until there are no zero's remaining and none to be crossed out (accept) or there are no zeros remaining, but there were some remaining to be crossed out (reject).

Now my issue here obviously stems from the fact that Turing Machines do not store data values. While a Turing Machine can be used as a counter (enumerators), they cannot then store the value that was counted and act upon it. I have come up with several infinitely long, non-deterministic Turing Machines that employ this algorithm, but none that are deterministic. I am allowed to use as long of a write alphabet as is necessary.

Please do not ask me why I am being asked to create such a useless machine considering an efficient, simple algorithm is already available and widely known. I honestly couldn't tell you.

Bentaye
  • 9,403
  • 5
  • 32
  • 45

2 Answers2

1

A Turing machine can store values. To do that sometimes you need to play certain tricks. Given that you may use a large alphabet, do each pass like this:

  • At the beginning of the pass, the tape has a certain range of xs representing what has been crossed out, followed by a range of yet uncrossed 0s.

  • Find the leftmost x. Change it to y. Find the leftmost 0. Cross it out with z. Repeat as long as there are xs.

  • Go to the beginning of the tape, and change each y and z with x.

Prove that after such pass number of xs double, and implement the machine.

user58697
  • 7,808
  • 1
  • 14
  • 28
0

Turing Machine for L

I believe this is the most intuitive way of approaching the problem. The image above can be simplified as some transitions are redundant.

The common solution of crossing out alternative zeros, though simple, is not something all can think of.

Sid
  • 137
  • 6