4. Turing Machines and Unrestricted Languages

Size: px
Start display at page:

Download "4. Turing Machines and Unrestricted Languages"

Transcription

1 4. Turing Machines and Unrestricted Languages AI & CV Lab, SNU 0

2 4.1 Turing Machines AI & CV Lab, SNU 1

3 Definition of a Turing Machine Definition 4.1.1: A Turing machine M is defined by M = (Q,,,δ,q 0,,F) where Q is the set of internal states, is the input alphabet, is a finite set of symbols called the tape alphabet, δ: Q x Q x x {L, R} is the transition (partial) function where { }, is a special symbol called the blank, q 0 Q is the initial state, and F Q is the set of final states. AI & CV Lab, SNU 2

4 Definition of a Turing Machine (cont.) Example 4.1.1: Turing machine M = ( Q,,,, q 0,, F ) Q = {q 0, q 1 }, and = {a, b}, = {a, b, }, F = {q 1 }, (q 0, a) = (q 0, b, R), (q 0, b) = (q 0, b, R), (q 0, ) = (q 1,, L) Example 4.1.2: a, a, L; b, b, L;,, L q 0 q 1 (q 0, a) = (q 1, a, R), (q 1, a) = (q 0, a, L), (q 0, b) = (q 1, b, R), (q 1, b) = (q 0, b, L), (q 0, ) = (q 1,, R), (q 1, ) = (q 0,, L) a, a, R; b, b, R;,, R AI & CV Lab, SNU 3

5 Standard Turing Machine: Definition of a Turing Machine (cont.) 1. The Turing machine has a tape that is bounded in both directions allowing any number of left and right moves. 2. The Turing machine is deterministic in the sense that δ defines at most one move for each configuration. 3. There is no special input file. We assume that at the initial time the tape has some specified content. Some of this may be considered as input. Similarly, there is no special output device. Whenever the machine halts, some or all of the contents of the tape may be viewed as output. An instantaneous description (a configuration) of a Turing machine is given by x 1 qx 2 where q is the state of the control unit, x 1 x 2 is the tape contents, and the position of the read-write head between x 1 and x 2. x 1 x 2 input b b AI & CV Lab, SNU 4 control unit

6 Definition of a Turing Machine (cont.) Example 4.1.3: q 0 q 0 q 0 q 1 a a b a b b b b The above pictures correspond to the sequence of instantaneous descriptions q 0 aa, bq 0 a, bbq 0, and bq 1 b. A move from one configuration to another will be denoted by. Thus, if (q 1, c) = (q 2, e, R), then the move abq 1 cd abeq 2 d is made whenever the internal state is q 1, the tape contains abcd, and the read-write head is on the c. * The symbol has the usual meaning of an arbitrary number of moves. Subscripts, such as M, are used in arguments to distinguish between several machines. AI & CV Lab, SNU 5

7 Definition of a Turing Machine (cont.) Definition 4.1.2: Given a Turing machine M, a move a 1 a k-1 q 1 a k a n a 1 a k-1 bq 2 a k+1 a n is possible if and only if δ(q 1, a k ) = (q 2, b, R). M is said to halt starting from some initial configuration x 1 q i x 2 if x 1 q i x 2 * y 1 q j ay 2 for any q j and a for which (q j, a) is undefined. The sequence of configurations leading to a halt state is called a computation. (Note that x 1 qx 2 * indicates that the machine never halts, starting from the initial configuration x 1 qx 2.) AI & CV Lab, SNU 6

8 Turing Machines as Language Accepters Definition 4.1.3: Given a Turing machine M, the language accepted by M is L(M) = {w + : q 0 w * x 1 q f x 2 for some q f F, x 1, x 2 * }. Example 4.1.4: For = {a, b}, design a Turing machine that accepts L = {a n b n : n 1}. M = (Q,,,, q 0,, F), Q={q 0, q 1, q 2, q 3, q 4 }, F= {q 4 }, ={a, b} (q 0, a) = (q 1, x, R) (q 2, y) = (q 2, y, L) (q 0, y) = (q 3, y, R) (q 1, a) = (q 1, a, R) (q 2, a) = (q 2, a, L) (q 3, y) = (q 3, y, R) (q 1, y) = (q 1, y, R) (q 2, x) = (q 0, x, R) (q 3, ) = (q 4,, R) (q 1, b) = (q 2, y, L) Example 4.1.5: Design a Turing machine that accepts L ={a n b n c n : n 1}. AI & CV Lab, SNU 7

9 Turing Machines as Transducers Definition 4.1.4: A function f with domain D is said to be Turing-computable (computable) if there exists some Turing machine M such that Example 4.1.6: q 0 w * M q f f(w), q f F, for all w D. Given two integers x and y, compute f(x+y) = x+y. x: represented by w(x) {1} +, w(x) = x (ex. x=3, w(3)=111) Design a Turing machine for performing the computation q 0 (x)0 (y) q f (x+y)0 M = (Q,,,, q 0,, F), Q={q 0, q 1, q 2, q 3, q 4 }, F= {q 4 } (q 0, 1) = (q 0, 1, R) (q 2, 1) = (q 3, 0, L) (q 0, 0) = (q 1, 1, R) (q 3, 1) = (q 3, 1, L) (q 1, 1) = (q 1, 1, R) (q 3, ) = (q 4,, R) (q 1, ) = (q 2,, L) * AI & CV Lab, SNU 8

10 Turing Machines as Transducers Example 4.1.7: Design a Turing machine that performs the computation * q 0 w q f ww for any w {1} + Example 4.1.8: Let x and y be two positive integers represented in unary notation. Construct a Turing machine that will halt in a final state q y if x y and will halt in a nonfinal state q n if x y. More specifically, the machine is to perform the computation * q 0 w(x)0w(y) q y w(x)0w(y) if x y, * q 0 w(x)0w(y) q n w(x)0w(y) if x y. AI & CV Lab, SNU 9

11 Combining Turing Machines for Complicated Tasks Example 4.1.9: Design a Turing machine that computes the function. f (x, y) = x + y if x y 0 otherwise if x y q C0 w(x)0w(y) q A0 w(x)0w(y) q Af w(x+y)0 if x < y q C0 w(x)0w(y) q E0 w(x)0w(y) q Ef 0 * * * * Example : Design a Turing machine that multiplies two positive integers in unary notation. AI & CV Lab, SNU 10

12 Turing s Thesis Any computation that can be carried out by mechanical means can be performed by some Turing machine. (Not theorem because it cannot be proven. To prove we would have to define precisely the terms mechanical means.) Turing thesis is more properly viewed as a definition of what constitutes a mechanical computation: a computation is mechanical if and only if it can be performed by some Turing machine. AI & CV Lab, SNU 11

