<p>This is another question related to the (still open) nice question "<a href="https://cstheory.stackexchange.com/questions/4928/alphabet-of-single-tape-turing-machine">Alphabet of single-tape Turing machine</a>" by Emanuele Viola. I describe the question very informally (perhaps it has a trivial solution, so I will delete it).</p>

<p><em>Idea</em>: build a TM that sweeps the input tape from left to right, and right to left "adding" to each symbol an incremental value (and trying to use all available symbols).</p>

<p>Let $\Sigma_4 = \{.,0,1,2\}$ be a 4 symbols alphabet.</p>

<p>We map each pair of symbols to an integer according to the following table:</p>

<pre><code>00-&gt;0    10-&gt;4    20-&gt;8    .0-&gt;12
01-&gt;1    11-&gt;5    21-&gt;9    .1-&gt;13
02-&gt;2    12-&gt;6    22-&gt;10   .2-&gt;14
0.-&gt;3    1.-&gt;7    2.-&gt;11      
</code></pre>

<p>Informally, the dot "." is used like the symbol "$3$". So, we can encode an integer in [0..14] using two symbols. The pair "$..$" will be used as a separator.</p>

<p>We informally define a function that "sweeps" the input from left to right - processing <strong>2 symbols at once</strong> - and adds the last integer written on the tape to the current one <strong>modulo 15</strong>. For example (<strong>left-right sweep</strong>):</p>

<pre><code>&gt;01  00  11  01  10  11   Decoded: &gt;1  0  5  1   4  5
 01 &gt;00  11  01  10  11            [1  0] 5  1   4  5
 01  01 &gt;11  01  10  11             1 [1  5] 1   4  5
 01  01  12 &gt;01  10  11             1  1 [6  1]  4  5
 01  01  12  13 &gt;10  11             1  1  6 [7   4] 5
 01  01  12  13  2. &gt;11             1  1  6  7 [11  5]
 01  01  12  13  2.  11             1  1  6  7  11  1 
</code></pre>

<p>Then it do the same thing from right to left (<strong>right-left sweep</strong>):</p>

<pre><code> 01  01  12  13  2.  11&lt;   Decoded: 1  1   6  7  11  1&lt;
 01  01  12  13  2.&lt; 11             1  1   6  7 [11  1]
 01  01  12  13&lt; .0  11             1  1   6 [7  12] 1
 01  01  12&lt; 10  .0  11             1  1  [6  4] 12  1
 01  01&lt; 22  10  .0  11             1 [1  10] 4  12  1
 01&lt; 2.  22  10  .0  11            [1 11] 10  4  12  1
 .0  2.  22  10  .0  11            12 11  10  4  12  1
</code></pre>

<p>Now we define:</p>

<p>$\displaylines{ L = \{ x \in \{0,1\}^* \, s.t. \, |x| = 2^k \text{ and after } k \text{ left-right + right-left sweeps} \cr \text{ the tape contains the same number of 1s and 2s } \} } $</p>

<p>$L$ can be recognized by a TM using alphabet $\Sigma_4$ in $O(N \log{N})$ :</p>

<ol>
<li>check the length of the input string ($|x|=2^k$) and store $k$ in unary format on the left,</li>
<li>make $k$ left-right, right-left sweeps</li>
<li>compare the number of 1s and 2s using the usual $O(N \log{N})$ technique</li>
</ol>

<blockquote>Can we build a Turing machine TM3 that uses only 3 symbols $\Sigma_3 = \{.,1,2\}$ and recognizes $L$ in $O(N \log{N})$ ?
</blockquote>

<p>Steps 1 and 3 can be performed by a 3-symbols TM (<a href="https://cstheory.stackexchange.com/questions/5279/is-this-language-recognizable-by-a-3-symbols-tm-in-on-log-n">see my previous question for details</a>). </p>

<p>But step 2 seems to add "more information" and the extra symbol $2$ cannot be stored by TM3, so it must expand the input (and the resulting time complexity is $O(N^2)$).</p>

