I am a philosophy student taking a Logic II class and I am scared. I have encountered the following question and I am bewildered about where to start or what to do.
Design a Turing machine to compute the following function: $$\text{equality}(x,y) = \begin{cases}1 \; \text{if} \; x=y \\ 0 \; \text{if} \; x \neq y \end{cases}$$ where $x,y \in \mathbb{Z}^{+}$. The machine need not be classical (you can write more than just 0 or 1 on the tape).
The scanner starts on the first digit of $x$, which is written in binary from left to right. After the binary expansion of $x$, there is a symbol $B$ representing a blank. After that, $y$ is written in its binary expansion. On either side of the entire expression there are infinitely many blanks.
Please help!
The basic idea is to have the machine scan back and forth, checking whether $x$ and $y$ have the same first symbol, the same second symbol, and so on. I’ll use one extra symbol, $2$.
Try following this quasi-program with a small example or two to get the idea (and to catch any errors that I may have made), and then try to convert it into Turing machine code.