Theory of Computation

Size: px
Start display at page:

Download "Theory of Computation"

Transcription

1 Thomas Zeugmann Hokkaido University Laboratory for Algorithmics thomas/toc/ Lecture 14: Applications of PCP

2 Goal of this Lecture Our goal is to present some typical undecidability results for problems arising naturally in formal language theory. Here our main focus is on context-free languages but we shall also look at regular languages and the family L 0.

3 Undecidability Results for Context-free Languages I As we have seen in Lecture 6, there are context-free languages L 1 and L 2 such that L 1 L 2 CF. So, it would be nice to have an algorithm which, on input any two context-free grammars G 1, G 2, returns 1, if L(G 1 ) L(G 2 ) CF, and 0 otherwise. Unfortunately, such an algorithm does not exist. Also, some closely related problems cannot be solved algorithmically as our next theorem states.

4 Undecidability Results for Context-free Languages II Theorem 1 The following problems are undecidable for any context-free grammars G 1, G 2 : (1) L(G 1 ) L(G 2 ) =, (2) L(G 1 ) L(G 2 ) is infinite, (3) L(G 1 ) L(G 2 ) CF, (4) L(G 1 ) L(G 2 ) REG.

5 Proof I Proof. The general proof idea is as follows. We construct a context-free language L S (here S stands for standard) and for any PCP [{a, b}, n, P, Q] a language L(P, Q) such that L S L(P, Q) if and only if [{a, b}, n, P, Q] is solvable.

6 Proof I Proof. The general proof idea is as follows. We construct a context-free language L S (here S stands for standard) and for any PCP [{a, b}, n, P, Q] a language L(P, Q) such that L S L(P, Q) if and only if [{a, b}, n, P, Q] is solvable. Let Σ = {a, b, c} and define L S = {pcqcq T cp T p, q {a, b} +, c Σ}. (1) Furthermore, for any p 1,..., p n, where p i {a, b} +, we set L(p 1,..., p n ) = {ba i k b ba i 1 cp i1 p i2 p ik k 1, j[1 j k 1 i j n]}. Here the idea is to encode in a i j the index i j.

7 Proof II Now, let [{a, b}, n, P, Q] be any PCP, then we define the language L(P, Q) as follows: L(P, Q) = L(p 1,..., p n ){c}l T (q 1,..., q n ). (2) Claim 1. L S, L(p 1,..., p n ) and L(P, Q) are context-free. First, we define a grammar G S = [{a, b, c}, {σ, h}, σ, P], where the production set P is defined as follows: σ aσa σ bσb σ chc h aha h bhb h c

8 Proof III Clearly, G S is context-free. Furthermore, we have: σ wσw T wchcw T wcvhv T cw T wcvcv T cw T, where w, v {a, b} +. Hence L(G S ) L S. The inclusion L S L(G S ) is obvious. Consequently, L S CF.

9 Proof III Clearly, G S is context-free. Furthermore, we have: σ wσw T wchcw T wcvhv T cw T wcvcv T cw T, where w, v {a, b} +. Hence L(G S ) L S. The inclusion L S L(G S ) is obvious. Consequently, L S CF. Next, let P = [p 1,..., p n ]. We define a grammar G P = [{a, b, c}, {σ}, σ, P], where P = {σ ba i σp i i = 1,..., n} {σ c}. Clearly, G P is context-free, L(G P ) = L(p 1,..., p n ) and thus L(p 1,..., p n ) CF.

10 Proof IV By Theorem 6.4 we know that CF is closed under transposition. Therefore, we can conclude that L T (p 1,..., p n ) CF, too. Moreover, CF is closed under product. Consequently, L(P, Q) is context-free for any PCP. This proves Claim 1.

11 Proof IV By Theorem 6.4 we know that CF is closed under transposition. Therefore, we can conclude that L T (p 1,..., p n ) CF, too. Moreover, CF is closed under product. Consequently, L(P, Q) is context-free for any PCP. This proves Claim 1. Claim 2. For every PCP we have: L S L(P, Q) if and only if [{a, b}, n, P, Q] is solvable.