<p>I say "more information" because the value of each pair of symbols (at the end of the sweeps) depends on $k$ and on the number of 1s in the original input tape (at both sides).</p>

<p>Furthermore the bookkeeping tecnique (using the "." symbol) seems not to work in this case because the symbol itself is used in the encoding during the sweeps.</p>

CC BY-SA 2.5
2011-03-15T18:03:12.960Z
I think this is completely valid use of the site. The question stated is derivative, but also focused, research-level and has a clear answer. If it does not receive an answer, all the better: keeping track of open questions is as important as collecting answers, imho.
Raphael
CC BY-SA 2.5
2011-03-15T03:30:42.847Z
Vor, I don't know if this is a good way of using the site, it seems to me that you are trying to answer another question by posting ideas you come up as questions for others. (ps: I guess that Emanuele's question doesn't have an easy answer, experts in simulation results should have thought about this case. I asked a few seniors and they don't remember if there is a positive/negative result. Of course it might be the case that they haven't spend much time on it since the model is not very interesting in general because of non-robustness, e.g. provability of quadratic lowerbounds (more)
Kaveh
CC BY-SA 2.5
2011-03-15T03:36:33.527Z
, but IMHO we can consider it an open-problem.)
Kaveh
CC BY-SA 2.5
2011-03-15T04:27:30.643Z
@Kaveh: While I think I agree with you in general, here's a partial counterargument (and maybe after this the discussion, if there is one, should move to meta): I think if someone posted a family of graphs and asked if any of the known GraphIso algorithms could decide isomorphism for this family in polynomial time, that would be a valid and potentially interesting question. It could result in any of: a reference, potentially learning about how an old technique applies to new examples, a new technique, or new hard test cases. (I recognize this case is slightly different, but still...)
Joshua Grochow
CC BY-SA 2.5
2011-03-15T04:41:40.087Z
@Joshua, I agree with what you say. I have just some *doubts* about this way of using the site in this particular case (as it *seems* to me as proposing ideas about solving another question as new questions for others to check those ideas, I feel that it might be better to submit them as answers/comments to the original question), but it doesn't mean there is a problem with this way of using the site, it is just my personal taste as a user.
Kaveh
CC BY-SA 2.5
2011-03-15T04:58:36.653Z
@Kaveh: Ah. I thought you were suggesting removing it altogether. But I like this idea: first post the proposed solution as an actual answer on the question. If it turns out through comments that the proposed solution is trivial, then great, and now that is there for all people perusing the OQ to see. If it turns out through comments that it's more complicated, then perhaps opening a new question to allow non-character-limited responses to the proposed solution would be appropriate.
Joshua Grochow
<computability><turing-machines><time-complexity>
Another weird $O(N \log{N})$ Turing machine
Marzio De Biasi
# Another weird $O(N \log{N})$ Turing machine

(Asked by: username_0 on 2011-03-14)

This is another question related to the (still open) nice question "Alphabet of single-tape Turing machine" by Emanuele Viola. I describe the question very informally (perhaps it has a trivial solution, so I will delete it).
Idea: build a TM that sweeps the input tape from left to right, and right to left "adding" to each symbol an incremental value (and trying to use all available symbols).
Let $\Sigma_4 = \{.,0,1,2\}$ be a 4 symbols alphabet.
We map each pair of symbols to an integer according to the following table:
00->0    10->4    20->8    .0->12
01->1    11->5    21->9    .1->13
02->2    12->6    22->10   .2->14
0.->3    1.->7    2.->11      

Informally, the dot "." is used like the symbol "$3$". So, we can encode an integer in [0..14] using two symbols. The pair "$..$" will be used as a separator.
We informally define a function that "sweeps" the input from left to right - processing 2 symbols at once - and adds the last integer written on the tape to the current one modulo 15. For example (left-right sweep):
>01  00  11  01  10  11   Decoded: >1  0  5  1   4  5
 01 >00  11  01  10  11            [1  0] 5  1   4  5
 01  01 >11  01  10  11             1 [1  5] 1   4  5
 01  01  12 >01  10  11             1  1 [6  1]  4  5
 01  01  12  13 >10  11             1  1  6 [7   4] 5
 01  01  12  13  2. >11             1  1  6  7 [11  5]
 01  01  12  13  2.  11             1  1  6  7  11  1 

