27

Considering only the alphabet $\Sigma = \{0,1\}$, the strings which can be given as input to the Turing machines are from the set $\Sigma^{*}$. But does it make sense for the input to be an infinite binary string ? For example if a Turing machine accepts all strings starting with a 0, does a binary string of infinite zeros also belong to the language accepted by the Turing machine ?

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
advocateofnone
  • 3,179
  • 1
  • 27
  • 44

6 Answers6

22

There is no problem in running a Turing machine on a tape initialized with an infinite string, although this is not usually considered. We still need the machine to terminate in finite time, though. There are also notions of infinite-time computation, which may be appropriate here.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
17

That's one of the features of Type 2 Turing Machines. They're used, among other things, to analyse the computability of functions between real numbers. Even more interestingly, they're used to analyse the computability of operators like integration.

Cool fact: Exact numerical integration is computable.

wlad
  • 499
  • 2
  • 11
5

To answer the question "does it make sense", this can even be useful if you consider Turing machines that run in finite time.

Specifically, this is a very useful way to think of prefix-free Turing machines. These are machines whose set of halting inputs is prefix-free; that is, no input that causes the machine to halt is the prefix of another. These are equivalent in power to regular Turing machines, but only if we allow the Turing machine to decide its own halting inputs: ie. the user has no idea what inputs the machine will halt on (and this is an undecidable property).

One way to see this is as a regular Turing machine with a one-way infinite input tape with a tape head that can't move back. The user fills the tape with bits and runs the machine. This is by definition a prefix-free Turing machine. If the machine halts, it must have read only a finite number of bits, and no prefix of that part of the tape can be a program, or the machine would have halted there instead.

This is a good way to talk about computable probability distributions: the user fills the tape with random bits (the machine's source of randomness), and the machine spits out a random bitstring. The set of all such Turing machines corresponds to the set of computable distributions (specifically the lower semicomputable semimeasures).

The advantage of the infinite input is that we don't have to specify what the machine does if we give it a prefix of a halting program, ie. the machine tries to read beyond the end of the input we've given it.

Peter
  • 1,505
  • 14
  • 20
3

Even if you do not have such a tape, you can employ another Turing machine to produce it.

A Turing machine has an access to the empty, but infinite data tape (or some sources says "the machine just has a small tape factory built in"). So it can initialize it with some programmable pattern of data, and then the tape could be consumed as an input of another Turing machine.

Of course, if your content is such that no algorithm could be defined how to produce it, such content cannot be created by Turing machine.

h22
  • 131
  • 4
2

There are some cases where infinite input can be considered and reduced to the action of a "standard" Turing machine. For example, consider an infinitely repeating finite pattern specified on the input. A Turing machine can be created that keeps track of how much of this infinite pattern has been modified by the current actions of the tape head using a finite amount of memory/ tape storage. In other words, it "equivalently simulates" an infinite size pattern on the tape.

Another case where "infinite input" has been considered is the analysis of the Turing equivalence/ completeness of cellular automata. in a complex proof, Cook introduced a concept now referred to by some as "weak Turing equivalence" in converting CA 110 rule operations into Turing machine operations that start on an infinite-specified initial tape but with (repeating) finite-size patterns.

peterh
  • 468
  • 4
  • 19
vzn
  • 11,162
  • 1
  • 28
  • 52
1

In formal languages, a string is, by definition, a finite sequence of symbols. A classic Turing Machine has an infinite tape with a finite input string. As such, while there is no limit to how long the input can be, it cannot be infinite.

Having said that, there are many alternative machines that work similarly to a TM but with infinite input sequences.

Whether it makes sense to have input of infinite length depends on the purpose. Strictly within the context of Turing Machines, it makes no sense (since it is not possible), but in the context of Turing-like Machines, it does make sense and it has many applications.

everybody
  • 29
  • 1