- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
I am looking at the following exercise:
Construct a composite Turing machine $M$ that has a word $w$ over the alphabet $A = \{a, b\}$ tests to see if it's made up of two equal parts, that is, if $w = uu$ with $u \in {a, b}^+$.
In this case, at the end of the method a $1$ has to be after the input $w$ otherwise a $0$.
Furthermore, $M$ should stop on the space after the $1$ or $0$. At the beginning of
the calculation the write/read head is on the first symbol of $w$.
The idea of that TM is the following:
I am looking at the following exercise:
Construct a composite Turing machine $M$ that has a word $w$ over the alphabet $A = \{a, b\}$ tests to see if it's made up of two equal parts, that is, if $w = uu$ with $u \in {a, b}^+$.
In this case, at the end of the method a $1$ has to be after the input $w$ otherwise a $0$.
Furthermore, $M$ should stop on the space after the $1$ or $0$. At the beginning of
the calculation the write/read head is on the first symbol of $w$.
The idea of that TM is the following:
- Finding the mid point of the string
For that a head must be at the beginning of the string and a head at the end and each time we move the head one step to the right and one to the left rspectively.
$$$$ - After we have found the mid point we match the symbols of the two substrings
For that we compare the two substrings.