13 Turing s Thesis (cont.) Some arguments for accepting the Turing thesis as the definition of a mechanical computation are 1. Anything that can be done on any existing digital computer can also be done by a Turing machine. 2. No one has yet been able to suggest a problem, solvable by what we intuitively consider an algorithm, for which a Turing machine program cannot be written. 3. Alternative models have been proposed for mechanical computation, but none of them are more powerful than the Turing machine model. AI & CV Lab, SNU 12

14 Turing s Thesis (cont.) Definition 4.1.5: An algorithm for a function f: D R is a Turing machine M, which given as input any d D on its tape, eventually halts with the correct answer f (d) R on its tape. Specifically, we can require that * q 0 d M q f f(d), q f F, for all d D. AI & CV Lab, SNU 13

15 4.2 Other Models of Turing Machines AI & CV Lab, SNU 14

16 Equivalence of Classes of Automata Definition 4.2.1: Two automata are equivalent if they accept the same languages. Consider two classes of automata C 1 and C 2. If for every automaton M 1 in C 1 there is an automaton M 2 in C 2 such that L(M 1 ) = L(M 2 ), we say that C 2 is at least as powerful as C 1. If the converse also holds and for every M 2 in C 2 there is an M 1 in C 1 such that L(M 1 ) = L(M 2 ), we say that C 1 and C 2 are equivalent. AI & CV Lab, SNU 15

17 Turing Machines with a Stay-Option Theorem 4.2.1: 1. The class of Turing machines with stay-options is equivalent to the class of standard Turing machines. 2. The class of Turing machines with semi-infinite tape is equivalent to the class of standard Turing machines. 3. The class of off-line Turing machines (Turing machines with read-only input file) is equivalent to the class of standard Turing machines. 4. The class of multi-tape Turing machines is equivalent to the class of standard Turing machines. 5. The class of multidimensional Turing machines is equivalent to the class of standard Turing machines. AI & CV Lab, SNU 16

18 Nondeterministic Turing Machines Theorem 4.2.2: The class of deterministic Turing machines and the class of nondeterministic Turing machines are equivalent. Definition 4.2.2: A universal Turing machine M u is an automaton that, given as input the description of any Turing machine M and a string w, can simulate the computation of M on w. AI & CV Lab, SNU 17

19 Universal Turing Machine How to construct a universal Turing machine? Let Q={q 1,q 2,,q n } where q 1 is the initial state, q 2 is the single final state, and ={a 1,a 2,,a m } where a 1 represents the blank. We then select an encoding in which q 1 is represented by 1, q 2 is represented by 11, and so on. Similarly, a 1 is encoded as 1, a 2 as 11, etc. The symbol 0 will be used as a separator between the 1 s. With the initial and the final state and the blank defined by this convention, an Turing machine can be described completely with δ only. The transition function is encoded according to this scheme, with the arguments and result in some prescribed sequence. For example, δ(q 1, a 2 ) = (q 2, a 3, L) might appear as AI & CV Lab, SNU 18

20 Control unit of M u Description of M Tape contents of M Internal state of M AI & CV Lab, SNU 19

21 Definition 4.2.3: Universal Turing Machine (cont.) Let S be a set of strings on some alphabet. Then an enumeration procedure for S is a Turing machine that can carry out the sequence of steps * * q 0 q s x 1 #s 1 q s x 2 #s 2, with x i * {#}, s i S, in such a way that any s in S is produced in a finite number of steps. The state q s is a state signifying membership in S; that is, whenever q s is entered, the string following # must be in S. Note that a set is countable if there exists an enumeration procedure that produces its elements in some order: Proper order: String elements are ordered in length as the first criterion, followed by an alphabetical ordering of all equal length strings. AI & CV Lab, SNU 20

22 Universal Turing Machine (cont.) Theorem 4.2.3: The set of all Turing machines, although infinite, is countable. AI & CV Lab, SNU 21

23 Definition 4.2.4: Universal Turing Machine (cont.) A linear bounded automaton is a nondeterministic Turing machine, subject to the restriction that must contain two special symbols [ and ], such that δ(q i, [) can contain only elements of the form (q j, [, R) and δ(q i, ]) can contain only elements of the form (q j, ], L). Definition 4.2.5: A string w is accepted by a linear bounded automaton if there is a possible * sequence of moves q 0 [w] [x 1 q f x 2 ] for some q f F, x 1, x 2 *. The language accepted by the linear bounded automaton is the set of all such accepted strings. AI & CV Lab, SNU 22

24 4.3 Unrestricted Grammars and Associated Languages AI & CV Lab, SNU 23

25 Recursive and Recursively Enumerable Languages Definition 4.3.1: A language L is said to be recursively enumerable if there exists a Turing machine that accepts it. Definition 4.3.2: A language L is said to be recursive if there exists a Turing machine M that accepts L and that halts on every w in +. In other words, a language is recursive if and only if there exists a membership algorithm for it. Lemmas: 1. If a language is recursive, then there exists an enumeration procedure. 2. If a language is recursively enumerable, then there exists an enumeration procedure. 3. Every language for which an enumeration procedure exists is recursively enumerable. AI & CV Lab, SNU 24

26 Languages that are not Recursively Enumerable Theorem 4.3.1: Let S be an infinite countable set. Then its powerset 2 S is not countable. Theorem 4.3.2: For any nonempty, there exist languages that are not recursively enumerable. Proof: A language is a subset of *, and every subset is a language. Therefore the set of all languages is exactly 2 *. Since * is infinite, Theorem tells us that the set of all languages on is not countable. But the set of all Turing machines can be enumerated, so the set of all recursively enumerable languages is countable. AI & CV Lab, SNU 25

27 Languages that are not Recursively Enumerable (cont.) Theorem 4.3.3: There exists a recursively enumerable language whose complement is not recursively enumerable. Proof: Let = {a}, and consider the set of all Turing machines with this input alphabet. By Theorem 4.2.3, this set is countable, so we can associate an order M 1, M 2, with its elements. For each Turing machine M i, there is an associated recursively enumerable language L(M i ). Conversely, for each recursively enumerable language on, there is some Turing machine that accepts it. We now consider a new language L defined as follows. For each i 1, the string a i is in L if and only if a i L(M i ). It is clear that the language L is well defined, since the statement a i L(M i ), and hence a i L, must either be true or false. AI & CV Lab, SNU 26

28 Languages that are not Recursively Enumerable (cont.) Proof (cont.): Next, we consider the complement of L, L = {a i : a i L(M i )}, (1) which is also well defined but, as we will show, is not recursively enumerable. We will show this by contradiction, starting from the assumption that L is recursively enumerable. If this is so, then there must be some Turing machine, say M k, such that L = L(M k ). (2) Consider the string a k. Is it in L or in L? Suppose that a k L. By (2), this implies that a k L(M k ). But (1) now implies that a k L. Conversely, if we assume that a k is in L, then a k L and (2) implies that a k L(M k ). AI & CV Lab, SNU 27

