0% found this document useful (0 votes)
9 views11 pages

TOC Notes

The document discusses various types of Turing machines, including k-track, multi-tape, and non-deterministic machines, highlighting their capabilities and how they can be simulated by simpler machines. It also covers the concepts of decidable and undecidable problems, emphasizing the Halting Problem as a key example of undecidability. Additionally, it introduces the Universal Turing Machine and Church's Thesis, asserting that any computable function can be executed by a Turing machine.

Uploaded by

git.sumitjoshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views11 pages

TOC Notes

The document discusses various types of Turing machines, including k-track, multi-tape, and non-deterministic machines, highlighting their capabilities and how they can be simulated by simpler machines. It also covers the concepts of decidable and undecidable problems, emphasizing the Halting Problem as a key example of undecidability. Additionally, it introduces the Universal Turing Machine and Church's Thesis, asserting that any computable function can be executed by a Turing machine.

Uploaded by

git.sumitjoshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

1.

Multiple track Turing Machine:

• A k-track Turing machine(for some k>0) has k-tracks and one R/W head that reads
and writes all of them one by one.

• A k-track Turing Machine can be simulated by a single track Turing machine

2. Two-way infinite Tape Turing Machine:

• Infinite tape of two-way infinite tape Turing machine is unbounded in both directions
left and right.

• Two-way infinite tape Turing machine can be simulated by one-way infinite Turing
machine(standard Turing machine).

3. Multi-tape Turing Machine:

• It has multiple tapes and is controlled by a single head.

• The Multi-tape Turing machine is different from k-track Turing machine but
expressive power is the same.

• Multi-tape Turing machine can be simulated by single-tape Turing machine.

4. Multi-tape Multi-head Turing Machine:

• The multi-tape multi-head Turing machine has multiple tapes and multiple heads

• Each tape is controlled by a separate head

• Multi-Tape Multi-head Turing machine can be simulated by a standard Turing


machine.
5. Multi-dimensional Tape Turing Machine:

• It has multi-dimensional tape where the head can move in any direction that is left,
right, up or down.

• Multi dimensional tape Turing machine can be simulated by one-dimensional Turing


machine

6. Multi-head Turing Machine:

• A multi-head Turing machine contains two or more heads to read the symbols on the
same tape.

• In one step all the heads sense the scanned symbols and move or write
independently.

• Multi-head Turing machine can be simulated by a single head Turing machine.

7. Non-deterministic Turing Machine:

• A non-deterministic Turing machine has a single, one-way infinite tape.

• For a given state and input symbol has at least one choice to move (finite number of
choices for the next move), each choice has several choices of the path that it might
follow for a given input string.

• A non-deterministic Turing machine is equivalent to the deterministic Turing


machine.

Universal Turing Machine (UTM)

A Universal Turing Machine can be defined as a theoretical construction that can simulate
the behavior of other machines. This is done specifically by reading, apart from the input
tape it simulates, a description of how this very machine it is simulating would work, and
transition rules showing how it would respond to the input. This gives the UTM the
character of a general-purpose computational device that can execute any arbitrary
computable function. Universal Turing machines have hence been taken to provide the
means for the Church-Turing thesis: anything computable can be computed by a Turing
machine. In this sense, the UTM is more properly considered to be a universal interpreter
that can run any algorithm specified by another machine.
A Universal Turing Machine is a Turing Machine which when supplied with an appropriate
description of a Turing Machine M and an input string w, can simulate the computation of w.

Universal Turing Machine

Construction of UTM

Without loss of generality, we assume the following for M:

• Q = {q1, q2, ....qn} where q1=initial state and q2=Final State

• τ = {σ1, σ2,,...σn} where σ represent blanks

• Select an encoding on which q1 is representable by 1, q2 by 11, and so on.

• Similarly, σ1 is encoded as 1, σ2 as 11, etc.

• Finally, let us represent R/W head directions by 1 for L (Left) and 11 for R(Right).

• The symbol 0 will be used as a separator between 1s.

With this scheme, any transition of M can be given as :

UTM Construction

Implementation of UTM

A UTM Mu then has an input alphabet = {0, 1} and the structure of a multi-tape TM.

• Mu looks first at the contents of Tape 2 and Tape 3 to determine the instantaneous
description (ID) of M.

• It then consults Tape1 to see what M would do with this ID.

• Finally, Tape 2 and Tape 3 will be modified to reflect the result of the move.
UTM Implementation

If no transition for a given ID is formed, Mu halts as M must:

• In either case, Mu behaves as M would.

