Reading about Multitape Turing Machines and coming across this exercise: Construct a Turing Machine, that can "tell" if a word w1 on strip 1 matches w2 on strip 2. Given approach : Compare the states on the strips.
Okay, who would have thought^^?!
But how can I build such an If-case in a Turing?
The two-tape machine has a transition function $\delta$ which takes the current state, $s$, and the symbols from the current positions on the two tapes, $t_1$ and $t_2$, and tells what the new state $s'$ is.
Define a transition function that gives $\delta(s, t_1, t_2)$ one value when $t_1=t_2$, and a different value when $t_1\ne t_2$. Then the machine will go into different states depending on whether $t_1=t_2$ and can proceed differently from there.