I need to construct linear bounded automaton for the language L = { a^{n!} : n >= 0 }. I know how LBA functions, however, I don't have a thought how it can check the n! that to in the power of a. I might want to hear a few suggestions, as I am experiencing difficulty in developing the specific LBA for it.
A linear bounded automaton is a multi-tape non-deterministic Turing machine whose tape length is bounded by some fixed linear function of the input length. That is, the amount of tape available to work with must be known in advance from the length of the input and that length must grow linearly with input size. If we can determine a Turing machine for this language and show we know exactly how much tape will be used as a function of the input length, and that function is linear. we have shown the TM to be an LBA.
Consider the following multi-tape non-deterministic Turing machine for checking whether the input it a^(n!):
Here's an example of how this TM functions:
Input: #aaaaaa# #aaaaaa# #xaaaaa# #xaaaaa#
^ => ^ => ^ => ^
Second: ######## #a###### #a###### #a######
^ ^ ^ ^
#xaxaaa# #xaxaaa# #xaxaxa# #xaxaxa#
=> ^ => ^ => ^ => ^
#a###### #a###### #a###### #aa#####
^ ^ ^ ^
#xxxaxa# #xxxxxa#
=> ^ => ^ => halt-accept since we are at the end
#aa##### #aa##### of the tape and looking at a blank
^ ^ on the second tape and only one a
remains
A simple analysis of the way this TM works shows that the number of additional tape cells used cannot be more than the number of tape cells used by the input. Because we only use additional tape cells for writing down the current divisor, and all divisors of sufficiently large values of n! are smaller than n!, the total number of tape cells in play (including input) is certainly less than 2*|input|. But 2*|input| is a linear function of the input size |input|, so this TM is also a LBA.