• If M halts, when presented with string w then Mu will halt when presented with the
encoded M and the encoded string on its tape.

• Moreover, the final string Mu .s tape will be the encoding of the string.

• When M halts, Mu can tell if it is in the single accepting state and so moves to an
accepting state of its own ( or not).
Church’s Thesis

Turing machine is defined as an abstract representation of a computing device such as


hardware in computers. Alan Turing proposed Logical Computing Machines (LCMs), i.e.
Turing’s expressions for Turing Machines. This was done to define algorithms properly. So,
Church made a mechanical method named as ‘M’ for manipulation of strings by using logic
and mathematics. This method M must pass the following statements:

• Number of instructions in M must be finite.

• Output should be produced after performing finite number of steps.

• It should not be imaginary, i.e. can be made in real life.

• It should not require any complex understanding.

Using these statements Church proposed a hypothesis called

Church’s Turing thesis

that can be stated as: “The assumption that the intuitive notion of computable functions can
be identified with partial recursive functions.”

Or in simple words we can say that "Every computation that can be carried out in the real
world can be effectively performed by a Turing Machine."

In 1930, this statement was first formulated by Alonzo Church and is usually referred to as
Church’s thesis, or the Church-Turing thesis. However, this hypothesis cannot be proved. The
recursive functions can be computable after taking following assumptions:

1. Each and every function must be computable.

2. Let ‘F’ be the computable function and after performing some elementary operations
to ‘F’, it will transform a new function ‘G’ then this function ‘G’ automatically
becomes the computable function.

3. If any functions that follow above two assumptions must be states as computable
function.
Recursive Enumerable (RE) or Type -0 Language

RE languages or type-0 languages are generated by type-0 grammars. An RE language can be


accepted or recognized by Turing machine which means it will enter into final state for the
strings of language and may or may not enter into rejecting state for the strings which are
not part of the language. It means TM can loop forever for the strings which are not a part of
the language. RE languages are also called as Turing recognizable languages.

Recursive Language (REC)

A recursive language (subset of RE) can be decided by Turing machine which means it will
enter into final state for the strings of language and rejecting state for the strings which are
not part of the language. e.g.; L= {anbncn|n>=1} is recursive because we can construct a
turing machine which will move to final state if the string is of the form anbncn else move to
non-final state. So the TM will always halt in this case. REC languages are also called as
Turing decidable languages. The relationship between RE and REC languages can be shown
in Figure 1.

Comparison between RE & REL

Comparison Recursive Language Recursively enumerable language

Also Known
Turing decidable languages Turing recognizable languages
as

In Recursive Languages, the Turing In Recursively enumerable languages,


Definition machine accepts all valid strings the Turing machine accepts all valid
that are part of the language and strings that are part of the language and
rejects all the strings that are not rejects all the strings that are not part of
part of a given language and halt. the given language but do not halt and
starts an infinite loop.

(1) Halt and accept (3) Halt and accept

States (2) Halt and Reject (4) Halt and Reject

(5) Never Halt (Infinite loop)

Loop Finite Loop Infinite loops of machine are possible

Halting Halting Turing Machine Non Halting Turing Machine

Accept (Turing machine) = L


Accept (Turing machine) = LReject
Accept/ Reject (Turing machine) = L‘
(Turing machine) + Loop (Turing
Reject Loop (Turing machine) = φφ
machine) = L’
φ = null φ = null

Closed under all except


Closed Closed under all except set difference,
homomorphism, substitution, GSM
under and complementation.
mapping, and rational transduction

Language of even-length strings Halting problem language:


over {a, b}:
• L = { ⟨M, w⟩ | Turing machine M
• L = { w ∈ {a, b}* | |w| is halts on input w }
even }
Example • There exists a Turing machine
• A Turing machine can be that enumerates pairs ⟨M, w⟩ and
constructed to count the simulates M on w, accepting if M
length of the string and halts, but it may run forever if M
accept if the length is even. does not halt
Decidable Problems

A problem is said to be Decidable if we can always construct a corresponding algorithm that


can answer the problem correctly. We can intuitively understand Decidable issues by
considering a simple example. Suppose we are asked to compute all the prime numbers in
the range of 1000 to 2000. To find the solution to this problem, we can easily construct an
algorithm that can enumerate all the prime numbers in this range.

Now talking about Decidability in terms of a Turing machine, a problem is said to be a


Decidable problem if there exists a corresponding Turing machine that halts on every input
with an answer- yes or no. It is also important to know that these problems are
termed Turing Decidable since a Turing machine always halts on every input, accepting or
rejecting it.

