0% found this document useful (0 votes)
38 views14 pages

TOC Unit-7

Uploaded by

Yashrajsinh
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)
38 views14 pages

TOC Unit-7

Uploaded by

Yashrajsinh
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/ 14

Theory of Computation (TOC)

GTU # 3160704

Unit – 7
Undecidability

Prof. Dixita B. Kagathara


Computer Engineering Department
Darshan Institute of Engineering & Technology, Rajkot
[email protected]
+91 - 97277 47317 (CE Department)
Topics to be covered
 Looping
• Basic Definitions
• A Language That Can’t Be Accepted, and a Problem
That Can’t Be Decided
• Post‘s Correspondence Problem
• The Class P and NP
Decidability and Undecidability
Recursive Language
 A language L is said to be recursive if there exist a Turing machine which will accept
all the strings in L and reject all the strings not in L.
 The Turing machine will halt every time and given an answer (accept or reject) for
each and every string input.

Recursively Enumerable Language


 A language L is said to be recursively enumerable language if there exists a Turing
machine which will accept (and there for halt) for all the input strings which are in ‘L’.
 But may or may not halt for all input strings which are not in ‘L’.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 3
Definitions
Decidable language
 A language L is decidable if it is a recursive language. All decidable languages are
recursive languages and vice-versa.

Partially decidable language


 A language ‘L’ is partially decidable if ‘L’ is a recursively enumerable language.

Undecidable Language
 A language is undecidable if it is not decidable.
 An undecidable language may sometimes be partially decidable but not decidable.
 If a language is not even partially decidable, then there exists no Turing machine for
that language.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 4
Summary

Recursive Language TM will always halt


Recursively Enumerable Language TM will halt sometime & may not halt some times
Decidable Language Recursive language
Partially decidable Language Recursively Enumerable language
UNDECIDABLE No TM for that Language

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 5
A Language That Can’t Be Accepted, and a Problem That Can’t Be Decide
 The set of descriptions, which are strings over some alphabet , is countable, the
same size as the set of recursively enumerable languages; maybe whenever there is
a precise finite description of a language L, there is an algorithm to accept L.
 As it turns out, not only can we describe a language that is not recursively
enumerable, but we can do it by using the same diagonal argument that we used for
the uncountability result.
 We showed that for every list A0, A1, . . . of subsets of N, there is a subset A of N that
is not in the list. The fact that the sets A i were in a list was not crucial; here are the
crucial steps.
1. We started with a collection of subsets A i of N, each one associated with a specific element of N
(namely, i).
2. We defined another subset A, containing the elements i of N that do not belong to the subset A i
associated with i.
 The conclusion was that for each i, A = Ai , because i ∈ A ⇔ i /∈ Ai .
 Now we want to find a language L ⊆ {0, 1}∗ that cannot be accepted by a Turing
machine. in other words, a language that is different from L(T), for every Turing
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 6
A Language That Can’t Be Accepted, and a Problem That Can’t Be Decide
 The string e(T) “associated with” L(T), just as i is associated with A i , and we can
repeat the argument as follows:
1. We have a collection of subsets L(T) of {0, 1}∗ , each one associated with a specific element of {0,
1}∗ (namely, e(T)).
2. We define another subset L, containing the elements e(T) of {0, 1}∗ that do not belong to the
subset L(T) associated with e(T).
 The conclusion this time is that for each T , L = L(T), because e(T) ∈ L ⇔ e(T) ∉
L(T).

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 7
Post‘s Correspondence Problem
 The Post Correspondence Problem (PCP), introduced by Emil Post in 1946, is an
undecidable decision problem. The PCP problem over an alphabet ∑ is stated as
follows:
 Given the following two lists, M and N of non-empty strings over ∑ −
M = (x1, x2, x3,………, xn)
N = (y1, y2, y3,………, yn)
 We can say that there is a Post Correspondence Solution, if for some i1,i 2,………… ik
, where 1 ≤ i j ≤ n, the condition x i1 …….xik = yi1 …….yik satisfies.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 8
Post‘s Correspondence Problem
Example 1:
 Find whether the lists M = (abb, aa, aaa) and N = (bba, aaa, aa) have a Post
Correspondence Solution?
 Solution:
x1 x2 x3
M abb aa aaa
N bba aaa aa

 Here, x2x1x3 = ‘aaabbaaa’ and y2y1y3 = ‘aaabbaaa’


 We can see that x2x1x3 = y2y1y3 Hence, the solution is i = 2, j = 1, and k = 3.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 9
Post‘s Correspondence Problem
Example 2:
 Find whether the lists M = (ab, bab, bbaaa) and N = (a, ba, bab) have a Post
Correspondence Solution?
 Solution
x1 x2 x3
M ab bab bbaaa
N a ba bab

 In this case, there is no solution because −| x2x1x3 | ≠ | y2y1y3 | (Lengths are not same)
 Hence, it can be said that this Post Correspondence Problem is undecidable.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 10
The Class P and NP
P-Class
 The class P consists of those problems that are solvable in polynomial time, i.e.
these problems can be solved in time O(nk) in worst-case, where k is constant.
 These problems are called tractable, while others are called intractable or
superpolynomial.
 Formally, an algorithm is polynomial time algorithm, if there exists a polynomial p(n)
such that the algorithm can solve any instance of size n in a time O(p(n)).
 Problem requiring Ω(n50) time to solve are essentially intractable for large n. Most
known polynomial time algorithm run in time O(nk) for fairly low value of k.
 The advantages in considering the class of polynomial-time algorithms is that all
reasonable deterministic single processor model of computation can be simulated on each
other with at most a polynomial slow-d.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 11
The Class P and NP
NP-Class
 The class NP consists of those problems that are verifiable in polynomial time. NP is
the class of decision problems for which it is easy to check the correctness of a
claimed answer, with the aid of a little extra information. Hence, we aren’t asking for
a way to find a solution, but only to verify that an alleged solution really is correct.
 Every problem in this class can be solved in exponential time using exhaustive
search.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 12
P v/s NP
 Every decision problem that is solvable by a deterministic polynomial time algorithm
is also solvable by a polynomial time non-deterministic algorithm.
 All problems in P can be solved with polynomial time algorithms, whereas all
problems in NP - P are intractable.
 It is not known whether P = NP. However, many problems are known in NP with the
property that if they belong to P, then it can be proved that P = NP.
 If P ≠ NP, there are problems in NP that are neither in P nor in NP-Complete.
 The problem belongs to class P if it’s easy to find a solution for the problem. The
problem belongs to NP, if it’s easy to check a solution that may have been very
tedious to find.

Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704
(PS) (TOC)
 Unit1 Unit
– Basic
7 – Probability
Undecidability 13
Thank You

You might also like