29 Languages that are not Recursively Enumerable (cont.) Proof (cont.): But then from (1) we get that a k L. The contradiction is inescapable, and we must conclude that our assumption that L is recursively enumerable is false. To complete the proof of the theorem as stated, we must still show that L is recursively enumerable. We can use for this the known enumeration procedure for Turing machines. Given a i, we first find i by counting the number of a s. We then use the enumeration procedure for Turing machines to find M i. Finally, we give its description along with a i to a universal Turing machine M u that simulates the action of M on a i. If a i is in L, the computation carried out by M u will eventually halt. The combined effect of this is a Turing machine that accepts every a i L. Therefore, by Definition 4.3.1, L is recursively enumerable. AI & CV Lab, SNU 28

30 Language that is Recursively Enumerable but not Recursive Theorem 4.3.4: If a language L and its complement L are both recursively enumerable, then both languages are recursive. If L is recursive, then L is also recursive, and consequently both are recursively enumerable. Proof: If L and L are both recursively enumerable, then there exist Turing machines M and M that serve as enumeration procedures for L and L, respectively. The first will produce w 1, w 2,, in L, the second, w 1, w 2, in L. Suppose now we are given any w +. We first let M generate w 1 and compare it with w. If they are not the same, we let M generate w 1 and compare again. If we need to continue, we next let M generate w 2, then M generate w, and so on. Any w + 2 will be generated either by M or M, so eventually we will get a match. AI & CV Lab, SNU 29

31 Language that is Recursively Enumerable but not Recursive (cont.) Proof (cont.): If the matching string is produced by M, w belongs to L, otherwise it is in L. The process is a membership algorithm for both L and L, so they are both recursive. For the converse, assume that L is recursive. Then there exists a membership algorithm for it. But this becomes a membership algorithm for L by simply complementing its conclusion. Therefore L is recursive. Since any recursive language is recursively enumerable, the proof is completed. AI & CV Lab, SNU 30

32 Theorem 4.3.5: Language that is Recursively Enumerable but not Recursive (cont.) There exists a recursively enumerable language that is not recursive; that is, the family of recursive languages is a proper subset of the family of recursively enumerable languages. Proof: Consider the language L of Theorem This language is recursively enumerable, but its complement is not. Therefore, by Theorem 4.3.4, it is not recursive, giving us the looked-for example. AI & CV Lab, SNU 31

33 Unrestricted Grammars Definition 4.3.3: A grammar G=(V, T, S, P) is called unrestricted if all the productions are of the form u v, where u is in (V T) + and v is in (V T) *. Theorem 4.3.6: Any language generated by an unrestricted grammar is recursively enumerable. Proof: The grammar in effect defines a procedure for enumerating all strings in the language systematically. For example, we can list all w in L such that S w, that is, w is derived in one step. Since the set of the productions of the grammar is finite, there will be a finite number of such strings. Next, we list all w in L that can be derived in two steps S x w and so on. We can simulate these derivations on a Turing machine and, therefore, have an enumeration procedure for the language. Hence, it is recursively enumerable. AI & CV Lab, SNU 32

34 Theorem 4.3.7: Unrestricted Grammars (cont.) For every recursively enumerable language L, there exists an unrestricted grammar G such that L = L(G). Proof: By definition of recursively enumerable language L, there exists a Turing machine M such that L(M) = L. The grammar G=(S,, V, P) is then constructed from M to meet the following: 1. S can derive q 0 w for all w Productions are such that q 0 w xq f y in M if and only if q 0 w xq f y in G. 3. When a string xq f y with q f F is generated, the grammar transforms this string into the original w. The complete sequence of derivations is then S q 0 w xq f y w. To remember w in the third step, the coded version originally has two copies of w. The first is saved, while the second is used in the second step. The first step: S V S SV T, * T TV aa V a0a, for all a. * * * * AI & CV Lab, SNU 33

35 Unrestricted Grammars (cont.) Proof (cont.): The second step: M = (Q,,,δ,q 0,,F) For each transition δ(q i, c) = (q j, d, R) of M, put the productions V aic V pq V ad V pjq, for all a, p { }, q. For each transition δ(q i,c) = (q j, d, L) of M, put the productions V pq V aic V pjq V ad, for all a, p { }, q. The third step: For every q j F, put the productions V ajb a for all a { }, b, which creates the first terminal in the string and then causes a rewriting in the rest by cv ab ca, V ab c ac, for all a, c { }, b. One more special production is added: λ. With the grammar construction above, show that L(M)=L(G) AI & CV Lab, SNU 34

36 Context-Sensitive Grammars and Languages Definition 4.3.4: A grammar G=(V, T, S, P) is said to be context-sensitive if all productions are of the form x y where x, y (V T) + and x y. Definition 4.3.5: A language L is said to be context-sensitive if there exists a context-sensitive grammar G, such that L = L(G) or L = L(G) {λ}. AI & CV Lab, SNU 35

37 Context-Sensitive Grammars and Languages (cont.) Theorem 4.3.8: For every context-sensitive language L not including λ, there exists some linear bounded automaton M such that L = L(M). Proof: If L is context-sensitive, then there exists a context-sensitive grammar for L {λ}. We show that derivations in this grammar can be simulated by a linear bounded automaton. The linear bounded automaton will have two tracks, one containing the input string w, the other containing the sentential forms derived using G. A key point of this argument is that no possible sentential form can have length greater than w. Another point to notice is that a linear bounded automaton is, by definition, nondeterministic. This is necessary in the argument, since we can claim that the correct production can always be guessed and that no unproductive alternatives have to be pursued. Therefore, the computation described in Theorem can be carried out without using space except that originally occupied by w; that is, it can be done by a linear bounded automaton. AI & CV Lab, SNU 36

38 Context-Sensitive Grammars and Languages (cont.) Theorem 4.3.9: If a language L is accepted by some linear bounded automaton M, then there exists a context-sensitive grammar that generates L. Proof: The construction here is similar to that in Theorem All productions generated in Theorem are noncontracting except λ. But this production can be omitted. It is necessary only when the Turing machine moves outside the bounds of the original input, which is not the case here. The grammar obtained by the construction without this unnecessary production is noncontracting, completing the argument. AI & CV Lab, SNU 37

39 Theorem : Every context-sensitive language L is recursive. Relation between Recursive and Context-Sensitive Languages Proof: Consider the context-sensitive language L with an associated context-sensitive grammar G, and look at a derivation of w S x 1 x 2 x n w. We can assume without any loss of generality that all sentential forms in a single derivation are different; that is, x i x j for all i j. The crux of our argument is that the number of steps in any derivation is a bounded function of w. We know that x j x j+1 because G is noncontracting. The only thing we need to add is that there exist some m, depending only on G and w, such that x j < x j+m for all j, with m = m( w ) a bounded function of V T and w. AI & CV Lab, SNU 38