12 Proof IV By Theorem 6.4 we know that CF is closed under transposition. Therefore, we can conclude that L T (p 1,..., p n ) CF, too. Moreover, CF is closed under product. Consequently, L(P, Q) is context-free for any PCP. This proves Claim 1. Claim 2. For every PCP we have: L S L(P, Q) if and only if [{a, b}, n, P, Q] is solvable. Necessity. Let L S L(P, Q) and consider any string r L S L(P, Q), i.e., r = ba i k b ba i 1 } {{ } c p i1 p ik c (q j1 q jm ) T c (ba jm b ba j1 ) T } {{ }} {{ }} {{ } w 1 w 3 w 4 w 2 Since r L S, we directly see that w 1 = w T 2 and w 3 = w T 4. Consequently, we get k = m and i l = j l for l = 1,..., k. Thus, the equality w 3 = w T 4 provides a solution of [{a, b}, n, P, Q].

13 Proof V Sufficiency. Let [{a, b}, n, P, Q] be solvable. Then there exist a finite sequence i 1, i 2..., i k of natural numbers such that i j n for all 1 j k, and p i1 p i2 p ik = q i1 q i2 q ik. So, one directly gets a string r L S L(P, Q). This proves Claim 2. Claim 1 and 2 together directly imply Assertion (1) via the undecidability of PCP.

14 Proof VI For showing Assertion (2), we can use the same ideas plus the following Claim. Claim 3. L S L(P, Q) is infinite if and only if L S L(P, Q). The necessity is trivial. For showing the sufficiency, let i 1, i 2..., i k be a finite sequence of natural numbers such that i j n for all 1 j k, and p i1 p i2 p ik = q i1 q i2 q ik. Therefore, we also have (p i1 p i2 p ik ) m = (q i1 q i2 q ik ) m, that is, (i 1, i 2..., i k ) m is a solution of [{a, b}, n, P, Q] for every m 1. But this means, if then also w 1 cw 3 cw 4 cw 2 L S L(P, Q), w m 1 cwm 3 cwm 4 cwm 2 L S L(P, Q) for every m N +. This proves Claim 3, and thus Assertion (2) is shown.

15 Proof VII It remains to prove Assertions (3) and (4). This done via the following claim. Claim 4. L S L(P, Q) does not contain any infinite context-free language. Assuming Claim 4, Assertions (3) and (4) can be obtained, since the following assertions are equivalent. (α) L S L(P, Q) =, (β) L S L(P, Q) REG, (γ) L S L(P, Q) CF. Obviously, (α) implies (β) and (β) implies (γ). Thus, we have only to prove that (γ) implies (α). This is equivalent to showing that the negation of (α) implies the negation of (γ).

16 Proof VIII So, let us assume the negation of (α), i.e., L S L(P, Q). By Claim 3, we then know that L S L(P, Q) is infinite. Now Claim 4 tells us that L S L(P, Q) CF. Thus, we have shown the negation of (γ).

17 Proof VIII So, let us assume the negation of (α), i.e., L S L(P, Q). By Claim 3, we then know that L S L(P, Q) is infinite. Now Claim 4 tells us that L S L(P, Q) CF. Thus, we have shown the negation of (γ). Under the assumption that Claim 4 is true, we have thus established the equivalence of (α), (β) and (γ). Consequently, by Claim 2 we then know that L S L(P, Q) CF if and only if [{a, b}, n, P, Q] is not solvable and also that L S L(P, Q) REG if and only if [{a, b}, n, P, Q] is not solvable. This proves Assertions (3) and (4).

18 Proof IX So, it remains to show Claim 4. Let [{a, b}, n, P, Q] be arbitrarily fixed. Suppose there is a language L L S L(P, Q) such that L is infinite and context-free. Now we apply the qrsuv-theorem. Thus, there exists a k N such that for all w L with w k there are strings q, r, s, u, v such that w = qrsuv and ru λ and qr i su i v L for all i N. Since by supposition L is infinite there must exist a string w L with w k. Furthermore, L L(P, Q) and therefore w must have the form w = w 1 cw 2 cw 3 cw 4, where w i {a, b} +, i = 1, 2, 3, 4. (3) That is, w contains exactly three times the letter c. Now, let w = qrsuv. We distinguish the following cases.

19 Proof X Case 1. c is a substring of ru. Then qr i su i v L for every i N and hence qr i su i v contains at least four c s for every i 4. So, Case 1 cannot happen.

20 Proof XI Case 2. c is not a substring of ru. Then, neither r nor u could be substrings of ba i 1b ba i k. If r or u start and end with b, then qr 2 su 2 v L(P, Q). If both r and u do not start and end with b, then r {a} + or u {a} + is impossible, since qr n+1 su n+1 v then violates the condition that we have at most n consecutive a s. Otherwise, we get a contradiction to the definition of L(P, Q), since then we have more blocks of a s than there are p i s or q j s. Finally, the only remaining possibility is that r is a substring of w 2 or r is a substring of w 3 (cf. (3)). In either case, then qr i su i v L(P, Q) for i 2, since the length of w 1 and w 2 as well as the length of w 3 and w 4 are related. This is one of the reasons we have included the a i j into the definition of L(P, Q). This proves Claim 4, and thus the theorem is shown.

21 Undecidability Results for Context-free Languages III Next, we turn our attention to problems involving the complement of context-free languages. Recall that CF is not closed under complement. However, due to lack of time, we have to omit a certain part of the following proof. Theorem 2 The following problems are undecidable for any context-free grammar G: (1) L(G) =, (2) L(G) is infinite, (3) L(G) CF, (4) L(G) REG, (5) L(G) REG.

22 Proof I We use the notions from the demonstration of the previous Theorem. Consider L = df L S L(P, Q). Note that L is always context-free. We do not prove this assertion here. The interested reader is referred to Ginsburg (1966). For showing (1), suppose the converse. Then, given the fact that L is context-free, there is a context-free grammar G such that L = L(G). So, we could run the algorithm on input G. On the other hand, L = L S L(P, Q). Thus, we could decide whether or not L S L(P, Q) =. By Claim 2 in the proof of the previous Theorem, this implies that we can decide whether or not a PCP is solvable; a contradiction to the undecidability of PCP.

23 Proof II Assertion (2) is shown analogously via (2) of the previous Theorem. Assertion (3) and (4) also follow directly from the previous Theorem by using its Assertions (3) and (4), respectively. Finally, Assertion (5) is a direct consequence of Assertion (4) and the fact that L REG if and only if L REG (cf. Problem 4.2).

24 Undecidability Results for Context-free Languages IV Furthermore, the theorems shown above directly allow for the following corollary. Corollary 3 The following problems are undecidable for any context-free grammars G 1, G 2 : (1) L(G 1 ) = L(G 2 ), (2) L(G 1 ) L(G 2 ).

25 Proof of the Corollary I Proof. Suppose (1) is decidable. Let G 1 be any context-free grammar such that L(G 1 ) = L = L S L(P, Q) (see the proof of the latter theorem). Furthermore, let G 2 be any context-free grammar such that L(G 2 ) = {a, b, c} = Σ. Then L = Σ L S L(P, Q) = Σ L S L(P, Q) = [{a, b}, n, P, Q] is not solvable, a contradiction to the undecidability of PCP. This proves Assertion (1).

26 Proof of the Corollary II If (2) would be decidable, then (1) would be decidable, too, since L(G 1 ) = L(G 2 ) L(G 1 ) L(G 2 ) and L(G 2 ) L(G 1 ), (4) a contradiction. Therefore, we obtain that (2) is not decidable and Assertion (2) is shown.

27 Regular Languages I This is a good place to summarize our knowledge about regular languages and to compare the results obtained to the undecidability results for context-free languages shown above. As we have shown, L REG if and only if there exists a deterministic finite automaton A such that L = L(A). Therefore, we can directly get the following corollary. Corollary 4 The regular languages are closed under complement.

28 Regular Languages II Furthermore, the regular languages are closed under union, product and Kleene closure. So, recalling a bit set theory, we know that L 1 L 2 = L 1 L 2. Hence we directly get the following corollary. Corollary 5 The regular languages are closed under intersection. Moreover, as shown in Lecture 4, there is an algorithm which on input any regular grammar G decides whether or not L(G) is infinite. Using the algorithm given in the proof of this Theorem, we can also conclude that there is an algorithm which on input any regular grammar G decides whether or not L(G) is finite. Looking at the proof of Theorem 4.5, we also get the following corollary.

29 Regular Languages III Corollary 6 There is an algorithm which on input any regular grammar G decides whether or not L(G) =. Proof. Let G be a regular grammar. The algorithm first constructs a deterministic finite automaton A = [Σ, Q, δ, q 0, F] such that L(G) = L(A). Let card(q) = n. Then, the algorithm checks whether or not there is a string s such that n + 1 s 2n + 2 with s L(A). If there is no such string, then by the proof of Theorem 4.5 we already know that L(G) is finite. Thus, it suffices to check whether or not there is a string s such that s n and s L(A). If there is such string, output L(G). Otherwise, output L(G) =. Of course, this is not the most efficient algorithm.

30 Regular Languages IV Finally, you have shown that REG is closed under set difference (cf. Problem 4.2 of our Exercise sets). Thus, we also have the following corollary. Corollary 7 There is an algorithm which on input any regular grammars G 1 and G 2 decides whether or not L(G 1 ) L(G 2 ). Proof. Since REG is closed under set difference, we know that L(G 1 ) \ L(G 2 ) REG. Furthermore, a closer inspection of the proof given shows that we can construct a grammar G such that L(G) = L(G 1 ) \ L(G 2 ). Again recalling a bit set theory, we have L(G 1 ) L(G 2 ) if and only if L(G) =. By the corollary above, it is decidable whether or not L(G) =.

31 Regular Languages V Using the same idea as above (see (4)), we also see that there is an algorithm which on input any regular grammars G 1 and G 2 decides whether or not L(G 1 ) = L(G 2 ).

32 Regular Languages V Using the same idea as above (see (4)), we also see that there is an algorithm which on input any regular grammars G 1 and G 2 decides whether or not L(G 1 ) = L(G 2 ). Thus, we can conclude that all the above problems considered for context-free languages when stated mutatis mutandis for regular languages are decidable.

33 Definitions We need some more notations which we introduce below. Let A N be any set. We have already defined the characteristic function χ A, i.e., χ A (x) = 1 if x A and χ A (x) = 0 if x A. Next, we introduce the partial characteristic function π A defined as follows. π A (x) = { 1, if x A ; not defined, otherwise. Definition 1 Let A N; then A is said to (1) be recursive if χ A R, (2) be recursively enumerable if π A P.

34 Examples (1) The set of all prime numbers is recursive. (2) The set of all odd numbers is recursive. (3) The set of all even numbers is recursive. (4) is recursive. (5) Every finite set is recursive. (6) Every recursive set is recursively enumerable. (7) Let A be any recursive set. Then its complement A is recursive, too.

35 Characterization Theorem 8 Let A N; then we have: A is recursive if and only if A is recursively enumerable and A is recursively enumerable. Proof. Necessity. If A is recursive then A is recursively enumerable. As mentioned above, the complement A of every recursive set A is recursive, too. Thus, A is also recursively enumerable.

36 Characterization Theorem 8 Let A N; then we have: A is recursive if and only if A is recursively enumerable and A is recursively enumerable. Proof. Necessity. If A is recursive then A is recursively enumerable. As mentioned above, the complement A of every recursive set A is recursive, too. Thus, A is also recursively enumerable. Sufficiency. If both A and A are recursively enumerable, then π A P and π A P. Thus, we can express χ A as follows. χ A (x) = Consequently, χ A R. { 1, if πa (x) = 1 ; 0, if π A (x) = 1.

37 Consequences I The latter theorem can be used to show that there are recursively enumerable sets which are not recursive. Corollary 9 The halting set K is recursively enumerable but not recursive. Proof. Recall that K = {i i N, ψ i (i) }, where ψ P 2 is universal for P. Since ψ P 2, there must exist a TM M such that f 2 M = ψ. Hence, we have the following equivalence: π K (i) = 1 ψ i (i) M(i, i) stops. Thus, in order to compute π K (i) it suffices to start the Turing machine M on input (i, i). If the computation terminates, the algorithm for computing π K (i) outputs 1. Otherwise, the algorithm does not terminate. Consequently, π K P.

38 Consequences II Suppose K to be recursive. Then, χ K R, a contradiction to the undecidability of the halting problem. Corollary 10 The complement K of the halting set K is not recursively enumerable. So, it remains to relate the language family L 0 to Turing machines. This is done by the following theorems.

39 Turing Machines and L 0 Theorem 11 Let G be any type-0 grammar. Then there exists a Turing machine M such that L(G) = L(M).

40 Turing Machines and L 0 Theorem 11 Let G be any type-0 grammar. Then there exists a Turing machine M such that L(G) = L(M). The opposite is also true. Theorem 12 For every Turing machine M there exists a type-0 grammar G such that L(M) = L(G). Due to the lack of time, we do not prove these theorems here.

41 Turing Machines and L 0 So, we directly get the following corollary. Corollary 13 L 0 is equal to the family of all recursively enumerable sets. Now, we are ready to show the theorem already announced at the end of Lecture 10, i.e., that membership is not decidable for languages from L 0. Theorem 14 There does not exist any algorithm that on input any type-0 grammar G = [T, N, σ, P] and any string s T decides whether or not s L(G).

42 Proof We know that K is recursively enumerable but not recursive. Since π K P, there exists a Turing machine computing π K. Then we can conclude that there is a grammar G such that L(G) = K. Thus, if we could decide s L(G) for every s N, then K would be recursive, a contradiction.

43 Further Properties I Since K is not recursively enumerable, we also have the following corollary. Corollary 15 L 0 is not closed under complement and set difference. Interestingly, the ideas used in the proof of Theorem 2.1 directly yield the following theorem. Theorem 16 The language family L 0 is closed under union, product and Kleene closure.

44 Further Properties II Theorem 17 There does not exist any algorithm which, on input any type-0 grammar G decides whether or not L(G) =. Proof. Suppose the converse. Let G = [T, N, σ, P] be any grammar and let w T be arbitrarily fixed. We construct a grammar G = [T, N { σ, #}, σ, P], where P is as follows: P = P { σ #σ#, #w# λ}. Note that #w# λ is the only production which can remove the # symbols. Thus, we get L( G) = { {λ}, if w L(G) ;, otherwise.

45 Further Properties III Consequently, w L(G) if and only if L( G) =. Thus, we can decide L( G) = if and only if we can decide w L(G). But the latter problem is undecidable. Since the construction of G can be done algorithmically, we obtain a contradiction.

46 Further Properties IV Corollary 18 The following problems are undecidable for any type-0 grammars G 1, G 2 : (1) L(G 1 ) = L(G 2 ), (2) L(G 1 ) L(G 2 ). Proof. Let G be any type-0 grammar such that L(G ) =. Then we have for any type-0 grammar G: L(G) = L(G) L(G ) L(G) = L(G ), and thus both the inclusion and equivalence problem, respectively, are reduced to the decidability of the emptiness problem.

47 Remark As a general rule of thumb you should memorize that every non-trivial problem is undecidable for type-0 grammars. Here by non-trivial we mean that there are infinitely many grammars satisfying the problem and infinitely many grammars not satisfying the problem.

48 Problem REG CF CS Type 0 1) s L(G) ) L(G 1 ) L(G 2 ) + 3) L(G 1 ) = L(G 2 ) + 4) L(G) = + + 5) L(G) finite + + 6) L(G) infinite + + 7) L(G) = + 8) L(G) infinite + 9) L(G) has the + + same type as L(G) 10) L(G) REG + 11) L(G) CF + 12) L(G 1 ) L(G 2 ) = + 13) L(G 1 ) L(G 2 ) finite + 14) L(G 1 ) L(G 2 ) infinite + 15) L(G) = T + 16) L(G) REG +

