6.3 Turing Machines (TM)

In this section, we will explore Turing Machines (TM), which are fundamental models of computation. A Turing Machine is an abstract machine that can simulate any algorithm's logic and is the basis for the theory of computation. It serves as a powerful model for analyzing the limits of what can be computed.


1. Introduction to Turing Machines

A Turing Machine (TM) is a theoretical computing machine invented by Alan Turing in 1936. It is a mathematical model that defines a hypothetical machine capable of performing any computation that can be algorithmically described. The machine operates on an infinite tape and follows predefined rules for moving along the tape and changing symbols based on the state it is in.

A Turing Machine consists of:

  • An infinite tape divided into cells, each of which holds a symbol.

  • A tape head that can read and write symbols on the tape and move left or right.

  • A finite set of states, including a special start state and one or more accepting or halting states.

  • A transition function that dictates the machine's behavior, defining how it moves between states and modifies the tape.


2. Notations of Turing Machine

The Turing Machine is formally defined as a 7-tuple:

M = (Q, Σ, Γ, δ, q₀, q_accept, q_reject)

Where:

  • Q is a finite set of states.

  • Σ is the input alphabet (symbols the machine can read).

  • Γ is the tape alphabet (includes symbols from Σ and the blank symbol).

  • δ is the transition function: δ: Q × Γ → Q × Γ × {L, R}, defining state transitions, tape modifications, and head movement (Left or Right).

  • q₀ is the initial state.

  • q_accept is the accepting state.

  • q_reject is the rejecting state.


3. Acceptance of a String by a Turing Machine

A Turing Machine accepts a string if, starting from the initial state and reading the string from the input tape, the machine eventually reaches the accept state after following the rules in the transition function. If the machine reaches the reject state or halts without accepting, the string is rejected.

The process of acceptance involves:

  1. Reading the symbols on the tape.

  2. Transitioning between states and modifying the tape content.

  3. Reaching the accepting state, which signifies the string is accepted.


4. Turing Machine as a Language Recognizer

A Turing Machine is considered a language recognizer because it can decide whether a given string belongs to a particular language. A language LL is said to be Turing-recognizable (or recursively enumerable) if there exists a Turing Machine that accepts every string in LL and either rejects or runs forever on strings not in LL.


5. Turing Machine as a Computing Function

A Turing Machine can also be viewed as a computing function. In this context, a Turing Machine computes a function by transforming an input string into an output string. For example, a Turing Machine can compute the successor of a number or perform mathematical operations by modifying the tape and transitioning between states according to its transition function.


6. Turing Machine as an Enumerator of Strings of a Language

A Turing Machine can be used as an enumerator for a language, meaning it can generate all strings in the language, one by one. The Turing Machine enumerates the strings by printing them on the tape and then moving to the next string after halting. A language is recursively enumerable if a Turing Machine can enumerate all its strings.


7. Turing Machine with Multiple Tracks

A multi-track Turing Machine is an extension of the basic Turing Machine where the tape is divided into several tracks, each of which can hold a symbol. The machine can move the tape head independently on each track, which allows it to handle multiple pieces of information simultaneously. This extension helps model more complex computations.


8. Turing Machine with Multiple Tapes

A multi-tape Turing Machine has several tapes and heads, each operating independently. This extension allows more efficient computation compared to a single-tape machine, but it doesn't change the computational power of the Turing Machine. A multi-tape machine can simulate a single-tape machine and vice versa, meaning they are equivalent in terms of computational power.


9. Non-Deterministic Turing Machines (NDTM)

A Non-Deterministic Turing Machine (NDTM) is a variation of the Turing Machine where the transition function is not deterministic. At each step, the NDTM can transition to multiple possible next states for a given input symbol, and it can choose one of these transitions. An NDTM is used to recognize languages that are non-deterministically decidable.

  • Acceptance: An NDTM accepts a string if there exists at least one sequence of transitions leading to an accepting state.

NDTMs are important because they are used to define the class of NP problems in computational complexity theory.


10. Church-Turing Thesis

The Church-Turing Thesis posits that anything that can be computed algorithmically can be computed by a Turing Machine. This thesis implies that Turing Machines are as powerful as any computational device, and they can simulate any computation that can be performed by modern computers. The thesis serves as a foundation for the field of computational theory.


11. Universal Turing Machine

A Universal Turing Machine (UTM) is a Turing Machine that can simulate any other Turing Machine. It takes as input the description of another Turing Machine (encoded as a string) and its input tape, and it simulates the computation of that Turing Machine on the given input. The existence of the UTM shows that a single machine can perform any computation, given the right instructions.


12. Computational Complexity

Computational complexity refers to the study of the resources required for a Turing Machine to solve a problem. The two primary resources are time and space.

  • Time complexity: The number of steps (or transitions) a Turing Machine takes to process an input.

  • Space complexity: The amount of tape (memory) used by a Turing Machine during computation.

Time and space complexities are used to classify problems into different complexity classes, such as P, NP, and NP-complete.


13. Intractability

A problem is said to be intractable if it is computationally expensive to solve, often because it has high time complexity (e.g., exponential time). Intractable problems cannot be solved in a reasonable amount of time for large inputs. Some examples of intractable problems include the Traveling Salesman Problem and Integer Factorization.


14. Reducibility

Reducibility is the concept of transforming one problem into another. If we can reduce problem AA to problem BB, it means that solving BB would also solve AA. This is important in computational complexity theory, as it helps classify problems based on their relative difficulty.

  • Polynomial-time reducibility: If problem AA can be reduced to problem BB in polynomial time, we say AA is polynomial-time reducible to BB.

  • NP-completeness: A problem is NP-complete if it is both in NP and as hard as any other problem in NP, meaning every NP problem can be reduced to it in polynomial time.


Conclusion

  • Turing Machines (TM) are abstract mathematical models of computation that define the limits of what can be computed algorithmically.

  • Non-Deterministic Turing Machines (NDTM) and Universal Turing Machines (UTM) extend the model to recognize non-deterministic languages and simulate other TMs.

  • Church-Turing Thesis suggests that anything computable by an algorithm can be computed by a TM.

  • Computational complexity studies the time and space required to solve problems, with the goal of understanding intractable problems and their reducibility.

Last updated