40 Proof (cont.): Relation between Recursive and Context-Sensitive Languages (cont.) This follows because the finiteness of V T implies that there are only a finite number of strings of a given length. Therefore, the length of a derivation of w L is at most w m( w ). This observation gives us immediately a membership algorithm for L. We check all derivations of length up to w m( w ). Since the set of productions of G is finite, there are only a finite number of these. If any of them give w, then w L, otherwise it is not. AI & CV Lab, SNU 39

41 Relation between Recursive and Context-Sensitive Languages (cont.) Theorem : There exists a recursive language that is not context-sensitive. Proof: Consider the set of all context-sensitive grammars on T= {a, b}. We can use a convention in which each grammar has a variable set of the form V={V 0, V 1, V 2, }. Every context-sensitive grammar is completely specified by its productions; we can think of them as written as a single string x 1 y 1 ; x 2 y 2 ; ; x m y m. To this string we now apply the homomorphism h(a) = 010, h(b) = , h( ) = , h(;) = , h(v i ) = 01 i+5 0. Thus, any context-sensitive grammar can be represented uniquely by a string from L((011*0)*). Furthermore, the representation is invertible in the sense that, given any such string, there is at most one context-sensitive grammar corresponding to it. AI & CV Lab, SNU 40

42 Proof (cont.): Let us introduce a proper ordering on {0, 1}+, so we can write strings in the order w 1, w 2, etc. A given string w j may not define a context-sensitive grammar; if it does, call the grammar G j. Next, we define a language L by L = {w i :w i defines a context-sensitive grammar G i and w i L(G i )}, L is well defined and is in fact recursive. To see this, we construct a member-ship algorithm. Given w i, we check it to see if it defines a context-sensitive grammar G i. If not, then w i L. If the string does define a grammar, then L(G i ) is recursive, and we can use the membership algorithm of Theorem to find out if w i L(G i ). If it is not, then w i belongs to L. Relation between Recursive and Context-Sensitive Languages (cont.) But L is not context-sensitive. If it were, there would exist some w j such that L=L(G j ), then by definition w j is not in L. But L=L(G j ), so we have a contradiction. Conversely, if we assume that w j L(G j ), then by definition w j L and we have another contradiction,. We must therefore conclude that L is not context-sensitive. AI & CV Lab, SNU 41

43 Chomsky Hierarchy L RE L RE L CS L CF L REG L REC L CS L CF L DCF L REG Figure 4.1 L CF Figure 4.2 L LIN L REG L DCF Figure 4.3 (Not known whether the family of languages accepted by deterministic linear bounded automata is a proper subset of the context-sensitive language defined to be the language accepted by nondeterministic linear bounded automata.) AI & CV Lab, SNU 42

44 4.4 Limits of Algorithmic Computations AI & CV Lab, SNU 43

45 Computability and Decidability The Turing Machine Halting Problem: Given the description of a Turing machine M and an input w, does M, when started in the initial configuration q 0 w, perform a computation that eventually halts? AI & CV Lab, SNU 44

46 Definition 4.4.1: Turing Machine Halting Problem Let w M be a string that describes a Turing machine M and let w be a string in M s alphabet. We will assume that w M and w are encoded as a string of 0 s and 1 s, as suggested in Section 4.2. A solution of the halting problem is a Turing machine H, which for any w M and w performs the computation * q 0 w M w x 1 q y x 2 if M applied to w halts, and * q 0 w M w y 1 q n y 2 if M applied to w does not halt. Here q y and q n are both final states of H, and q 0 is the initial state of H. AI & CV Lab, SNU 45

47 Theorem 4.4.1: Turing Machine Halting Problem (cont.) There does not exist any Turing machine H that behaves as required by Definition The halting problem is therefore undecidable. Proof: Assume that there exists an algorithm, and consequently some Turing machine H that solves the halting problem. The input to H will be the string w M w. Then the Turing machine H will halt in one of two corresponding final states, say, q y or q n as shown in Figure 4.4. That is, * q 0 w M w H x 1 q y x 2 if M applied to w halts, and * q 0 w M w H y 1 q n y 2 if M applied to w does not halt. < Figure 4.4 > w M w q 0 q y q n H AI & CV Lab, SNU 46

48 Turing Machine Halting Problem (cont.) Proof (cont.): Next, we modify H to produce a Turing machine H' with the structure shown in Figure 4.5. Then the H' operates as follows: * q 0 w M w H' if M applied to w halts, and * q 0 w M w H' y 1 q n y 2 if M applied to w does not halt. < Figure 4.5 > w M w q 0 q y q a q b q n H From H' we construct another Turing machine H''. This new machine H'' takes as input w M and copies it, ending in its initial state q 0. After that, it behaves exactly like H'. Then H'' is such that * * q 0 w M H'' q 0 w M w M H'' if M applied to w M halts, and * * q 0 w M H'' q 0 w M w M H'' y 1 q n y 2 if M applied to w M does not halt. AI & CV Lab, SNU 47

49 Turing Machine Halting Problem (cont.) Proof (cont.): Since H" is a Turing machine, it has a description in {0,1} *, say, w". This string also can be used as input string identifying M with H". Then * q 0 w" H" if H" applied to w" halts, and * q 0 w" H" y 1 q n y 2 if H" applied to w" does not halt. This is clearly nonsense. The contradiction tells that our assumption of the existence of H, and hence the assumption of decidability of the halting problem, must be false. q a q b w M w M w M q 0 q 0 q y q n AI & CV Lab, SNU 48 H H < Figure 4.6 >

50 Turing Machine Halting Problem (cont.) Theorem 4.4.2: If the halting problem were decidable, then every recursively enumerable language would be recursive. Consequently, the halting problem is undecidable. Proof: To see this, let L be a recursively enumerable language on, and let M be a Truing machine that accepts L. Let H be the Turing machine that solves the halting problem. We construct from this the following procedure: 1. Apply H to w M w. If H says no, then by definition w is not in L. 2. If H says yes, then apply M to w. But M must halt, so it will eventually tell us whether w is in L or not. This constitutes a membership algorithm, making L recursive. But we already know that there are recursively enumerable languages that are not recursive. The contradiction implies that H cannot exist, that is, that the halting problem is undecidable. (Reducing One Undecidable Problem to Another) A problem A is reduced to a problem B if the decidability of A follows from the decidability of B. Then if we know that A is undecidable, we can conclude that B is also undecidable. AI & CV Lab, SNU 49

51 Reducing One Undecidable Problem to Another Example 4.4.1: (The state-entry problem) Given any Turing machine M = (Q,,,δ,q 0,,F) and any q Q, w +, decide whether or not the state q is ever entered when M is applied to w. This problem is undecidable. To reduce the halting problem to the state entry problem, suppose that we have an algorithm A that solves the state entry problem: Given any M and w, we first construct ˆM such that Qˆ Q {}. qˆ where ˆq Q. ˆ { ( q ˆ i, a) ( q, a, R) for every halting state in M where is the halting state in M ˆ }. Then M halts on w if and only if ˆM halts in state qˆ. q i ˆq AI & CV Lab, SNU 50