49 Thank you!

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 10: CF, PDAs and Beyond Greibach Normal Form I We want to show that all context-free

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 13: Algorithmic Unsolvability The Halting Problem I In the last lecture we have shown

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 12: Turing Machines Turing Machines I After having dealt with partial recursive functions,

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 1: Introducing Formal Languages Motivation I This course is about the study of a fascinating

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

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 information

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

The 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 information

CS481F01 Solutions 8

CS481F01 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 information

Computational Models Lecture 9, Spring 2009

Computational Models Lecture 9, Spring 2009 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models Lecture 9, Spring 2009 Reducibility among languages Mapping reductions More undecidable

More information

6.8 The Post Correspondence Problem

6.8 The Post Correspondence Problem 6.8. THE POST CORRESPONDENCE PROBLEM 423 6.8 The Post Correspondence Problem The Post correspondence problem (due to Emil Post) is another undecidable problem that turns out to be a very helpful tool for

More information

Theory of Computation

Theory 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 information

16.1 Countability. CS125 Lecture 16 Fall 2014

16.1 Countability. CS125 Lecture 16 Fall 2014 CS125 Lecture 16 Fall 2014 16.1 Countability Proving the non-existence of algorithms for computational problems can be very difficult. Indeed, we do not know how to prove P NP. So a natural question is

