GMN Atc Module 5
GMN Atc Module 5
DECIDABILITY
Procedure:
A procedure for solving a problem is a finite sequence of instructions which can be mechanically
carried out for a given any input.
DECIDABILITY
Note: The below are some definitions required to understand the concept.
1. A recursively enumerable set is a set X for which we have a procedure to determine
whether a given element belongs to X or not.
2. A set X is recursive if we have an algorithm to determine whether a given element
belongs to X or not.
Since Languages are also sets, the above definition holds good for languages as well.
DECIDABLE LANGUAGES
A problem with two answers Yes/No is decidable if the corresponding language is recursive. In this
case, the language L is also called decidable.
A decidable problem is called a solvable problem.
A problem/language is undecidable if it is not decidable.
Decidability of regular languages:
o Problem of testing whether a deterministic finite automaton accepts a given input string wis
decidable?
ADFA = {(B, w) | B accepts the input string w}
o Theorem:
UNDECIDABLE LANGUAGES
If the language L is not a recursive language, then such a language is called un-decidable language.
If there is any language L which is recursively enumerable then there exists a TM which semi- decides
it(either accept or reject or loops forever). Every TM has description of finite length. Hence the number
of TM and number of Recursively Enumerable languages is countably infinite.
ATM = {(M, w) | The TM M accepts w} is un-decidable.(Proof: Refer Text Book:10.4)
One can determine the decidability of other computational problems by combining reduction techniques
and the un-solvability of the halting problem.
The undecidability of halting problem of Turing Machine can be proved using Reduction technique
We say that A is reducible to problem B if a solution to problem B can be used to solve problem A. For
example, if A is the problem of finding some root of x4- 3x2 + 2 = 0 and B is the problem of finding
some root of x2- 2 = 0, then A is reducible to B. As x2- 2 is a factor of x4- 3x2 + 2 a root ofx2- 2 = 0 is
also a root of x4- 3x2 +2.
If A is reducible to B and B is decidable then A is decidable. If A is reducible to B and A is
undecidable then B is undecidable.
The Turing machine M halts on input w is undecidable. The output of TM can be:
o Halt: The machine starting at this configuration will halt after a finite number of states.
o No-Halt: The machine starting at this configuration never reaches a halt state, no matter how
long it runs.
Based on these two observations:
Given any functional matrix, input data tape and initial configuration, then is it possible to determine
whether the process will ever halt? This is called Halting problem. That means is there any procedure
which solves the halting problem for every pair of machine input as: (Machine, Tape symbol). The
answer is No. i.e.,Halting problem is undecidable or unsolvable.
Proof:
o Let us assume that Halting problem (HALTTM) is decidable.
o Let M1be the TM which decides whether or not any computation performed by another TM M
will ever halt, where the description of the TM is given as M and tape symbol asw.
That means input to M1will be (machine, tape) pair: (M, w)
o Then, for every input (M, w) to M1:
If TM M accepts input w, then M1 halts which is called Accept-halt.
If M does not accept input w, then the machine M1 will halt which is called Reject-halt.
o As M2 itself is one TM we will take M2 = M. that means we will replace M by M2 from the above
o Thus the machine M2 halts for input M2, if M2 does not halt for M2. This is a contradiction. That
means a machine M1 which can tell whether any other Turing machine will halt on particular input,
which does not exist.
o Hence halting problem is un-decidable.
Q2: Does the PCP with two lists x = (11, 100, 111) and y = (111, 001, 11) has a solution?
Q3: Prove that PCP with two lists x = (01, 1, 1), y = (01 2 , 10, 11) has no solution
For each substring xiϵ x and yiϵ y, we have |xi | < | yi | for all i.
Hence the string generated by a sequence of substrings of x is shorter than the string generated by the
sequence of corresponding substrings of y.
Therefore, the PCP has no solution.
Q4: Explain how a Post Correspondence Problem can be treated as a game of dominoes.
The PCP may be thought of as a game of dominoes in the following way: Let each domino contain
some xi in the upper-half, and the corresponding substring of y in the lower-half. A typical domino is
shown as
xi upper-half
yi lower-half
The PCP is equivalent to placing the dominoes one after another as a sequence. To win the game, the
same string should appear in the upper-half and in the lower-half. So, winning the game is equivalent
to a solution of the PCP.
Note: If the first substring used in PCP is always xl and y1, then the PCP is known as the Modified
Post Correspondence Problem.
SUPPLEMENTARY EXAMPLES
1. If L1 and L2 are recursive languages then Show that L1 U L2 is also recursive language.
OR
Solution:
Let L1 and L2 be two recursive languages.
Let M1 and M2 be the corresponding TMs that halt.(i.e, accepts L1 and L2 respectively)
Now we need to design a TM M as a two tape TM that accepts the language L such that L = L1 U L2
The construction of TM M is as follows:
1. w is an input string to M
2. M copies w on its second tape.
3. M simulates M1 on the first tape. If w is accepted by M1, then M accepts w.
4. M simulates M2 on the second tape. If w is accepted by M2, then M accepts w.
Solution:
Let L1 and L2 be two recursively enumerable languages.
Let M1 and M2 be the corresponding TMs that halt.(i.e, accepts L1 and L2 respectively)
Now we need to design a TM M as a two tape TM that accepts the language L such that L = L1 U L2
The construction of TM M is as follows:
1. w is an input string to M
2. M copies w on its second tape.
3. M simulates M1 on the first tape. If w is accepted by M1, then M accepts w.
4. M simulates M2 on the second tape. If w is accepted by M2, then M accepts w.
Let us construct a new machine M1 such that T(M1) = L̅ and M1 eventually halts.
M1 is obtained by modifying M as follows:
1. Accepting states of M are made non-accepting states of M1 and there is no transition from that state
in M1. That means we have created a state in M1 that will HALT without accepting.
2. Create a new accepting state for M1 say qf and there is no further transition from it.
3. If q is a non- accepting state of M and δ(q, x) is not defined, then add a transition from q to qf for
M1
As M halts, M1 also halts. (If M reaches an accepting state on w, then M1 does not accept w and halts and
conversely.)
4. If L and L̅ are both recursively enumerable, show that L and L̅ are recursive.
Solution:
Let M1 and M2 be two TMs such that language L =T(M1) and L̅=T(M2)
We construct a new two- tape TM M that simulates M1 on tape 1 and M2 on tape 2 as follows:
COMPLEXITY
The efficiency of an algorithm can be decided by measuring the performance of an algorithm. We can measure
the performance of an algorithm by computing two factors:
i. Amount of time required by an algorithm to execute
ii. Amount of storage required by an algorithm.
Hence we define two terms- Time complexity and space complexity.
Time complexity: of an algorithm means the amount of time taken by algorithm to run. By computing time
complexity we come to know whether the algorithm is slow or fast
Space complexity of an algorithm means the amount of space (memory) taken by an algorithm. By computing
Definition: An exponential function is a function : N->N defined by q(n)=an for some fixed a>1
When n increases, each of n, n2, 2n increases. But a comparison of these functions for specific values
of n will indicate the vast difference between the growth rate of these functions.
From the above table, it is easy to see that the function q(n) grows at a very fast rate when compared to f(n) or
g(n). In particular the exponential function grows at a very fast rate when compared to any polynomial of
large degree.
Definitions:
1. A Turing Machine M is said to be of time complexity T(n) if the following holds:
Given an input w of length n, M halts after making at most T(n) moves.
Note that, in this case, M eventually halts and the TM is deterministic (Standard TM).
2. A Language L is in Class P if there exists some polynomial T(n) such that L=T(M) for some deterministic
TM M of Time complexity T(n).
QUANTUM COMPUTATION
It is the area of study that focuses on development of computer technology based on the principle of quantum
theory
Quantum Computer:
We know that a bit (a 0 or a 1) is the fundamental concept of classical computation and information. Classical
computer is built from an electronic circuit containing wires and logical gates. Let us study quantum bits and
quantum circuits which are analogous to bits and (classical) circuits.
Quantum computer maintains a sequence of qubits. Qubit can be mathematically described as:
A classical bit has two states, a 0 and a 1.The two possible states for a qubit are the states |0 > and |1 >
Unlike a classical bit, a qubit can be an infinite number of states other than |0 > and |1 >. It can be in a state,
The action of qubit NOT gate can be represented using matrix as:
Thus, the quantum computer is a system built from quantum circuits, containing wires and elementary quantum
gates to carry out manipulation of quantum information.
CHURCH-TURING THESIS
Church Turing thesis asserts that Any algorithm that can be performed on any computing machine can be
performed on a Turing machine as well.
A strengthened version of Church Turing Thesis states that Any algorithmic process can be simulated efficiently
by a Turing machine.
But a challenge to the strong Church-Turing thesis arose from analog computation.
Certain types of analog computers solved some problems efficiently whereas these problems had no efficient
solution on a Turing machine. But when the presence of noise was taken into account, the power of the analog
computers disappeared.
In mid-1970s. Robert Solovay and Volker Strassen gave a randomized algorithm for testing the primality of a
number. (A deterministic polynomial algorithm was given by Manindra Agrawal, Neeraj Kayal and Nitein
Saxena of IIT Kanpur in 2003). This led to the modification of the Church thesis.
A language L which is a subset of ∑ * is a recursively enumerable language if there exists a TM M, such that
L = T(M). (Halts:(Accepts or Rejects) / Enters into infinite loop).
That means, languages accepted by a TM are called RE languages.
Structure of RE languages:
• An algorithm has a TM, that not only recognizes the language, but it always decides whether the input string
doesn’t belongs to the language. Such a TM always halts eventually regardless of whether or not it reaches
the accepting state.
• Recursively Enumerable languages that are not accepted by a TM with the guarantee of halting.
• These languages are accepted in an inconvenient way ie:
If the input is in the language, then it is accepted by TM
If the input is not in the language, then the TM may run forever, and we shall never be sure the
input won’t be accepted eventually.
2. Recursive Languages
A language L which is a subset of ∑* is a recursive language if there exists a TM M, that satisfies the following
Recursive language definition assures us that TM always Halts. It is clear that a recursive language is a subset
of recursively enumerable language.
Recursive languages are also called as decidable languages. The TM that always halt irrespective of whether it
accepts or not, is a good model for an algorithm.
If an algorithm exist to solve a problem, then the problem is decidable otherwise un-decidable(ie if it is not a
recursive language.)
The existence or non-existence of an algorithm to solve a problem is often more important than the existence
of some TM to solve the problem. Thus dividing the languages into decidable and un- decidable language is
often more important than the division of languages as Recursively enumerable( Those have some sort of TM)
or non-recursively enumerable languages ( which have no TM at all)
The relationship between the classes of languages are as shown below:
A language L is said to be decidable language if the corresponding language L is recursive language. That is a
problem with two answers Yes/No is decidable if the corresponding language is recursive. The class of
decidable problems is called as solvable problems.
Universal Turing Machine is a Turing machine that can simulate an arbitrary Turing Machine on arbitrary
input. The universal turing machine essentially achieves this by reading both the description of the Turing
The language accepted by the Universal TM is called a universal language. It contains multiple tapes. Single
TM can be used as a stored program computer, taking its program as well as its data from one or more tapes
on which input is placed. The same idea is implemented in Universal TM. It is easiest to describe universal TM
U, as a multi-tape TM with transitions of M are stored initially on the first tape, along with the string w. A
second tape will be used to hold the simulated tape of M, using the same format as for the code of M. That is
tape symbol X i of M will be represented by 0i, and tape symbol will be separated by single 1’s, the third tape
of U holds the state of M, with state qi represented by i 0’s.
The universal TM U accepts the coded pair (M, w) if and only if M accepts w. If M rejects w then the machine
U also rejects w. Also if the machine M for input w enters a loop forever, then U also does the same.