Computation history explained

In computer science, a computation history is a sequence of steps taken by an abstract machine in the process of computing its result. Computation histories are frequently used in proofs about the capabilities of certain machines, and particularly about the undecidability of various formal languages.

Formally, a computation history is a (normally finite) sequence of configurations of a formal automaton. Each configuration fully describes the status of the machine at a particular point. To be valid, certain conditions must hold:

In addition, to be complete, a computation history must be finite and

The definitions of "valid initial configuration", "valid transition", and "valid terminal configuration" vary for different kinds of formal machines.

A deterministic automaton has exactly one computation history for a given initial configuration, though the history may be infinite and therefore incomplete.

Finite State Machines

M

, a configuration is simplythe current state of the machine, together with the remaining input. The first configuration must be the initial state of

M

and the complete input. A transition from a configuration

(S,I)

toa configuration

(T,J)

is allowed if

I=aJ

forsome input symbol

a

and if

M

has a transition from

S

to

T

on input

a

. The finalconfiguration must have the empty string

\epsilon

as its remaininginput; whether

M

has accepted or rejected the input dependson whether the final state is an accepting state. [1]

Turing Machines

Computation histories are more commonly used in reference to Turing machines. The configuration of a single-tape Turing machine consists of the contents of the tape, the position of the read/write head on the tape, and the current state of the associated state machine; this is usually written

...0011010101q00110101010...

where

q

is the current state of the machine, represented in someway that's distinguishable from the tape language, and where

q

ispositioned immediately before the position of the read/write head.

Consider a Turing machine

M

on input

w

. The firstconfiguration must be

q0w0w1...

, where

q0

is the initial state of the Turing machine. The machine's state in the finalconfiguration must be either

qa

(the accept state) or

qr

(the reject state). A configuration

ci+1

is a valid successorto configuration

ci

if there's a transition from the state in

ci

to the state in

ci+1

which manipulates thetape and moves the read/write head in a way that produces the result in

ci+1

.[2]

Decidability results

Computation histories can be used to show that certain problems forpushdown automata are undecidable. This is because the language ofnon-accepting computation histories of a Turing machine

M

on input

w

is a context-free language recognizable by anon-deterministic pushdown automaton.

We encode a Turing computation history

c0,c1,...,cn

as thestring

C0\#

r
C
1

\#C2\#

r
C
3

\#...\#Cn

, where

Ci

is the encoding of configuration

ci

, as discussed above, and whereevery other configuration is written in reverse. Before reading a particularconfiguration, the pushdown automaton makes a non-deterministic choiceto either ignore the configuration or read it completely onto the stack.

M

. Since successive configurations are always written in opposite orders, this can be done by, for each tape symbol in the new configuration, popping off a symbol from the stack and checking if they're the same. Where they disagree, it must be accountable for by a valid transition of

M

. If, at any point, the automaton decides that the transition is invalid, it immediately enters a special accept state which ignores the rest of the input and accepts at the end.

In addition, the automaton verifies that the first configuration is the correctinitial configuration (if not, it accepts) and that the state of the finalconfiguration of the history is the accept state (if not, it accepts). Sincea non-deterministic automaton accepts if there's any valid way for it to accept,the automaton described here will discover if the history is not a validaccepting history and will accept if so, and reject if not. [3]

This same trick cannot be used to recognize accepting computation historieswith an NPDA, since non-determinism could be used to skip past a test that wouldotherwise fail. A linear-bounded Turing machine is sufficient to recognizeaccepting computation histories.

This result allows us to prove that

ALLPDA

, the languageof pushdown automata which accept all input, is undecidable. Supposewe have a decider for it,

D

. For any Turing machine

M

and input

w

, we can form the pushdown automaton

P

which accepts non-accepting computation histories for thatmachine.

D(P)

will accept if and only if there are noaccepting computation histories for

M

on

w

; thiswould allow us to decide

ATM

, which we know to be undecidable.

Notes and References

  1. Book: Christine L. Mumford. Lakhmi C. Jain. Computational Intelligence: Collaboration, Fusion and Emergence. 25 March 2012. 2009. Springer. 978-3-642-01798-8. 337.
  2. Book: Andreas Blass. Fields of Logic and Computation: Essays Dedicated to Yuri Gurevich on the Occasion of His 70th Birthday. 25 March 2012. 22 October 2010. Springer. 978-3-642-15024-1. 468.
  3. Book: Lenore Blum. Complexity and real computation. Complexity and Real Computation . 1998. Springer. 978-0-387-98281-6. p. 31.