Decidability (What, stuff is unsolvable?)
|
|
- Meryl Patrick
- 5 years ago
- Views:
Transcription
1 University of Georgia Fall 2014
2 Outline Decidability Decidable Problems for Regular Languages Decidable Problems for Context Free Languages The Halting Problem Countable and Uncountable Sets Diagonalization Unrecognizable Problems
3 Turing Machines Definition A Turing machine is a 7-tuple (Q, Σ, Γ, δ, q 0, q accept, q reject ) such that 1. Q is a finite set of states; 2. Σ is the input alphabet, and / Σ; 3. Γ is the tape alphabet, where Γ and Σ Γ; 4. δ : (Q Γ) (Q Γ {L, R}) is the transition function; 5. q 0 Q is the start state; 6. q accept Q is the accept state; 7. q reject Q is the reject state, and q reject q accept.
4 Configurations Definition The state, tape contents, and tape head position constitute a configuration. An accepting configuration (rejecting configuration) is one in which the machine is in state q accept (q reject ). The start configuration has the tape head in the leftmost position, and the input string is written on it. A string 01010q may be used to indicate a configuration. The transition function maps one configuration to another. Definition A Turing Machine M accepts a string w if there exists a sequence of configurations C 1, C 2,... C n such that 1. C 1 is the starting configuration of M on input w, 2. C n is an accepting configuration, 3. for each 1 i < n, C i yields C i+1. L(M), language of M is the set of strings accepted by M.
5 Turing Recognizable and Decidable Languages Definition A language L is Turing recognizable (recursively enumerable) if there is a Turing machine M such that L(M) = L. It is possible for a TM to never reach a halting configuration. On any given input w, it might instead loop. These are the three options for any input: accept, reject, loop. A TM M that halts on every input is called a decider. If L(M) = L, then M is said to decide L. Definition A language L is Turing decidable (also called recursive) if there is a Turing machine M that decides L.
6 Decidability and Undecidability The definitions indicate that not all languages are decidable. The Church-Turing Thesis equates algorithmically solvable with solvable by Turing machines. A yes/no problem is algorithmically decidable if there is some Turing machine that will decide it. Given any instance of the problem (input), the machine will always halt in finite time with the correct answer (yes or no). A problem is not algorithmically solvable if every TM loops on at least one input. Chapter 4 discusses problems that are solvable/unsolvable by TMs. Knowing which problems are unsolvable is important (and pretty cool). Why try to write a program to solve a problem when someone s already told you it can t be done.
7 Decidability and Undecidability I can t find an... algorithm, I guess I m just too lame. source: MR Garey and DS Johnson. Computers and Intractability. W. H. Freeman, image:
8 Decidability and Undecidability I can t find an... algorithm, because no such algorithm is possible. source: MR Garey and DS Johnson. Computers and Intractability. W. H. Freeman, image:
9 Decidable Problems for Regular Languages The following languages/problems are all decidable. A DFA = { B, w B is a DFA and w L(B)} For any DFA B, L(B) is decidable. A NFA = { B, w B is an NFA and w L(B)} A REX = { R, w R is a regular expression that generates w} E DFA = { B B is a DFA and L(B) = } EQ DFA = { A, B A, B are DFAs and L(A) = L(B)} In each case, the input is a string representing, for instance, a DFA and an input string w. We design a TM to decide the problem (typically by simulating the machines described in the input). A reasonable representation of the DFA is needed. E.g., q 0,..., q n #a 1,..., a m #(q 0, a 0, q i ),... #q 0 #q i, q j,... #w 0... w k
10 Decidable Problems for Regular Languages A DFA is decidable, where A DFA = { B, w B is a DFA and w L(B)}
11 Decidable Problems for Regular Languages A DFA is decidable, where A DFA = { B, w B is a DFA and w L(B)} (Proof idea) We construct a Turing machine M to decide the problem. Scan the input string B, w, determining whether the input constitutes a valid DFA and string w. If not, then reject. Scan the input string repeatedly. Keep track of the current DFA state and position of w. Find the appropriate transition to update the state appropriately. After processing w k, check whether B is in an accept state. If so, then accept B, w. Otherwise reject B, w.
12 Decidable Problems for Regular Languages If B is a DFA, then L(B) is decidable. This is clearly true, as every DFA halts on every input. We can easily create a TM M B to recognize L(B) by modifying the transition function of B to fit the form for TMs. If δ B (q, a) = q, then δ MB (q, a) = (q, a, R). Alternatively, we can use M from the previous proof in M B. On input w, run M on B, w. If M accepts B, w, accept w. Otherwise reject w.
13 Decidable Problems for Regular Languages A NFA is decidable, where A NFA = { B, w B is an NFA and w L(B)}
14 Decidable Problems for Regular Languages A NFA is decidable, where A NFA = { B, w B is an NFA and w L(B)} (Proof idea) We construct another Turing machine N to decide A NFA : Scan the input string B, w, determining whether the input constitutes a valid NFA and string w. If not, then reject. Convert B to a DFA C (using the construction described in Ch 1). Run M on C, w. Accept B, w if M accepts C, w. Otherwise reject B, w.
15 Decidable Problems for Regular Languages A REX is decidable, where A REX = { R, w R is a regular expression that generates w}
16 Decidable Problems for Regular Languages A REX is decidable, where A REX = { R, w R is a regular expression that generates w} (Proof idea) We construct another Turing machine P to decide A REX : Scan the input string R, w, determining whether the input constitutes a valid reg-exp and string w. If not, then reject. Convert R to an NFA A (using the construction described in Ch 1). Run N on A, w. Accept R, w if N accepts A, w. Otherwise reject R, w.
17 Decidable Problems for Regular Languages E DFA is decidable, where E DFA = { A A is a DFA and L(A) = } Idea: Check whether an accept state is reachable from A s start state.
18 Decidable Problems for Regular Languages E DFA is decidable, where E DFA = { A A is a DFA and L(A) = } Idea: Check whether an accept state is reachable from A s start state. (Proof idea) We construct Turing machine T to decide E DFA : Scan the input string A, determining whether the input constitutes a valid DFA. If not, then reject. We assume states of A are listed left to right, with q 0 being leftmost. Mark q 0. Using the transition function of A, mark any unmarked state q such that δ(q, a) = q and q is already marked. Continue until no new nodes can be marked. If an accept state is marked, then reject A. Otherwise accept it.
19 Decidable Problems for Regular Languages EQ DFA is decidable, where EQ DFA = { A, B A, B are DFAs and L(A) = L(B)} Regular languages are closed under complementation, union, intersection. Given A and B, we can construct a DFA for the symmetric difference: Diff = (L(A) L(B)) (L(B) L(A)) If Diff is nonempty, then L(A) L(B).
20 Decidable Problems for Regular Languages EQ DFA is decidable, where EQ DFA = { A, B A, B are DFAs and L(A) = L(B)} Regular languages are closed under complementation, union, intersection. Given A and B, we can construct a DFA for the symmetric difference: Diff = (L(A) L(B)) (L(B) L(A)) If Diff is nonempty, then L(A) L(B). (Proof idea) We construct a Turing machine F to decide EQ DFA : Scan the input string A, B determining whether the input constitutes two valid DFAs A and B. If not, then reject. Construct a string representing the DFA C, where L(C) is the symmetric difference of L(A) and L(B). Run Turing Machine T on C. (Recall that T decides E DFA.) If T accepts C, accept A, B. Otherwise reject it.
21 Decidable Problems for Regular Languages Answer all questions for the following DFA M and give reasons for your answers. 1. Is M, 0110 A DFA? 2. Is M, 001 A DFA? 3. Is M A DFA? 4. Is M, 0110 A REX? 5. Is M E DFA? 6. Is M, M EQ DFA?
22 Decidable Problems for Context Free Languages The following languages/problems are decidable. A CFG = { G, w G is a CFG generating w} E CFG = { G G is a CFG and L(A) = } If G is a CFG, then L(G) is decidable. The following language/problem is NOT decidable. EQ CFG = { G, H G, H are CFGs and L(G) = L(H)} Why won t using (L(G) L(H)) (L(H) L(G)) work in this case?
23 An Undecidable Problem for Context Free Languages The following language/problem is NOT decidable. EQ CFG = { G, H G, H are CFGs and L(G) = L(H)} Context free grammars are not closed under complementation or intersection, and so we cannot use as was done for EQ DFA. (L(G) L(H)) (L(H) L(G))
24 Decidable Problems for Context Free Languages A CFG is decidable, where A CFG = { G, w G is a CFG generating w}.
25 Decidable Problems for Context Free Languages A CFG is decidable, where A CFG = { G, w G is a CFG generating w}. Idea: If G is in CNF, then it takes at most 2n 1 steps to generate w. (Proof idea) We construct a Turing machine S to decide the problem. Scan the input string G, w, determining whether the input constitutes a valid CFG and string w. If not, then reject. Convert G to CNF, using the procedure described in Ch 2. If w = ε, look for grammar rule S ε. If present, then accept. Otherwise reject. If w ε, systematically generate all derivations of at most 2n 1 steps, where w = n. If any of these derivations produce w, then accept. If not, reject.
26 Decidable Problems for Context Free Languages E CFG is decidable, where E CFG = { G G is a CFG and L(G) = }.
27 Decidable Problems for Context Free Languages E CFG is decidable, where E CFG = { G G is a CFG and L(G) = }. Idea: Work backwards from terminal symbols to start symbol S. (Proof idea) We construct a Turing machine R to decide the problem. Scan the input string G, determining whether the input constitutes a valid CFG. If not, then reject. Convert G to Chomsky Normal Form, as described in Ch 2. For each rule A a, mark every occurrence of A in the rules. For each rule of the form A BC, if both B and C are marked, then mark every occurrence of A in the rules. Continue until no new variables are marked. If S is NOT marked, then accept G. Otherwise Reject.
28 Decidable Problems for Context Free Languages E CFG is decidable, where E CFG = { G G is a CFG and L(G) = }. An easier alternative. (Proof idea) We construct a Turing machine R to decide the problem. Scan the input string G, determining whether the input constitutes a valid CFG. If not, then reject. Mark every terminal in every rule. For each rule of the form A w, if every symbol of w is marked, mark every occurrence of A in the rules. Continue until no new variables are marked. If S is NOT marked, then accept G. Otherwise Reject.
29 Decidable Problems for Context Free Languages If G is a CFG, then L(G) is decidable.
30 Decidable Problems for Context Free Languages If G is a CFG, then L(G) is decidable. We can use the machine S, which decides A CFG = { H, w H is a CFG generating w}, to construct a TM M G to decide L(G). On input w, run S on G, w. If S accepts G, w, accept w. Otherwise reject w.
31 Closure Property?Is it closed under Set of Languages Operations RL CFL T-Recog T-Deci Union Y Y Y Y Concatenation Y Y Y Y Star Y Y Y Y Intersection Y N Y Y Complementation Y N N Y RL: Regular Languages; CFL: Context-Free Languages; T-Recog: Turing-Recognizable Languages; T-Deci: Turing Decidable Languages. The intersection of a CFL and a RL is a CFL. It is recommended by Ian Lindsey Berrigan.
32 Undecidable Problems There are problems/languages that are undecidable. In general, program verification (deciding whether a program runs correctly ) is undecidable. The Halting Problem: The most famous undecidable problem in CS. A TM is undecidable, where A TM = { M, w M is a TM and M accepts w}. The proof of this is a proof by contradiction.
33 Undecidable Problems Before we get to the proof, let us first observe that A TM is Turing-recognizable. Thus this theorem shows that recognizers are more powerful than deciders. The following TM U recognizes A TM. U = On input M, w, where M is a TM and w is a string: 1. Simulate M on input w. 2. If M ever enters its accept state, accept; if M ever enters its reject state, reject. Note that this machine loops on M, w if M loops on w. Hence A TM sometimes called the halting problem.
34 The Halting Problem A TM is undecidable, where A TM = { M, w M is a TM and M accepts w}. Proof. Suppose A TM is decidable. Then there s a machine H deciding it. The input of H is a string M, w. M is a TM, and w is a string. H runs M on w. If M accepts w, then H stops and accepts. If M does not accept w, then H stops and rejects. Observe that there is no string on which H does not halt.
35 The Halting Problem continued. Given H, we construct a new Turing machine D: The input of D is a string M. D runs H on M, M. If H accepts M, M, then D rejects M. If H rejects M, M, then D accepts M. Given the definition of H and D: On input M, D accepts M if M does not accept M. D rejects M if M accepts M.
36 The Halting Problem Given the definition of H and D: On input M, D accepts M if M does not accept M. D rejects M if M accepts M. On input D, we then find D accepts D if D does not accept D. D rejects D if D accepts D. Under the assumption that A TM is decidable, there is a machine D which simultaneously accepts and rejects its own specification D. This is a contradiction! And so the assumption that A TM is decidable is false. We conclude that A TM is undecidable.
37 Countability and Uncountability/Diagonalization Implicitly, the proof that A TM is undecidable relies on Cantor s diagonalization method. This is used to prove that a set is uncountable. Recall that a set S is countable if either it is finite or there is a one-to-one correspondence between elements of S and those of N. That is, there is a bijective function f from N to S. injective: For all a, b N, if a b, then f (a) f (b). surjective: For all b S, there is an a N such that f (a) = b. Intuitively, S is countable if we can write the elements of S as a list, and each element of S appears exactly once. A set A is countable if either it is finite or it has the same size as N. The set of positive even integers is countable, as is the set of positive odd numbers. The set of positive rational numbers is countable as well.
38 The set of finite strings are countable The set of finite strings S over any finite alphabet Σ is countably infinite. Assume an ordering of symbols in A. The strings of S can be ordered as follows: For any n 0, all string of length n come before all those of length n + 1. For any given n, arrange the strings of length n in according to the ordering of the alphabet symbols (as in a dictionary). Crucially, for any n, only a finite number of strings have length n. As a corollary to this, the set of Turing machines is countably infinite. Each TM can be written as a finite string over a given alphabet.
39 The set of infinite strings are uncountable In contrast, the set of infinite strings S over a finite alphabet Σ is not countable. We ll prove this using Cantor s diagonalization method, a type of proof by contradiction. Assume Σ = {0, 1} as the alphabet. An infinite binary sequence is an unending sequence of 0s and 1s. Each element of S is an infinitely long string of 0s and 1s. E.g., We will refer to particular bits of a string: b 1b 2b The Set B of infinitely long strings over Σ = {0, 1} is uncountable.
40 The set of infinite strings are uncountable The Set B of infinite strings over Σ = {0, 1} is uncountable. Proof. Assume B is countable. As such, the elements of B can be listed as a sequence s 1, s 2,... (there s a first element, a second element, a third...). Every element of B appears exactly once in the sequence. s 1 = b 1,1b 1,2b 1,3b 1,4b 1,5... s 2 = b 2,1b 2,2b 2,3b 2,4b 2,5... s 3 = b 3,1b 3,2b 3,3b 3,4b 3, Above, b i,j refers to the jth bit of the ith element of B.
41 The set of infinite strings are uncountable The Set B of infinite strings over Σ = {0, 1} is uncountable. Proof, continued. We construct an infinite bitstring X = c 1 c 2 c 3... by examining the diagonal: s 1 = b 1,1 b 1,2b 1,3b 1,4b 1,5... s 2 = b 2,1b 2,2 b 2,3b 2,4b 2,5... s 3 = b 3,1b 3,2b 3,3 b 3,4b 3, For each i 1, if b i,i = 1, then c i = 0. Otherwise c i = 1. For instance: If b 1,1 b 2,2 b 3,3 b 4,4 b 5,5... = Then c 1 c 2 c 3 c 4 c 5... = Observe that for any k, b k,k c k.
42 The set of infinite strings are uncountable The Set B of infinite strings over Σ = {0, 1} is uncountable. Proof, continued. We construct an infinite bitstring X = c 1 c 2 c 3...: If b 1,1 b 2,2 b 3,3 b 4,4 b 5,5... = Then c 1 c 2 c 3 c 4 c 5... = Observe that X is an infinite bitstring and so must be some s n on the list (it must appear somewhere on the list). And so b n,n (the nth bit of s n ) is the same as c n. However, by construction of X, b n,n c n. A contradiction! And so the assumption that B is countable must be false.
43 Characteristic Sequences For any finite Σ, Σ is a set of finite strings and so is countable. That is, we can list out the strings of Σ : s 1, s 2, s 3,.... Any language L over Σ can thus be represented as an infinite bitstring b 1 b 2 b s i L if and only if b i = 1. s i / L if and only if b i = 0. The string b 1 b 2 b 3... is called the characteristic sequence for L. It is clear that, for any Σ, there is a one-to-one correspondence between the languages over Σ and the set of infinite bit-strings. Given the previous proof, the following may be inferred. For any Σ, the set of languages over Σ is uncountable. Corollary There exist languages that are not Turing Recognizable.
44 Back to the Halting Problem The set of Turing Machines is countable, and so we can list them. The set of finite strings over Σ is also countable. We then can construct the following table. M 1 M 2 M 3 M 4... M M M M A 1 in a cell i, j means that M i accepts M j. A 0 in a cell i, j means that M i does not accept M j. And so the table gives a partial description of H.
45 Back to the Halting Problem Recall D: On input M i, D accepts M i if M i does not accept M i. D rejects M i if M i accepts M i. M 1 M 2 M 3 M 4... M M M M So, the output of D can be found by flipping bits in the diagonal.
46 Back to the Halting Problem Recall D: On input M i, D accepts M i if M i does not accept M i. D rejects M i if M i accepts M i. M 1 M 2 M 3 M 4... D... M M M M D ??? So, the output of D can be found by flipping bits in the diagonal. But D must be equal to some M n and so appear on the list. At cell (n, n), the contents is both 1 and 0. A contradiction!
47 Unrecognizable Languages Definition Language L is co-turing recognizable (co-recursively enumerable) if it is the complement of a Turing recognizable language. L is Turing decidable if and only if L is recognizable and co-recognizable. Proof. If L is decidable, then it is clearly recognizable. Also, if M is the machine deciding L, we construct a new machine M to decide L by simply doing the opposite of M. So M recognizes L. As such, L is co-recognizable. Now assume that L is recognizable and co-recognizable. Then L is recognizable, and TMs M 1 and M 2 recognize L and L. We construct TM M deciding L. On input w, M runs M 1 and M 2 in parallel. If M 1 accepts w, then M accepts. If M 2 accepts w, then M rejects. It is clear that it accepts all strings of L and reject all those not in L.
48 Unrecognizable Languages L is Turing decidable if and only if L is recognizable and co-recognizable. A TM = { M, w M is a TM and M accepts w} is undecidable. A TM is clearly recognizable, however. H runs M on w and accepts if and only if M accepts w. From this, the below holds. A TM is not recognizable. Proof. If A TM is recognizable, then a machine M recognizes it. We can construct a machine N to decide A TM by running M and H simultaneously. On any input w, one of them must accept w. If H accepts w, then N accepts. If M accepts, then N rejects. But A TM is not decidable, and so no such machine M exists.
49 More Decidable Problems Show the following languages/problems are decidable. EQ DFA,REX = { A, R A is a DFA, R is a regular expression and L(A) = L(R)} A = { M M is a DFA which does not accept any string containing an odd number of 1s } A ε CFG = { G G is a CFG that generates ε}
50 More Decidable Problems Show the following languages/problems are decidable. S = { M M is a DFA that accepts w R whenever it accepts w} ALL DFA = { A A is a DFA and L(A) = Σ } A = { R, S R and S are regular expressions and L(R) L(S)} A = { R R is a regular expression describing a language containing at least one string w that has 111 as a substring(i.e., w = x111y for some x and y }
51 More Decidable Problems Show the following languages/problems are decidable. INFINITE DFA = { A A is a DFA and L(A) is an infinite language} INFINITE PDA = { B B is a PDA and L(B) is an infinite language}
52 More Decidable Problems INFINITE DFA is decidable, where INFINITE DFA = { A A is a DFA and L(A) is an infinite language}. Proof. The following TM X decides INFINITE DFA. X = On input A where A is a DFA: 1. Let k be the number of states of A. 2. Construct a DFA D that accepts all strings of length k or more. 3. construct a DFA M such that L(M) = L(A) L(D). 4. Test L(M) =, using the E DFA decider T. 5. If T accepts, reject; if T rejects, accept.
53 More Decidable Problems INFINITE PDA is decidable, where INFINITE PDA = { B B is a PDA and L(B) is an infinite language}. Proof. The following TM Y decides INFINITE PDA. Y = On input B where B is a PDA: 1. Convert B to a CFG G and compute G s pumping length p. 2. Construct a regular expression E that contains all strings of length p or more. 3. construct a CFG H such that L(H) = L(G) L(E). 4. Test L(H) =, using the E CFG decider R. 5. If R accepts, reject; if R rejects, accept.
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described
More informationACS2: Decidability Decidability
Decidability Bernhard Nebel and Christian Becker-Asano 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem
More informationCSCE 551: Chin-Tser Huang. University of South Carolina
CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Church-Turing Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan
More informationCS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018
CS 301 Lecture 18 Decidable languages Stephen Checkoway April 2, 2018 1 / 26 Decidable language Recall, a language A is decidable if there is some TM M that 1 recognizes A (i.e., L(M) = A), and 2 halts
More informationTheory of Computation (IX) Yijia Chen Fudan University
Theory of Computation (IX) Yijia Chen Fudan University Review The Definition of Algorithm Polynomials and their roots A polynomial is a sum of terms, where each term is a product of certain variables and
More informationDecidability (intro.)
CHAPTER 4 Decidability Contents Decidable Languages decidable problems concerning regular languages decidable problems concerning context-free languages The Halting Problem The diagonalization method The
More informationacs-07: Decidability Decidability Andreas Karwath und Malte Helmert Informatik Theorie II (A) WS2009/10
Decidability Andreas Karwath und Malte Helmert 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem : decide
More informationV Honors Theory of Computation
V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant
More informationCSE 105 THEORY OF COMPUTATION. Spring 2018 review class
CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus
More informationCS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG) Objectives Recall that decidable languages are languages that can be decided by TM (that means,
More informationTheory of Computation p.1/?? Theory of Computation p.2/?? We develop examples of languages that are decidable
Decidable Languages We use languages to represent various computational problems because we have a terminology for dealing with languages Definition: A language is decidable if there is an algorithm (i.e.
More information1 Showing Recognizability
CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove
More information} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.
and their languages } Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops. } Some languages are Turing-recognizable, but not
More informationDecidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:
Decidability 2017/10/31 Chapter 4.1 in Sipser Ø Announcement: q q q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/decidability.pdf Happy Hollaween! Delayed
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.2 Trace high-level descriptions of algorithms for computational problems. Use
More informationWhat languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?
} We ll now take a look at Turing Machines at a high level and consider what types of problems can be solved algorithmically and what types can t: What languages are Turing-decidable? What languages are
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 2 Design a PDA and a CFG for a given language Give informal description for a PDA,
More informationCPSC 421: Tutorial #1
CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:
More informationTHEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET
THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with
More informationTURING MAHINES
15-453 TURING MAHINES TURING MACHINE FINITE STATE q 10 CONTROL AI N P U T INFINITE TAPE read write move 0 0, R, R q accept, R q reject 0 0, R 0 0, R, L read write move 0 0, R, R q accept, R 0 0, R 0 0,
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 5.1, 5.3 Define and explain core examples of computational problems, including
More informationChomsky Normal Form and TURING MACHINES. TUESDAY Feb 4
Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form: A BC A a S ε B and C aren t start variables a is
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.
More informationUndecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)
We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb) CS /55 Theory of Computation The is A TM = { M,w M is a TM and w L(M)} A TM is Turing-recognizable. Proof Sketch:
More informationDM17. Beregnelighed. Jacob Aae Mikkelsen
DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................
More information4.2 The Halting Problem
172 4.2 The Halting Problem The technique of diagonalization was discovered in 1873 by Georg Cantor who was concerned with the problem of measuring the sizes of infinite sets For finite sets we can simply
More informationIntro to Theory of Computation
Intro to Theory of Computation LECTURE 15 Last time Decidable languages Designing deciders Today Designing deciders Undecidable languages Diagonalization Sofya Raskhodnikova 3/1/2016 Sofya Raskhodnikova;
More informationCS20a: Turing Machines (Oct 29, 2002)
CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Church s thesis The computable functions are the same as the partial recursive
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. May 11/13, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationCOMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages
COMP/MATH 300 Topics for Spring 2017 June 5, 2017 Review and Regular Languages Exam I I. Introductory and review information from Chapter 0 II. Problems and Languages A. Computable problems can be expressed
More informationIntroduction to Turing Machines. Reading: Chapters 8 & 9
Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages
More informationDecidable and undecidable languages
The Chinese University of Hong Kong Fall 2011 CSCI 3130: Formal languages and automata theory Decidable and undecidable languages Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc3130 Problems about
More informationMA/CSSE 474 Theory of Computation
MA/CSSE 474 Theory of Computation CFL Hierarchy CFL Decision Problems Your Questions? Previous class days' material Reading Assignments HW 12 or 13 problems Anything else I have included some slides online
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationMidterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama
Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand
More informationLecture Notes: The Halting Problem; Reductions
Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings
More informationTuring Machines Part III
Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's
More informationUNIT-VIII COMPUTABILITY THEORY
CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the
More informationTuring Machines, diagonalization, the halting problem, reducibility
Notes on Computer Theory Last updated: September, 015 Turing Machines, diagonalization, the halting problem, reducibility 1 Turing Machines A Turing machine is a state machine, similar to the ones we have
More informationCS 125 Section #10 (Un)decidability and Probability November 1, 2016
CS 125 Section #10 (Un)decidability and Probability November 1, 2016 1 Countability Recall that a set S is countable (either finite or countably infinite) if and only if there exists a surjective mapping
More informationIntroduction to Languages and Computation
Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014
More informationFunctions on languages:
MA/CSSE 474 Final Exam Notation and Formulas page Name (turn this in with your exam) Unless specified otherwise, r,s,t,u,v,w,x,y,z are strings over alphabet Σ; while a, b, c, d are individual alphabet
More informationCSCE 551 Final Exam, Spring 2004 Answer Key
CSCE 551 Final Exam, Spring 2004 Answer Key 1. (10 points) Using any method you like (including intuition), give the unique minimal DFA equivalent to the following NFA: 0 1 2 0 5 1 3 4 If your answer is
More informationDecidability. Overview. Preliminaries to Halting Problem. Decidable Problems of Regular Languages. Decidable Problems of Context-Free Languages
CS533 Class 04a: 1 c P. Heeman, 2017 Introduction: Decidability Overview Decidable Problems of Regular Languages Decidable Problems of Context-Free Languages Preliminaries to Halting Problem CS533 Class
More informationCS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)
CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM) Proposed by Alan Turing in 936 finite-state control + infinitely long tape A stronger
More informationFurther discussion of Turing machines
Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. April 18/ May 2, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationTheory of Computation
Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 43 Lecture 10: Overview Linear Bounded Automata Acceptance Problem for LBAs
More informationChap. 4,5 Review. Algorithms created in proofs from prior chapters
Chap. 4,5 Review Algorithms created in proofs from prior chapters (p. 55) Theorem 1.39: NFA to DFA (p. 67) Lemma 1.55: Regex to NFA (p. 69) Lemma 1.60: DFA to regex (through GNFA) (p. 112) Lemma 2.21:
More informationReducability. Sipser, pages
Reducability Sipser, pages 187-214 Reduction Reduction encodes (transforms) one problem as a second problem. A solution to the second, can be transformed into a solution to the first. We expect both transformations
More informationCS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)
CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM)? Proposed by Alan Turing in 936 finite-state control + infinitely long tape A
More informationComputability and Complexity
Computability and Complexity Decidability, Undecidability and Reducibility; Codes, Algorithms and Languages CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario,
More informationTuring Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)
Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) 1 Deterministic Turing Machine (DTM).. B B 0 1 1 0 0 B B.. Finite Control Two-way, infinite tape, broken into
More informationCSCE 551: Chin-Tser Huang. University of South Carolina
CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Computation History A computation history of a TM M is a sequence of its configurations C 1, C 2,, C l such
More informationCSCC63 Worksheet Turing Machines
1 An Example CSCC63 Worksheet Turing Machines Goal. Design a turing machine, M that accepts only strings of the form {w#w w {0, 1} }. Idea. Describe in words how the machine would work. Read first symbol
More informationMidterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama
Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand
More informationCSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS
CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS 1. [6 POINTS] For language L 1 = {0 n 1 m n, m 1, m n}, which string is in L 1? ANSWER: 0001111 is in L 1 (with n =
More informationCS20a: Turing Machines (Oct 29, 2002)
CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Handicapped machines DFA limitations Tape head moves only one direction 2-way DFA
More informationSYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES
Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,
More informationBefore We Start. The Pumping Lemma. Languages. Context Free Languages. Plan for today. Now our picture looks like. Any questions?
Before We Start The Pumping Lemma Any questions? The Lemma & Decision/ Languages Future Exam Question What is a language? What is a class of languages? Context Free Languages Context Free Languages(CFL)
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.1 Explain what it means for a problem to be decidable. Justify the use of encoding.
More informationFinal exam study sheet for CS3719 Turing machines and decidability.
Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,
More informationAutomata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free
More informationCS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)
CS5371 Theory of Computation Lecture 14: Computability V (Prove by Reduction) Objectives This lecture shows more undecidable languages Our proof is not based on diagonalization Instead, we reduce the problem
More informationA non-turing-recognizable language
CS 360: Introduction to the Theory of Computing John Watrous, University of Waterloo A non-turing-recognizable language 1 OVERVIEW Thus far in the course we have seen many examples of decidable languages
More informationComputability Theory
CS:4330 Theory of Computation Spring 2018 Computability Theory Decidable Problems of CFLs and beyond Haniel Barbosa Readings for this lecture Chapter 4 of [Sipser 1996], 3rd edition. Section 4.1. Decidable
More informationProperties of Context-Free Languages. Closure Properties Decision Properties
Properties of Context-Free Languages Closure Properties Decision Properties 1 Closure Properties of CFL s CFL s are closed under union, concatenation, and Kleene closure. Also, under reversal, homomorphisms
More informationThe View Over The Horizon
The View Over The Horizon enumerable decidable context free regular Context-Free Grammars An example of a context free grammar, G 1 : A 0A1 A B B # Terminology: Each line is a substitution rule or production.
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Section 4.1 Explain what it means for a problem to be decidable. Justify the use
More informationHomework Assignment 6 Answers
Homework Assignment 6 Answers CSCI 2670 Introduction to Theory of Computing, Fall 2016 December 2, 2016 This homework assignment is about Turing machines, decidable languages, Turing recognizable languages,
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s Agenda Quick Review of CFG s and PDA s Introduction to Turing Machines and their Languages Reminders and
More informationCS 361 Meeting 26 11/10/17
CS 361 Meeting 26 11/10/17 1. Homework 8 due Announcements A Recognizable, but Undecidable Language 1. Last class, I presented a brief, somewhat inscrutable proof that the language A BT M = { M w M is
More informationUndecidable Problems and Reducibility
University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 4.1 Explain what it means for a problem to be decidable. Justify the use of encoding.
More informationCSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY
CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY RYAN DOUGHERTY If we want to talk about a program running on a real computer, consider the following: when a program reads an instruction,
More informationUndecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK
COMS11700 Undecidability Department of Computer Science, University of Bristol Bristol, UK 4 April 2014 COMS11700: Undecidability Slide 1/29 Decidability We are particularly interested in Turing machines
More informationCP405 Theory of Computation
CP405 Theory of Computation BB(3) q 0 q 1 q 2 0 q 1 1R q 2 0R q 2 1L 1 H1R q 1 1R q 0 1L Growing Fast BB(3) = 6 BB(4) = 13 BB(5) = 4098 BB(6) = 3.515 x 10 18267 (known) (known) (possible) (possible) Language:
More informationIntro to Theory of Computation
Intro to Theory of Computation LECTURE 14 Last time Turing Machine Variants Church-Turing Thesis Today Universal TM Decidable languages Designing deciders Sofya Raskhodnikova 3/1/2016 Sofya Raskhodnikova;
More informationMapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:
Mapping Reducibility 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/mapping.pdf 1 Last time Reducibility
More informationTuring Machine Recap
Turing Machine Recap DFA with (infinite) tape. One move: read, write, move, change state. High-level Points Church-Turing thesis: TMs are the most general computing devices. So far no counter example Every
More informationDecidability and Undecidability
Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an
More informationTuring Machines. Wolfgang Schreiner
Turing Machines Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang Schreiner
More informationComputability Theory. CS215, Lecture 6,
Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 4.1, 5.1 Define reductions from one problem to another. Use reductions to prove
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review and More Problems A Non-TR Language Reminders and announcements: HW 7 (Last!!)
More informationCS481F01 Solutions 8
CS481F01 Solutions 8 A. Demers 7 Dec 2001 1. Prob. 111 from p. 344 of the text. One of the following sets is r.e. and the other is not. Which is which? (a) { i L(M i ) contains at least 481 elements }
More informationFoundations of Informatics: a Bridging Course
Foundations of Informatics: a Bridging Course Week 3: Formal Languages and Semantics Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen University noll@cs.rwth-aachen.de http://www.b-it-center.de/wob/en/view/class211_id948.html
More informationThe Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability
The Turing Machine Computability Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical provides a
More informationThe Unsolvability of the Halting Problem. Chapter 19
The Unsolvability of the Halting Problem Chapter 19 Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing Machines D and SD A TM M with
More informationHarvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs
Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harry Lewis October 8, 2013 Reading: Sipser, pp. 119-128. Pushdown Automata (review) Pushdown Automata = Finite automaton
More informationCS21 Decidability and Tractability
CS21 Decidability and Tractability Lecture 8 January 24, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis So far several models of computation finite automata
More informationQuestion Bank UNIT I
Siddhivinayak Technical Campus School of Engineering & Research Technology Department of computer science and Engineering Session 2016-2017 Subject Name- Theory of Computation Subject Code-4KS05 Sr No.
More informationLanguages, regular languages, finite automata
Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,
More informationTuring machines and linear bounded automata
and linear bounded automata Informatics 2A: Lecture 30 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November 2016 1 / 17 The Chomsky hierarchy: summary Level Language
More informationCS 154 NOTES MOOR XU NOTES FROM A COURSE BY LUCA TREVISAN AND RYAN WILLIAMS
CS 154 NOTES MOOR XU NOTES FROM A COURSE BY LUCA TREVISAN AND RYAN WILLIAMS Abstract. These notes were taken during CS 154 (Automata and Complexity Theory) taught by Luca Trevisan and Ryan Williams in
More informationCSCI3390-Assignment 2 Solutions
CSCI3390-Assignment 2 Solutions due February 3, 2016 1 TMs for Deciding Languages Write the specification of a Turing machine recognizing one of the following three languages. Do one of these problems.
More informationTuring Machines. Lecture 8
Turing Machines Lecture 8 1 Course Trajectory We will see algorithms, what can be done. But what cannot be done? 2 Computation Problem: To compute a function F that maps each input (a string) to an output
More information