More information

Lecture Notes: The Halting Problem; Reductions

Lecture 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 information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction 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 information

Computability and Complexity

Computability and Complexity Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition

More information

On Rice s theorem. Hans Hüttel. October 2001

On Rice s theorem. Hans Hüttel. October 2001 On Rice s theorem Hans Hüttel October 2001 We have seen that there exist languages that are Turing-acceptable but not Turing-decidable. An important example of such a language was the language of the Halting

More information

Limits of Computability

Limits of Computability Limits of Computability 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 information

Theory of Computation - Module 4

Theory of Computation - Module 4 Theory of Computation - Module 4 Syllabus Turing Machines Formal definition Language acceptability by TM TM as acceptors, Transducers - designing of TM- Two way infinite TM- Multi tape TM - Universal Turing

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 15 Ana Bove May 17th 2018 Recap: Context-free Languages Chomsky hierarchy: Regular languages are also context-free; Pumping lemma

More information

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5.

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5. CSCC63 Worksheet Reducability For your reference, A T M is defined to be the language { M, w M accepts w}. 1 Reducability Theorem 5.1 HALT TM = { M, w M is a T M that halts on input w} is undecidable.

More information

Computability Theory

Computability 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 information

Undecidable Problems and Reducibility

Undecidable 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 information