52 Reducing One Undecidable Problem to Another (cont.) Example 4.4.2: (The blank-tape halting problem) Given a Turing machine M, determine whether or not M halts if started with a blank tape. This is undecidable. To show how this reduction is accomplished, assume that we are given some M and some w. We first construct from M a new machine M w that starts with a blank tape, writes w on it, then positions it self in a configuration q 0 w. After that, M w acts like M. Clearly M w will halt on a blank tape if and only if M halts on w. * q 0 ' v q 0 ' q 0 w M... M w * * M w AI & CV Lab, SNU 51

53 Reducing One Undecidable Problem to Another (cont.) Suppose now that the blank-tape halting problem were decidable. Given any (M, w), we first construct M w, then apply the blank tape halting problem algorithm to it. The conclusion tells whether M applied to w will halt. Since this can be done for any M and w, an algorithm for the blank-tape halting problem can be converted into an algorithm for the halting problem. Since the latter is known to be undecidable, the same must be true for the blank-tape halting problem. M, w Generate M w M w Blank-tape halting algorithm A M w halts M w does not halt (M, w) halts (M, w) does not halt Figure 4.7 AI & CV Lab, SNU 52

54 Undecidable Problems for Recursively Enumerable Languages There is no membership algorithm for recursively enumerable languages. To use this theorem, we can reduce the halting problem to the recursively enumerable language related problem. Theorem 4.4.3: Let G be an unrestricted grammar. Then the problem of determining whether or not L(G) = Ø is undecidable. Proof: We will reduce the membership problem for recursively enumerable languages to this problem. Given a Turing machine M and some string w, we modify M to generate M w as follows: M first saves its input, whatever it is, on some special part of its tape. Then whenever it enters a final state, it checks its saved input and accepts it if and only if it is w. Then L(M w ) = L(M) {w}. From M w, the corresponding grammar G w can be constructed such that L(M w ) = L(G w ). It is clear that L(G w ) is nonempty if and only if w L(M). AI & CV Lab, SNU 53

55 Undecidable Problems for Recursively Enumerable Languages (cont.) Suppose there exists an algorithm A for deciding whether or not L(G)=Ø. Then as shown in the following figure, we construct a Turing machine M which for any M and w tells us whether or not w is in L(M). If such a Turing machine existed, we would have a membership algorithm for any recursively enumerable language, in direct contradiction to the previous result. We thus conclude that the problem of L(G)=Ø is not decidable. M, w Construct G w G w Emptiness algorithm A L(G w ) not empty L(G w ) empty w L(M) w L(M) Figure 4.8 AI & CV Lab, SNU 54

56 Theorem 4.4.4: Let M be any Turing machine. Then the question of whether or not L(M) is finite is undecidable. Proof: Consider the halting problem (M, w). From M we construct another Turing machine M' that does the following: First, the halting states of M are changed so that if any one is reached, all input is accepted by M'. This can be done by having any halting configuration go to a final state. Second, the original machine is modified so that the new machine M' first generates w on its tape, then performs the same computations as M, using the newly created w and some otherwise unused space. If M halts in any configuration, then M' will halt in a final state. That is, M' is such that for any v +, q 0 ' v M' q 0 w M x 1 q h x 2 M' x 1 q f 'x 2 where q h is the halting state in M, q 0 ' is the initial state in M', and q f ' is the final state in M'. Undecidable Problems for Recursively Enumerable Languages (cont.) * * AI & CV Lab, SNU 55

57 Undecidable Problems for Recursively Enumerable Languages (cont.) Then if (M,w) halts, M' will reach a final state for all input. If (M,w) does not halt, then M' will not halt either and so will accept nothing. In other words, M' either accepts the infinite language + or the finite language Ø. If we assume the existence of an algorithm A that tells us whether or not L(M') is finite, we can construct a solution to the halting problem as shown in Figure 4.9. Thus no algorithm for deciding whether or not L(M) is finite can exist. M, w Generate M' M' Finiteness algorithm A L(M') is finite L(M') is not finite (M, w) Does not halt (M, w) Halts Figure 4.9 AI & CV Lab, SNU 56

58 Post Correspondence Problem The Post Correspondence Problem: Given two sequences of n strings on some alphabet, say A=w 1, w 2,, w n and B=v 1, v 2,, v n, we say that there exists a Post correspondence solution (PC-solution) for pair (A, B) if there is a nonempty sequence of integers i,j,,k, such that w i w j w k = v i v j v k. The Modified Post Correspondence Problem: The pair (A, B) has a modified Post correspondence solution (MPC-solution) if there exists a sequence of integers i,j,,k, such that w 1 w i w j w k = v 1 v i v j v k. (Note that if there exists an MPC-solution, then there is also a PC-solution, but the converse is not true.) AI & CV Lab, SNU 57

59 Post Correspondence Problem (cont.) Theorem 4.4.5: Let G = (V, T, S, P) be any unrestricted grammar, with w any string in T +. Let (A, B) be the correspondence pair constructed from G and w be the process exhibited in Figure Then the pair (A, B) permits an MPC-solution if and only if w L(G). Proof: (Reasoning Outline) In Figure 4.10, the string FS is to be taken as w 1 and the string F as v 1. The procedure to show that w L(G) if and only if the sets A and B in Figure 4.10 have an MPC-solution is illustrated with the following example: A B FS F F is a symbol not in V T a a for every a T v i v i for every v i V E we E is a symbol not in V T y i x i For every x i y i in P Figure 4.10 AI & CV Lab, SNU 58

60 Post Correspondence Problem (cont.) Example: Let G=({A, B, C}, {a, b, c}, S, P) with productions S aabb Bbb Bb C, AC aac and take w=aaac. The sequences A and B obtained from the suggested construction are given in Figure The derivation of w=aaac is then S aabb aac aaac AI & CV Lab, SNU 59 Figure 4.11 i w i v i 1 FS F 2 a a 3 b b 4 c c 5 A A 6 B B 7 C C 8 S S 9 E aaace 10 aabb S 11 Bbb S 12 C Bb 13 aac AC 14

61 Post Correspondence Problem (cont.) From the following Figure 4.12 and 4.13, the string w 1 w i w j is always longer than the corresponding string v 1 v i v j and the first is exactly one step a head in the derivation. The only exception is the last step, where w 9 must be applied to let the v-string catch up. w 1 w 10 F S a A B b w 1 w 10 F S a A B b w 14 w 2 w 5 w 12 a A C v 1 v 10 v 1 v 10 v 14 v 2 v 5 v 12 Figure 4.12 w 1 w 10 w 14 w 2 w 5 w 12 w 14 w 2 w 13 w 9 F S a A B b a A C a a a c E v 1 v 10 v 14 v 2 v 5 v 12 v 14 v 2 v 13 v 9 Figure 4.13 AI & CV Lab, SNU 60

