Space usage of multi-tape Turing machines #
Defines the space used by a run path of a multi-tape Turing machine. Space usage counts the positions visited by each work-tape head along the path and sums over the tapes.
MultiTapeNTM.RunPath.InWindow says that every head of a run path stays within the window
[-s, s], which bounds the space of the path.
MultiTapeNTM.RunPath.space_map_le bounds the space of a run path mapped by RunPath.map through
the head positions of the original path.
Design #
The input tape is read-only with bounded head movement, and the output tape is write-only, so we ignore both for space usage. A work-tape cell is visited when its head occupies that position in any configuration of the path, including the initial and final configurations. Each cell counts once, regardless of repeated visits.
Instead of considering the cells visited by the work tape heads, some textbooks
(including [AB09]) only consider the number of cells that contain
a non-blank symbol at some point in the execution or the number of cells written to. This allows
work tape heads to freely move at no cost as long as they do not write. It is
important to note that this causes DSPACE(1) to include DSPACE(log log n), a class that
contains e.g. the non-regular language {0^n 1^n | n ∈ ℕ} (it is accepted by a TM that writes a
single marker on the work tape and then counts the number of symbols by work tape head movement
without writing).
Defining space usage via "cells visited" thus yields the more fine-grained "complexity world" in
which DSPACE(1) is exactly the class of regular languages.
References #
The window [-s, s] of tape positions allotted to a tape that uses s cells.
Instances For
The number of positions visited by the head of work tape i along a run path.
Instances For
The number of work tape cells visited along a run path.
Instances For
A set containing every position of a head along a path bounds the space used by its tape.
Sets containing every position of the heads along a path bound its space by their total size.
A path whose configurations all lie on another path visits no more cells.
Windows #
Every head stays within the window [-s, s] along the path.
Instances For
A path whose heads stay within [-s, s] visits at most 2 * s + 1 cells on each tape.
Joining two paths whose heads stay within [-s, s] keeps them there.
Mapped paths #
If the head of tape i' of a mapped path follows the head of tape i of the source path, the
two tapes visit the same cells.
Space of a mapped path. If tape e j of the mapped path follows tape j of p, and every
other tape l stays in window l, the mapped path uses the space of p plus the cells of
window l for every other tape l.
The number of work tape cells visited along a computation path.
Instances For
Every computation prefix on input visits at most s work-tape cells, regardless of its
outcome.
Instances For
A space bound can be increased.
A machine without work tapes satisfies every space bound.