CSCE 551: Chin-Tser Huang. University of South Carolina

CSCE 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 information

CSCE 551: Chin-Tser Huang. University of South Carolina

CSCE 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 information

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CSE355 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 information

Decidability (What, stuff is unsolvable?)

Decidability (What, stuff is unsolvable?) University of Georgia Fall 2014 Outline Decidability Decidable Problems for Regular Languages Decidable Problems for Context Free Languages The Halting Problem Countable and Uncountable Sets Diagonalization

More information

CS 7220 Computational Complexity and Algorithm Analysis

CS 7220 Computational Complexity and Algorithm Analysis CS 7220 Computational Complexity and Algorithm Analysis Spring 2016 Section 7: Computability Part IV Undecidability Pascal Hitzler Data Semantics Laboratory Wright State University, Dayton, OH http://www.pascal-hitzler.de

More information

Reductions in Computability Theory

Reductions in Computability Theory Reductions in Computability Theory Prakash Panangaden 9 th November 2015 The concept of reduction is central to computability and complexity theory. The phrase P reduces to Q is often used in a confusing

More information

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)

Undecidability. 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 information

CS 361 Meeting 28 11/14/18

CS 361 Meeting 28 11/14/18 CS 361 Meeting 28 11/14/18 Announcements 1. Homework 9 due Friday Computation Histories 1. Some very interesting proos o undecidability rely on the technique o constructing a language that describes the