Then it do the same thing from right to left (right-left sweep):
 01  01  12  13  2.  11<   Decoded: 1  1   6  7  11  1<
 01  01  12  13  2.< 11             1  1   6  7 [11  1]
 01  01  12  13< .0  11             1  1   6 [7  12] 1
 01  01  12< 10  .0  11             1  1  [6  4] 12  1
 01  01< 22  10  .0  11             1 [1  10] 4  12  1
 01< 2.  22  10  .0  11            [1 11] 10  4  12  1
 .0  2.  22  10  .0  11            12 11  10  4  12  1

Now we define:
$\displaylines{ L = \{ x \in \{0,1\}^* \, s.t. \, |x| = 2^k \text{ and after } k \text{ left-right + right-left sweeps} \cr \text{ the tape contains the same number of 1s and 2s } \} } $
$L$ can be recognized by a TM using alphabet $\Sigma_4$ in $O(N \log{N})$ :

check the length of the input string ($|x|=2^k$) and store $k$ in unary format on the left,
make $k$ left-right, right-left sweeps
compare the number of 1s and 2s using the usual $O(N \log{N})$ technique

Can we build a Turing machine TM3 that uses only 3 symbols $\Sigma_3 = \{.,1,2\}$ and recognizes $L$ in $O(N \log{N})$ ?

Steps 1 and 3 can be performed by a 3-symbols TM (see my previous question for details). 
But step 2 seems to add "more information" and the extra symbol $2$ cannot be stored by TM3, so it must expand the input (and the resulting time complexity is $O(N^2)$).
I say "more information" because the value of each pair of symbols (at the end of the sweeps) depends on $k$ and on the number of 1s in the original input tape (at both sides).
Furthermore the bookkeeping tecnique (using the "." symbol) seems not to work in this case because the symbol itself is used in the encoding during the sweeps.

**Tags:** computability, turing-machines, time-complexity

> **Comments:**
> **username_2**: Vor, I don't know if this is a good way of using the site, it seems to me that you are trying to answer another question by posting ideas you come up as questions for others. (ps: I guess that Emanuele's question doesn't have an easy answer, experts in simulation results should have thought about this case. I asked a few seniors and they don't remember if there is a positive/negative result. Of course it might be the case that they haven't spend much time on it since the model is not very interesting in general because of non-robustness, e.g. provability of quadratic lowerbounds (more)  
> **username_2**: , but IMHO we can consider it an open-problem.)  
> **username_3**: @username_2: While I think I agree with you in general, here's a partial counterargument (and maybe after this the discussion, if there is one, should move to meta): I think if someone posted a family of graphs and asked if any of the known GraphIso algorithms could decide isomorphism for this family in polynomial time, that would be a valid and potentially interesting question. It could result in any of: a reference, potentially learning about how an old technique applies to new examples, a new technique, or new hard test cases. (I recognize this case is slightly different, but still...)  
> **username_2**: @Joshua, I agree with what you say. I have just some *doubts* about this way of using the site in this particular case (as it *seems* to me as proposing ideas about solving another question as new questions for others to check those ideas, I feel that it might be better to submit them as answers/comments to the original question), but it doesn't mean there is a problem with this way of using the site, it is just my personal taste as a user.  
> **username_3**: @username_2: Ah. I thought you were suggesting removing it altogether. But I like this idea: first post the proposed solution as an actual answer on the question. If it turns out through comments that the proposed solution is trivial, then great, and now that is there for all people perusing the OQ to see. If it turns out through comments that it's more complicated, then perhaps opening a new question to allow non-character-limited responses to the proposed solution would be appropriate.  
> **username_1**: I think this is completely valid use of the site. The question stated is derivative, but also focused, research-level and has a clear answer. If it does not receive an answer, all the better: keeping track of open questions is as important as collecting answers, imho.  

---

## 0 answers

