1

How can we show that Halting Problem for one-counter additive machines is decidable ?

1 Answers1

2

A simple way is the following:

Suppose that the increments are $+1, -1$; the number of states of the machine is $m$ and the current value of the counter is $n$.

You can notice that if the counter reaches $n+m+1$ without hitting the $0$, then by the pigeonhole principle the machine from value $n$ to $n+m+1$ has entered the same state $s_i$ two times ($s_i \to ... \to s_i$), and the difference in the counter value is positive; so it will continue to repeat the same loop and increase the counter.

After hitting the $0$ - for the same reason - if the counter reaches $m+1$ then the machine will never halt.

So it's enough to simulate the machine up to $m(n+m+1)$ steps; if it doesn't halt in that time it will never halt: it will loop forever on the same values $(s_i,c_j) \to ... \to (s_i,c_j)$ or increase forever the counter: $(s_i,c_j) \to ...\to (s_i,c_k) \to ...;\; c_k > c_j+m$ .

If the increments are $\pm v, v \in [1,h]$ then the machine can be reduced to an equivalent one with $\pm 1$ increments.

Vor
  • 12,513
  • 1
  • 30
  • 60