More information

Turing Machines Part III

Turing 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 information

ACS2: Decidability Decidability

ACS2: 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 information

Theory of Computation p.1/?? Theory of Computation p.2/?? We develop examples of languages that are decidable

Theory 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 information

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

CS5371 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 information

DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17. 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 information

Computability Crib Sheet

Computability Crib Sheet Computer Science and Engineering, UCSD Winter 10 CSE 200: Computability and Complexity Instructor: Mihir Bellare Computability Crib Sheet January 3, 2010 Computability Crib Sheet This is a quick reference

More information

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

CS 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 information

Lecture 12: Mapping Reductions

Lecture 12: Mapping Reductions Lecture 12: Mapping Reductions October 18, 2016 CS 1010 Theory of Computation Topics Covered 1. The Language EQ T M 2. Mapping Reducibility 3. The Post Correspondence Problem 1 The Language EQ T M The

More information

The View Over The Horizon

The 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 information

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff Decidability Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff 1 A property P of strings is said to be decidable if the set of all strings having property P is a recursive set; that

More information

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y CPS220 Reducibility A reduction is a procedure to convert one problem to another problem, in such a way that a solution to the second problem can be used to solve the first problem. The conversion itself

More information

UNIT-VIII COMPUTABILITY THEORY

UNIT-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 information

Non-emptiness Testing for TMs

Non-emptiness Testing for TMs 180 5. Reducibility The proof of unsolvability of the halting problem is an example of a reduction: a way of converting problem A to problem B in such a way that a solution to problem B can be used to

More information

