Is this problem computable?

151 Views Asked by At

Determining whether a given program $P$ halts on input $x$, without using more than $n$ bits of memory (including registers, tape, and anything else that can be used to store state).

1

There are 1 best solutions below

0
On

I'm assuming it's program $P$ that is only allowed to use a finite amount of memory.

Yes, this is computable. Simulate program $P$ and record all the intermediate states that program $P$ passes through; there are at most $2^{2^n}$ of them. Eventually, either $P$ terminates, or it will reach a state that it has been in before; in that case, $P$ will never terminate.