62 Theorem 4.4.6: Post Correspondence Problem (cont.) The modified Post correspondence problem is undecidable. G, w Construct A and B as in Figure 12.8 A, B MPC algorithm MPC-solution No MPC-solution w L(G) w L(G) Figure 4.14 Theorem 4.4.7: The Post correspondence problem is undecidable. A, B Construct C, D C, D PC algorithm PC-solution No PC-solution MPC-solution No MPC-solution Figure 4.15 AI & CV Lab, SNU 61

63 A,B Post Correspondence Problem (cont.) Proof: Let A = w 1,w 2,,w n and B = v 1,v 2, v n on some alphabet Σ. Using new symbols, and, the new sequences C = y 0,y 1,,y n+1 and D = z 0,z 1,,z n+1 are defined where for i=1,2,,n, y i = w i1 w i2 w imi and z i = v i1 v i2 v iri with w ij and v ij denoting the jth letter of w i and v i, respectively, and m i = w i, r i = v i. In addition, y 0 = y 1, y n+1 =, z 0 =z 1, z n+1 =. Suppose the pair (C,D) has a PC-solution. Then it must look like w 11 w 12 w j1 w k1 = v 11 v 12 v j1 v k1. Ignoring the characters and, we see that this implies w 1 w j w k = v 1 v j v k so that the pair (A,B) permits an MPC-solution. By turning this argument around, it is claimed that if there is an MPC-solution for the pair (A,B), then there is a PC-solution for the pair (C,D). Assume now that the Post correspondence problem is decidable. Then the machine in Fig 4.15 can be constructed, from which we can conclude that the Post correspondence problem is undecidable. AI & CV Lab, SNU 62

64 Theorem 4.4.8: Undecidable Problems for Context-Free Languages There exists no algorithm for deciding whether any given context-free grammar is ambiguous. Proof: Consider two sequences of strings A=(w 1, w 2,, w n ) and B=(v 1, v 2,, v n ) over some alphabet. Choose a new set of distinct symbols a 1, a 2,, a n such that {a 1, a 2,, a n } =, and consider the two languages L A = {w i w j w l w k a k a l a j a i } and L B = {v i v j v l v k a k a l a j a i }. Now look at the context free grammar G=({S, S A, S B }, {a 1, a 2,, a n }, P, S) AI & CV Lab, SNU 63

65 Undecidable Problems for Context-Free Languages (cont.) where the set of productions P is the union of the two subsets: the first set P A consists of S S A, S A w i S A a i w i a i, i = 1, 2,, n the second set P B has the productions S S B, S B v i S B a i v i a i, i = 1, 2,, n Now take G A = ({S, S A }, {a 1, a 2,, a n }, P A, S) and G B = ({S, S B }, {a 1, a 2,, a n }, P B, S). Then clearly L A = L(G A ), L B = L(G B ), and L(G) = L A L B. AI & CV Lab, SNU 64

66 Undecidable Problems for Context-Free Languages (cont.) It is easy to see that G A and G B by themselves are unambiguous. If a given string in L(G) ends with a i, then its derivation with grammar G A must have started with S w i Sa i. Similarly, we can tell at any later stage which rule has to be applied. Thus, if G is ambiguous it must be because there is a w for which there are two derivations and * S S A w i S A a i w i w j w k a k a j a i = w * S S B v i S B a i v i v j v k a k a j a i = w Consequently, if G is ambiguous, then the Post correspondence problem with the pair (A, B) has a solution. Conversely, if G is unambiguous, then the Post correspondence problem cannot have a solution. AI & CV Lab, SNU 65

67 Undecidable Problems for Context-Free Languages (cont.) If there existed an algorithm for solving the ambiguity problem, we could adapt it to solve the Post correspondence problem as shown in Figure But since there is no algorithm for the Post correspondence problem, we conclude that the ambiguity problem is undecidable A, B Construct G G Ambiguity algorithm G is ambiguous G is not ambiguous PC-solution No PC-solution Figure 4.16 AI & CV Lab, SNU 66

68 Theorem 4.4.9: Undecidable Problems for Context-Free Languages (cont.) There exists no algorithm for deciding whether or not L(G 1 ) L(G 2 )=Ø for arbitrary context-free grammar G 1 and G 2. Proof: Take as G 1 the grammar G A and as G 2 the grammar G B as defined in the proof of Theorem Suppose that L(G A ) and L(G B ) have a common element, that is and * S A w i w j w k a k a j a i * S B v i v j v k a k a j a i Then the pair (A,B) has a PC-solution. Conversely, if the pair does not have a PC-solution, then L(G A ) and L(G B ) cannot have a common element. We conclude that L(G A ) L(G B ) is nonempty if and only if (A, B) has a PC-solution. This reduction proves the theorem. AI & CV Lab, SNU 67

69 Undecidable Problems for Context-Free Languages (cont.) A, B Construct G A and G B Algorithm to check if L(G A ) L(G B ) L(G A ) L(G B ) L(G A ) L(G B ) = PC-solution No PC-solution Figure 4.17 AI & CV Lab, SNU 68

70 Theorems related to Unsolvable Problems Assume for the given two sequences of n strings A=(w 1,w 2,..,w n ) and B=(v 1,v 2,,v n ), the associated context-free grammars G A and G B are constructed as in Theorem 12.8 (page 318). Theorem 1: The problem of deciding, for arbitrary context-free languages L A and L B, whether L A L B is infinite is unsolvable. Proof: If the PC solution for two context-free grammars G A and G B exists, then L(G A ) L(G B ) is infinite because the solution is to be pumped. Otherwise, it is empty. Thus the procedure for deciding if it is infinite can determine if the PC solution for the pair (A,B) exists, which contradicts to previously established theorem that the PC problem is unsolvable. AI & CV Lab, SNU 69

71 Theorems related to Unsolvable Problems Theorem 2: The problem of deciding, for an arbitrary context-free language L, whether L c is empty is unsolvable. Proof: Since L(G A ) and L(G B ) are deterministic, their complements are deterministic and context-free. The union of L c (G A ) and L c (G B ) is also context-free, L=L c (G A ) L c (G B ). Then L c = L(G A ) L(G B ). If the PC solution for two context-free grammars G A and G B does not exist, then L c is empty. Otherwise, it is infinite. Thus the procedure for deciding whether the complement of an arbitrary context-free language is empty can determine whether L(G A ) L(G B ) is infinite (empty), which contradicts to Theorem 1. AI & CV Lab, SNU 70

72 Theorems related to Unsolvable Problems Theorem 3: The problem of deciding whether a given context-free language is regular is unsolvable. Proof: Let a context-free language L= L c (G A ) L c (G B ). If L is regular, then L c is also regular. Let L c = L(G A ) L(G B ). If L c is empty, it is regular. Otherwise, it is infinite but not regular because it violates the pumping lemma. Thus the procedure for deciding whether L is regular can determine whether L c is empty (due to regular), which contradicts to Theorem 2. AI & CV Lab, SNU 71