Chapter 6. Properties of Regular Languages

Chapter 6. Properties of Regular Languages Chapter 6 Properties of Regular Languages Regular Sets and Languages Claim(1). The family of languages accepted by FSAs consists of precisely the regular sets over a given alphabet. Every regular set is

More information

5 3 Watson-Crick Automata with Several Runs

5 3 Watson-Crick Automata with Several Runs 5 3 Watson-Crick Automata with Several Runs Peter Leupold Department of Mathematics, Faculty of Science Kyoto Sangyo University, Japan Joint work with Benedek Nagy (Debrecen) Presentation at NCMA 2009

More information

Computational Models - Lecture 5 1

Computational Models - Lecture 5 1 Computational Models - Lecture 5 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 10/22, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

} 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 information

34.1 Polynomial time. Abstract problems

34.1 Polynomial time. Abstract problems < Day Day Up > 34.1 Polynomial time We begin our study of NP-completeness by formalizing our notion of polynomial-time solvable problems. These problems are generally regarded as tractable, but for philosophical,

More information

Decidability (intro.)

Decidability (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 information

Properties of Context-Free Languages. Closure Properties Decision Properties

Properties 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 information

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012 Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM

More information

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

CS 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 information

Computational Models Lecture 8 1

Computational 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 information

MA/CSSE 474 Theory of Computation

MA/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 information

1 Showing Recognizability

1 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

Computational Models Lecture 8 1

Computational 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 information

From Fundamentele Informatica 1: inleverdatum 1 april 2014, 13:45 uur. A Set A of the Same Size as B or Larger Than B. A itself is not.

From Fundamentele Informatica 1: inleverdatum 1 april 2014, 13:45 uur. A Set A of the Same Size as B or Larger Than B. A itself is not. Fundamentele Informatica 3 voorjaar 2014 http://www.liacs.nl/home/rvvliet/fi3/ Rudy van Vliet kamer 124 Snellius, tel. 071-527 5777 rvvliet(at)liacs(dot)nl college 8, 31 maart 2014 8. Recursively Enumerable

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

Ogden s Lemma for CFLs

Ogden s Lemma for CFLs Ogden s Lemma for CFLs Theorem If L is a context-free language, then there exists an integer l such that for any u L with at least l positions marked, u can be written as u = vwxyz such that 1 x and at

More information

Functions on languages:

Functions 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 information

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY No part of this publication may be reproduced or distributed in any form or any means, electronic, mechanical, photocopying, or otherwise without the prior permission of the author. GATE SOLVED PAPER Computer

More information

CS 455/555: Finite automata

CS 455/555: Finite automata CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently

More information

Introduction to Turing Machines

Introduction to Turing Machines Introduction to Turing Machines Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 12 November 2015 Outline 1 Turing Machines 2 Formal definitions 3 Computability

More information

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

SYLLABUS. 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 information

Automata Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

Notes for Lecture Notes 2

Notes for Lecture Notes 2 Stanford University CS254: Computational Complexity Notes 2 Luca Trevisan January 11, 2012 Notes for Lecture Notes 2 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

Homework 8. a b b a b a b. two-way, read/write

Homework 8. a b b a b a b. two-way, read/write Homework 8 309 Homework 8 1. Describe a TM that accepts the set {a n n is a power of 2}. Your description should be at the level of the descriptions in Lecture 29 of the TM that accepts {ww w Σ } and the

More information

TAKE-HOME: OUT 02/21 NOON, DUE 02/25 NOON

TAKE-HOME: OUT 02/21 NOON, DUE 02/25 NOON CSE 555 MIDTERM EXAMINATION SOLUTIONS TAKE-HOME: OUT 02/21 NOON, DUE 02/25 NOON The completed test is to be submitted electronically to colbourn@asu.edu before the deadline, or time-stamped by the main

More information

Advanced Undecidability Proofs

Advanced Undecidability Proofs 17 Advanced Undecidability Proofs In this chapter, we will discuss Rice s Theorem in Section 17.1, and the computational history method in Section 17.3. As discussed in Chapter 16, these are two additional

More information

Section 14.1 Computability then else

Section 14.1 Computability then else Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible algorithms. Example (Turing machines). Associate

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 8 Nancy Lynch Today More undecidable problems: About Turing machines: Emptiness, etc. About

More information

Computability Theory. CS215, Lecture 6,

Computability 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 information

acs-07: Decidability Decidability Andreas Karwath und Malte Helmert Informatik Theorie II (A) WS2009/10

acs-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 information

V Honors Theory of Computation

V 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 information

Turing Machine Recap

Turing 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 information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 5 CHAPTER 2 FINITE AUTOMATA 1. Deterministic Finite Automata DFA 2. Nondeterministic Finite Automata NDFA 3. Finite Automata

More information

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2 5-25 Great Theoretical Ideas in Computer Science Lecture 4: Deterministic Finite Automaton (DFA), Part 2 January 26th, 27 Formal definition: DFA A deterministic finite automaton (DFA) M =(Q,,,q,F) M is

More information

Reducability. Sipser, pages

Reducability. 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 information

Final exam study sheet for CS3719 Turing machines and decidability.

Final 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 information

Theory of Computer Science. Theory of Computer Science. D7.1 Introduction. D7.2 Turing Machines as Words. D7.3 Special Halting Problem

Theory of Computer Science. Theory of Computer Science. D7.1 Introduction. D7.2 Turing Machines as Words. D7.3 Special Halting Problem Theory of Computer Science May 2, 2018 D7. Halting Problem and Reductions Theory of Computer Science D7. Halting Problem and Reductions Gabriele Röger University of Basel May 2, 2018 D7.1 Introduction

More information

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational 1 The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational model. We'll remind you what a Turing machine is --- you

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 14 Ana Bove May 14th 2018 Recap: Context-free Grammars Simplification of grammars: Elimination of ǫ-productions; Elimination of

More information

Computational Models Lecture 8 1

Computational 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 information

Theory of Computation (IX) Yijia Chen Fudan University

Theory 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 information

The Unsolvability of the Halting Problem. Chapter 19

The 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 information

Decidability and Undecidability

Decidability 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 information

The Post Correspondence Problem; Applications to Undecidability Results

The Post Correspondence Problem; Applications to Undecidability Results Chapter 8 The Post Correspondence Problem; Applications to Undecidability Results 8.1 The Post Correspondence Problem The Post correspondence problem (due to Emil Post) is another undecidable problem that

More information

Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017

Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 1. Find a Greibach normal form for the following given grammar. (10 points) S bab A BAa a B bb Ʌ Solution: (1) Since S does not

More information

Context Free Language Properties

Context Free Language Properties Context Free Language Properties Knowing that the context free languages are exactly those sets accepted by nondeterministic pushdown automata provides us a bit of information about them. We know that

More information

Context-free grammars and languages

Context-free grammars and languages Context-free grammars and languages The next class of languages we will study in the course is the class of context-free languages. They are defined by the notion of a context-free grammar, or a CFG for

More information

Computational Models: Class 3

Computational Models: Class 3 Computational Models: Class 3 Benny Chor School of Computer Science Tel Aviv University November 2, 2015 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay

More information

Sets, Structures, Numbers

Sets, Structures, Numbers Chapter 1 Sets, Structures, Numbers Abstract In this chapter we shall introduce most of the background needed to develop the foundations of mathematical analysis. We start with sets and algebraic structures.

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL 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 information

Computability and Complexity

Computability 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 information

Equivalence of Regular Expressions and FSMs

Equivalence of Regular Expressions and FSMs Equivalence of Regular Expressions and FSMs Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Regular Language Recall that a language

More information

Further discussion of Turing machines

Further 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 information

Solutions to Old Final Exams (For Fall 2007)

Solutions to Old Final Exams (For Fall 2007) Solutions to Old Final Exams (For Fall 2007) CS 381 (Fall 2002, Fall 2004, Fall 2005, Fall 2006) Yogi Sharma Disclaimer: I, Yogi Sharma, do not claim these solution to be complete, or even to be absolutely

More information

CpSc 421 Homework 9 Solution

CpSc 421 Homework 9 Solution CpSc 421 Homework 9 Solution Attempt any three of the six problems below. The homework is graded on a scale of 100 points, even though you can attempt fewer or more points than that. Your recorded grade

More information

DRAFT. Diagonalization. Chapter 4

DRAFT. Diagonalization. Chapter 4 Chapter 4 Diagonalization..the relativized P =?NP question has a positive answer for some oracles and a negative answer for other oracles. We feel that this is further evidence of the difficulty of the

More information