0

I have the following question that I need to answer :

Proof that the set $P=\{w \in \{0,1\}^{*}|w \ is \ divisible \ by \ 2\}$ is decidable. Construct a Turing-Machine which calculates the characteristic Function of $P$.

It is very obvious to me how to construct the Turning Machine. I construct a loop which goes to the end and if there is a one it is not divisible and if it is a zero then it is. But the problem now is how to output my answer. Do I simply delete every number on the tape and write then a zero or a one. Or do I define a state and say if it ends in $q_4$ it is even and if it is in $q_5$ it is odd?

Iwan5050
  • 385

0 Answers0