73 Theorems related to Unsolvable Problems Theorem 4: The problem of deciding whether a given context-free language is deterministic is unsolvable. Proof: Suppose there exists a procedure for deciding whether a given context-free language is deterministic. Then apply that procedure to the given context-free language. If deterministic, apply Stearn s procedure to see if it is regular. Otherwise, it is not regular (because the regular language is always deterministic). Thus this procedure can determine whether the given context-free language is regular, which contradicts to Theorem 3. AI & CV Lab, SNU 72

74 Theorems related to Unsolvable Problems Theorem 5: The problem of deciding whether L(G 1 )=L(G 2 ) for arbitrary contextfree grammars G 1 and G 2 (two arbitrary context-free languages are same) is unsolvable. Proof: Let T be the set of terminal letters on which G 1 and G 2 are defined. Let G 2 be defined such that L(G 2 )=T*. If L(G 1 )=L(G 2 ), then L c (G 1 ) is empty. Thus the procedure for deciding if L(G 1 )=L(G 2 ) can also determine if the complement L c (G 1 ) of an arbitrary context-free language L(G 1 ) is empty, which contradicts to Theorem 2. AI & CV Lab, SNU 73

The Halting Problem is Undecidable

The Halting Problem is Undecidable 185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine

More information

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. 3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem

More information

Chapter 7 Uncomputability

Chapter 7 Uncomputability Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction

More information

Turing Machines: An Introduction

Turing Machines: An Introduction CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,

More information

3515ICT Theory of Computation Turing Machines

3515ICT Theory of Computation Turing Machines Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Fall 25 Alexis Maciel Department of Computer Science Clarkson University Copyright c 25 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

Introduction to Turing Machines

Introduction to Turing Machines Automata Theory, Languages and Computation - Mírian Halfeld-Ferrari p. 1/2 Introduction to Turing Machines SITE : http://www.sir.blois.univ-tours.fr/ mirian/ Automata Theory, Languages and Computation

More information

Computational Models Lecture 8, Spring 2009

Computational Models Lecture 8, Spring 2009 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance

More information

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CSE 135: Introduction to Theory of Computation Decidability and Recognizability CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing

More information

CAs and Turing Machines. The Basis for Universal Computation

CAs and Turing Machines. The Basis for Universal Computation CAs and Turing Machines The Basis for Universal Computation What We Mean By Universal When we claim universal computation we mean that the CA is capable of calculating anything that could possibly be calculated*.

More information

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move. CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 3719 (Theory of Computation and Algorithms) Lecture 4 CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a

More information

Computability Theory

Computability Theory CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

More information

Lecture 2: Universality

Lecture 2: Universality CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal

More information

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along

More information

24 Uses of Turing Machines

24 Uses of Turing Machines Formal Language and Automata Theory: CS2004 24 Uses of Turing Machines 24 Introduction We have previously covered the application of Turing Machine as a recognizer and decider In this lecture we will discuss

More information

1 Definition of a Turing machine

1 Definition of a Turing machine Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,

More information

Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011. Lecture 1 Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

Properties of Stabilizing Computations

Properties of Stabilizing Computations Theory and Applications of Mathematics & Computer Science 5 (1) (2015) 71 93 Properties of Stabilizing Computations Mark Burgin a a University of California, Los Angeles 405 Hilgard Ave. Los Angeles, CA

More information

Automata and Formal Languages

Automata and Formal Languages Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

Introduction to Automata Theory. Reading: Chapter 1

Introduction to Automata Theory. Reading: Chapter 1 Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a

More information

Regular Languages and Finite State Machines

Regular Languages and Finite State Machines Regular Languages and Finite State Machines Plan for the Day: Mathematical preliminaries - some review One application formal definition of finite automata Examples 1 Sets A set is an unordered collection

More information

How To Understand The Theory Of Computer Science

How To Understand The Theory Of Computer Science Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked

More information

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

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)

More information

6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008

6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

C H A P T E R Regular Expressions regular expression

C H A P T E R Regular Expressions regular expression 7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun

More information

Deterministic Finite Automata

Deterministic Finite Automata 1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.

More information

6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.080/6.089 GITCS Feb 12, 2008. Lecture 3 6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

More information

1 if 1 x 0 1 if 0 x 1

1 if 1 x 0 1 if 0 x 1 Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or

More information

How To Compare A Markov Algorithm To A Turing Machine

How To Compare A Markov Algorithm To A Turing Machine Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also

More information

INCIDENCE-BETWEENNESS GEOMETRY

INCIDENCE-BETWEENNESS GEOMETRY INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full

More information

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the

More information

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information

8 Divisibility and prime numbers

8 Divisibility and prime numbers 8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 Solutions CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

More information

Theory of Computation Chapter 2: Turing Machines

Theory of Computation Chapter 2: Turing Machines Theory of Computation Chapter 2: Turing Machines Guan-Shieng Huang Feb. 24, 2003 Feb. 19, 2006 0-0 Turing Machine δ K 0111000a 01bb 1 Definition of TMs A Turing Machine is a quadruple M = (K, Σ, δ, s),

More information

CS5236 Advanced Automata Theory

CS5236 Advanced Automata Theory CS5236 Advanced Automata Theory Frank Stephan Semester I, Academic Year 2012-2013 Advanced Automata Theory is a lecture which will first review the basics of formal languages and automata theory and then

More information

Introduction to Theory of Computation

Introduction to Theory of Computation Introduction to Theory of Computation Prof. (Dr.) K.R. Chowdhary Email: kr.chowdhary@iitj.ac.in Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Tuesday 28 th

More information

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information

More information

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity

More information

Automata on Infinite Words and Trees

Automata on Infinite Words and Trees Automata on Infinite Words and Trees Course notes for the course Automata on Infinite Words and Trees given by Dr. Meghyn Bienvenu at Universität Bremen in the 2009-2010 winter semester Last modified:

More information

Turing Machines, Part I

Turing Machines, Part I Turing Machines, Part I Languages The $64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context

More information

INTRODUCTORY SET THEORY

INTRODUCTORY SET THEORY M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,

More information

Course Manual Automata & Complexity 2015

Course Manual Automata & Complexity 2015 Course Manual Automata & Complexity 2015 Course code: Course homepage: Coordinator: Teachers lectures: Teacher exercise classes: Credits: X_401049 http://www.cs.vu.nl/~tcs/ac prof. dr. W.J. Fokkink home:

More information

Two-dimensional Languages

Two-dimensional Languages Charles University Faculty of Mathematics and Physics Mgr. Daniel Průša Two-dimensional Languages Doctoral Thesis Supervisor: Martin Plátek, CSc. Prague, 2004 Acknowledgements The results presented in

More information

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections

More information

Composability of Infinite-State Activity Automata*