Undecidable Problems

The problems for which we can’t construct an algorithm that can answer the problem
correctly in finite time are termed as Undecidable Problems. These problems may be
partially decidable but they will never be decidable. That is there will always be a condition
that will lead the Turing Machine into an infinite loop without providing an answer at all.

We can understand Undecidable Problems intuitively by considering Fermat's Theorem, a


popular Undecidable Problem which states that no three positive integers a, b and c for any
n>2 can ever satisfy the equation: a^n + b^n = c^n. If we feed this problem to a Turing
machine to find such a solution which gives a contradiction then a Turing Machine might run
forever, to find the suitable values of n, a, b and c. But we are always unsure whether a
contradiction exists or not and hence we term this problem as an Undecidable Problem.

Example

These are few important Undecidable Problems:

• Whether a CFG generates all the strings or not: As a Context Free Grammar (CFG)
generates infinite strings, we can’t ever reach up to the last string and hence it is
Undecidable.

• Whether two CFG L and M equal: Since we cannot determine all the strings of any
CFG, we can predict that two CFG are equal or not.

• Ambiguity of CFG: There exist no algorithm which can check whether for the
ambiguity of a Context Free Language (CFL). We can only check if any particular string
of the CFL generates two different parse trees then the CFL is ambiguous.

• Is it possible to convert a given ambiguous CFG into corresponding non-ambiguous


CFL: It is also an Undecidable Problem as there doesn’t exist any algorithm for the
conversion of an ambiguous CFL to non-ambiguous CFL.
• Is a language Learning which is a CFL, regular: This is an Undecidable Problem as we
can not find from the production rules of the CFL whether it is regular or not.

The most well-known undecidable problem is the Halting Problem, which asks whether a
given program will stop running (halt) or continue running forever for a particular input. It
has been proven that no algorithm can solve this problem for all programs and inputs.

Some more Undecidable Problems related to Turing machine:

• Membership problem of a Turing Machine

• Finiteness of a Turing Machine

• Emptiness of a Turing Machine

• Whether the language accepted by Turing Machine is regular or CFL

Difference Between Decidable and Undecidable Problems

Aspect Decidable Problems Undecidable Problems

Problems that can be solved by an Problems where no algorithm can


Definition algorithm that always gives a correct give a solution for all possible
answer in a finite time. cases.

Always solvable using a step-by-step Cannot be solved for all inputs


Solvability
process (algorithm). using a single algorithm.

There is an algorithm that works for


No algorithm can solve the
Algorithm every input and always finishes with
problem for every input.
an answer.

The algorithm might never stop for


The algorithm stops (halts) and gives
Halting some inputs, or no algorithm
an answer for every input.
exists.

Problems like checking if a number is Examples include the Halting


even or odd, or if a string belongs to Problem, where you can’t always
Examples
a regular language (like finding a tell if a program will finish running
match in a search). or run forever.
Halting Problem of Turing Machine

Definition: The Halting Problem asks whether a given program or algorithm will eventually
halt (terminate) or continue running indefinitely for a particular input. "Halting" means that
the program will either accept or reject the input and then terminate, rather than going into
an infinite loop.

Proof by Contradiction

Problem statement: Can we design a machine which if given a program can find out if that
program will always halt or not halt on a particular input?

Solution:

1. Assumption: Suppose we can design such a machine, called HM(P, I), where:

• HM is the hypothetical machine/program.

• P is the program.

• I is the input.

When provided with these inputs, HM will determine whether program P halts or not.

2. Constructing a Contradiction: Using HM, we can create another program, called CM(X),
where X is any program passed as an argument as shown in figure.

3. Behavior of CM(X): In CM(X), we call HM with inputs (X, X), meaning we pass program X
both as the program and as its input. HM(X, X) will return either "Halt" or "Not Halt."

• If HM(X, X) predicts that X halts, CM(X) will enter an infinite loop.

• If HM(X, X) predicts that X does not halt, CM(X) will halt immediately.

4. The Contradiction: Now, consider what happens if we pass CM itself as an


argument: CM(CM).
• If HM predicts that CM(CM) halts, CM will loop indefinitely (contradicting HM's
prediction).

• If HM predicts that CM(CM) does not halt, CM will halt immediately (again
contradicting HM).

In both scenarios, we face a contradiction. Therefore, our initial assumption that such a
machine HM could exist must be false. Hence we can conclude that Halting Problem is
undecidable. No general algorithm can determine whether every program will halt or not.

You might also like