Composability of Infinite-State Activity Automata* Composability of Infinite-State Activity Automata* Zhe Dang 1, Oscar H. Ibarra 2, Jianwen Su 2 1 Washington State University, Pullman 2 University of California, Santa Barbara Presented by Prof. Hsu-Chun

More information

1. Prove that the empty set is a subset of every set.

1. Prove that the empty set is a subset of every set. 1. Prove that the empty set is a subset of every set. Basic Topology Written by Men-Gen Tsai email: b89902089@ntu.edu.tw Proof: For any element x of the empty set, x is also an element of every set since

More information

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification) Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information

Informatique Fondamentale IMA S8

Informatique Fondamentale IMA S8 Informatique Fondamentale IMA S8 Cours 1 - Intro + schedule + finite state machines Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytech-lille.fr Université Lille 1 - Polytech Lille

More information

Finite Automata. Reading: Chapter 2

Finite Automata. Reading: Chapter 2 Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Fundamentele Informatica II

Fundamentele Informatica II Fundamentele Informatica II Answer to selected exercises 1 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 Let L be a language. It is clear

More information

On String Languages Generated by Spiking Neural P Systems

On String Languages Generated by Spiking Neural P Systems On String Languages Generated by Spiking Neural P Systems Haiming Chen 1, Rudolf Freund 2, Mihai Ionescu 3, Gheorghe Păun 4,5, Mario J. Pérez-Jiménez 5 1 Computer Science Laboratory, Institute of Software

More information

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS. Christopher Heil Georgia Institute of Technology WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

More information

Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005

Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005 Turing Degrees and Definability of the Jump Theodore A. Slaman University of California, Berkeley CJuly, 2005 Outline Lecture 1 Forcing in arithmetic Coding and decoding theorems Automorphisms of countable

More information

So let us begin our quest to find the holy grail of real analysis.

So let us begin our quest to find the holy grail of real analysis. 1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

More information

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety

More information

Formal Grammars and Languages

Formal Grammars and Languages Formal Grammars and Languages Tao Jiang Department of Computer Science McMaster University Hamilton, Ontario L8S 4K1, Canada Bala Ravikumar Department of Computer Science University of Rhode Island Kingston,

More information

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set. Section 2.5 Cardinality (another) Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted A = B, if and only if there is a bijection from A to B. If there is an injection

More information

LEARNING OBJECTIVES FOR THIS CHAPTER

LEARNING OBJECTIVES FOR THIS CHAPTER CHAPTER 2 American mathematician Paul Halmos (1916 2006), who in 1942 published the first modern linear algebra book. The title of Halmos s book was the same as the title of this chapter. Finite-Dimensional

More information

GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY

GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY CARL G. JOCKUSCH, JR. AND PAUL E. SCHUPP Abstract. Generic decidability has been extensively studied in group theory, and we now study it in

More information

CS 301 Course Information

CS 301 Course Information CS 301: Languages and Automata January 9, 2009 CS 301 Course Information Prof. Robert H. Sloan Handout 1 Lecture: Tuesday Thursday, 2:00 3:15, LC A5 Weekly Problem Session: Wednesday, 4:00 4:50 p.m., LC

More information

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 CMPSCI 250: Introduction to Computation Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 Regular Expressions and Their Languages Alphabets, Strings and Languages

More information

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES Contents 1. Random variables and measurable functions 2. Cumulative distribution functions 3. Discrete

More information

Mathematical Induction

Mathematical Induction Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

More information

Local periods and binary partial words: An algorithm

Local periods and binary partial words: An algorithm Local periods and binary partial words: An algorithm F. Blanchet-Sadri and Ajay Chriscoe Department of Mathematical Sciences University of North Carolina P.O. Box 26170 Greensboro, NC 27402 6170, USA E-mail:

More information

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements. 3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

More information

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p. Page 331, 38.2 Assignment #11 Solutions Factor the following positive integers into primes. a. 25 = 5 2. b. 4200 = 2 3 3 5 2 7. c. 10 10 = 2 10 5 10. d. 19 = 19. e. 1 = 1. Page 331, 38.4 Suppose a is a

More information

Representing Reversible Cellular Automata with Reversible Block Cellular Automata

Representing Reversible Cellular Automata with Reversible Block Cellular Automata Discrete Mathematics and Theoretical Computer Science Proceedings AA (DM-CCG), 2001, 145 154 Representing Reversible Cellular Automata with Reversible Block Cellular Automata Jérôme Durand-Lose Laboratoire

More information

1 Homework 1. [p 0 q i+j +... + p i 1 q j+1 ] + [p i q j ] + [p i+1 q j 1 +... + p i+j q 0 ]

1 Homework 1. [p 0 q i+j +... + p i 1 q j+1 ] + [p i q j ] + [p i+1 q j 1 +... + p i+j q 0 ] 1 Homework 1 (1) Prove the ideal (3,x) is a maximal ideal in Z[x]. SOLUTION: Suppose we expand this ideal by including another generator polynomial, P / (3, x). Write P = n + x Q with n an integer not

More information

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES ANDREW E.M. LEWIS 1. Introduction This will be a course on the Turing degrees. We shall assume very little background knowledge: familiarity with

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

Omega Automata: Minimization and Learning 1

Omega Automata: Minimization and Learning 1 Omega Automata: Minimization and Learning 1 Oded Maler CNRS - VERIMAG Grenoble, France 2007 1 Joint work with A. Pnueli, late 80s Summary Machine learning in general and of formal languages in particular

More information

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors. The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

More information

Overview of E0222: Automata and Computability

Overview of E0222: Automata and Computability Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study

More information

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1. MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

More information

Mathematical Induction

Mathematical Induction Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How

More information

Scanner. tokens scanner parser IR. source code. errors

Scanner. tokens scanner parser IR. source code. errors Scanner source code tokens scanner parser IR errors maps characters into tokens the basic unit of syntax x = x + y; becomes = + ; character string value for a token is a lexeme

More information

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886) Chapter 2 Numbers God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886) God created the integers and the rest is the work

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

Set Theory Basic Concepts and Definitions

Set Theory Basic Concepts and Definitions Set Theory Basic Concepts and Definitions The Importance of Set Theory One striking feature of humans is their inherent need and ability to group objects according to specific criteria. Our prehistoric

More information

CONTENTS 1. Peter Kahn. Spring 2007

CONTENTS 1. Peter Kahn. Spring 2007 CONTENTS 1 MATH 304: CONSTRUCTING THE REAL NUMBERS Peter Kahn Spring 2007 Contents 2 The Integers 1 2.1 The basic construction.......................... 1 2.2 Adding integers..............................

More information

An algorithmic classification of open surfaces

An algorithmic classification of open surfaces An algorithmic classification of open surfaces Sylvain Maillot January 8, 2013 Abstract We propose a formulation for the homeomorphism problem for open n-dimensional manifolds and use the Kerekjarto classification

More information