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

Save this PDF as:

Size: px
Start display at page:

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

## Transcription

1 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 (Section 8.1) No program H can test whether a given program will print "hello, world" as its first output on a given input. Detailed proof by self-reference leading to a contradiction. Proofs that other problems are undecldable (or unsolvable) by reduction from a known undecidable problem. Example: Proof that the halting problem is undecidable (by reduction from the hello-world problem). Alternative proof that there exist undecidable problems (languages): Let Σ be a finite alphabet. Then Σ has countably many elements. Every language over Σ is a subset of Σ and is thus countable. By diagonalisation, the number of subsets of Σ is not countable. But the number of computer programs is countable. Hence there exist undecidable problems. Turing machines (Section 8.2) A Turing machine (TM) is a finite-state machine with an infinite tape (for input and working storage) and a tape head that can read or write one tape cell and move left or right. It normally accepts the input string, or completes its computation, by entering a final or accepting state. Example of a TM to recognise the language { 0 n 1 n n 1 (Exx. 8.2 and 8.3, Figs. 8.9 and 8.10). Machine structure: while 0 { // ID is X*q0*Y*1* change 0 to X & move R while 0 or Y move R change 1 to Y & move L // fail if not 1 (too many 0s) while Y or 0 move L move R while Y move R // fail if 1 (too many 1s) halt We can test this machine on inputs , 00011, 00111, Formal definition of a TM M = (Q, Σ, Γ, δ, q 0, B, F ): Q is a finite set of states, Σ is a finite input alphabet, Γ is a finite tape alphabet (Σ Γ), δ : Q Γ Q Γ {L, R is a transition 1

2 function, q 0 Q is the initial state, BinΓ Σ is the blank symbol, and F Q is the set of final states. Instantaneous description (ID) X 1 X 2... X i 1 qx i... X n of a TM. A move of a TM is denoted ; a sequence of zero or more moves is denoted. Turing machines to recognise languages accept by entering a final state (and halting); Turing machines to perform computation may simply halt when the computation is complete. Example of a TM to recognise palindromes (M, Ex. 16.2, Fig. 16.4). Machine structure: while true { if a { change a to B & move R while a or b move R move L if B halt if a { while a or b move L move R else if b {... similarly... else { break if B halt // odd-length palindrome // even-length palindrome Test on inputs abba, abbba, abaa. Example of a TM to recognise L ww = { ww w {a, b (M, Ex. 16.3, Fig. 16.5). Machine structure: // Stage 1: Check length is even, change as / bs to As / Bs while a or b { change a to A or b to B & move R while a or b move R move L change a to A or b to B & move L while a or b move L if A or B move R // Stage 2: Change As and Bs in first half to as and bs if Blank halt if A or B move L while A or B change to a or b & move L if Blank move R // Stage 3: Compare first and second halves 2

3 while true { if a { change a to A & move R while a or b or Blank move R change A to Blank & move L while a or b or Blank move L if A or B move R else if b {... similarly... if Blank halt // fail if B Test on inputs aba, abaa, abab. The language L(M) accepted by a TM M is the set of strings w in Σ such that q 0 w αqβ for some state q in F and any tape strings α and β. The set of languages accepted by TMs is called the set of computably enumerable languages. The set of languages accepted by TMs that always halt is called the set of computable languages. Significance of this distinction. Example of a TM to perform integer subtraction (Ex. 8.4, Fig. 8.12). The initial tape is 0 m 10 n. (Who knows why they reversed the normal roles of 0s and 1s?) The TM halts with 0 m n on its tape. Machine structure: while 0 { // ID is q0ˆ(m-k)11ˆk0(n-k) change 0 to B & move R while 0 move R while 1 move R if B { // m >= n, so return 0ˆ(m-n) move L while 1 change to B & move L while 0 move L if B change to 0 & halt change 0 to 1 & move L while 1 or 0 move L if B move R // m < n, so return zero (blank tape) change 1 to B & move R while 1 change to B & move R while 0 change to B & move R if B halt Test on , 00100,

4 It is more common to represent the unary integer n 0 by 1 n+1, so we can represent 0 by 1 (and not by a blank tape!). Programming techniques (Section 8.3) Storage in the state. Multiple tracks. Subroutines. Example of a TM to perform multiplication using a submachine (Ex. 8.8, Figs and 8.15). Exercise: Construct a TM to recognise language { 0 n n a perfect square. Exercise: Construct a TM to compute the factorial function. Exercise (difficult): Construct a TM to compute Ackermann s function: A(0, n) = n + 1, A(m + 1, 0) = A(m, 1), A(m + 1, n + 1) = A(m, A(m + 1, n)). This function grows very rapidly. (See Turing s World for a solution.) Extensions of Turing machines (Section 8.4) A multitape TM differs from a TM in that each transition depends on each of the tape symbols and can independently change each tape symbol and move the head on each tape. Every language accepted by some multitape TM is also accepted by some (single-tape) TM (Theorem 8.9). The construction (not required) depends on simulating the multiple tapes on a single (multitrack) tape. The time taken by the single-tape TM to simulate n steps of the multitape TM is O(n 2 ) (Theorem 8.10). A nondeterministic TM differs from a TM in the same way that an NFA differs from a FA: the value of the transition function δ(p, X) is a set of triples (q, X, D). It accepts an input if some sequence of transitions reaches a final state. If M N is a nondeterministic TM, then there is a deterministic TM M D such that L(M N ) = L(M D ) (Theorem 8.11). The construction of the equivalent (multitape) TM M D depends on maintaining a queue of pending IDs of M N (p. 341). Suppose that M N has at most m choices from any ID. Then the time taken by M D to simulate n steps of M N by this construction is O(nm n ). It is unknown whether a subexponential simulation is possible. Summary: Adding features to a Turing Machine does not give more computing power. 4

5 Restricted Turing machines (Section 8.5) Multistack Machines A multistack machine is like a PDA with k 1 independent stacks. If language L is accepted by some TM, then it is also accepted by some 2-stack machine (Theorem 8.13). Construction: Let αqβ be an ID of the TM. Represent this ID by storing α R on the first stack (i.e., last(α) on top), β on the second stack (first(β) on top), and performing transitions to maintain this representation. Exercise: Define a queue machine. Prove that if a language is accepted by some TM, and hence by some 2-stack machine (see above), then it is also accepted by some queue machine. Counter machines (not required). Very informally, the class of functions that can be computed by finite state machines with just two non-negative integer counters (variables). Transitions depend on the state, the input symbol and which if any of the counters is zero. each transition changes the state, changes the input symbol, and may add or subtract one from either or both of the counters. The resulting set of functions that can be computed is equivalent to the the class of functions that can be computed by TMs. Turing machines and recursive functions (not required). Very informally, the class of functions over the natural numbers that can be computed by TMs is equivalent to the class of functions that can be expressed by a set of recursive definitions (cf., Ackermann s function above) together with a minimisation (while-statement) operator. (See Martin or Minsky for details.) This latter characterisation of the computable functions, due to Kleene, is a very important one. Summary: Some restrictions of TMs still allow the same set of functions to be computed (equivalently, allow the same set of languages to be recognised). Turing machines and computers (Section 8.6) Clearly, a TM can be simulated by a computer. It is only necessary to have an infinite supply of disks (to simulate) the infinite tape and to manage them appropriately. More interestingly, a computer can also be simulated by a multitape TM. The construction is described in Section The time taken by a multitape TM to simulate n steps of a computer is O(n 3 ), so the time taken by a single-tape TM to simulate n steps is O(n 6 ). A language that is not c.e. (Section 9.1) A language is computable if it is accepted by some Turing machine that always halts. Problems correspond to languages; problem instances correspond to strings. A problem is decidable (resp., undecidable) if the corresponding language is computable (resp., not computable). A language is computably enumerable (c.e.) if it is accepted by some Turing machine. Clearly every computable language is c.e. Exercise: Prove that every context-free language is computable. Establish a 1-1 mapping between (positive) integers and binary strings, so we can refer to the 5

6 ith string, w i. Establish a coding for Turing machines as binary strings, so that a TM that is coded as w i is called the ith TM. Note that the same TM may occur several times in this enumeration. See Example 9.1 for the coding of a particular TM. Establish a coding for pairs (M, w), where M is a TM and w is a binary string. Define the diagonalisation language, L d, as follows: L d = { w i w i L(M i ) (1) I.e., L d is the set of binary strings w such that the TM whose code is w does not accept when given w as input. Theorem: L d is not c.e., i.e., no TM accepts L d. Proof: Suppose L d = L(M) for some TM M, i.e., L d = L(M i ), for some i. (2) Now, consider whether w i L d. If w i L d, then w i L(M i ) by (2), so w i L d by (1), which is a contradiction. If w i L d, i.e., w i L(M i ) by (2), it follows that w i L d by (1), which is again a contradiction. Since both possibilities lead to a contradiction, the assumption that L d is c.e. is false. A language that is c.e. but not computable (Section 9.2) Theorem: If L is computable, then so is its complement, L. Proof by modifying the TM that accepts L to become a TM that accepts L. Theorem: If L and L are both c.e., then L is computable. Proof by combining the TMs that accept L and L to become a TM that accepts L and always halts. Corollary: L d is not computable (else L d would be computable and hence c.e.) Define the universal language, L u, as follows: L u = { s s is the code for (M, w), M is a TM, and M accepts w (3) We define a TM U that simulates the execution of a given TM M on a given input w. (Details omitted, see pp ). I.e., U accepts the coded pair (M, w) if and only if M accepts w. The TM U is hence called a universal Turing machine. Theorem: L u is c.e. but not computable. Proof. L u is clearly c.e., as L u = L(U). Suppose L u were computable. Then L u would also be computable. Let M be a TM that accepts L u, i.e., L u = L(M), where M always halts. We can then construct a TM M that accepts L d as follows. 6

7 Given input w, M changes its input to w111w. M simulates (behaves as) M on the new input. Suppose w is the ith string. Then M determines whether or not M i accepts w i. Since M accepts L u, it accepts if and only if M i does not accept w i, i.e., if and only if w i L d. But no TM that accepts L d exists, so L u is not computable. The class of computable languages is closed under complementation (above), union, intersection, concatenation, difference and iteration (star). (I think.) The class of c.e. languages is closed under union, intersection, concatenation, and iteration. (I think.) Undecidable problems about Turing machines (Section 9.3) Reduction between problems (languages). A reduction is an algorithm that transforms an instance of problem P 1 to an instance of problem P 2 such that the two instances have the same answer ( yes or no ). If P 1 reduces to P 2, then P 2 is at least as hard as P 1. Formally, a reduction from P 1 to P 2 is a TM that takes an instance of P 1 as input and halts with an instance of P 2 as output. Theorem. If there is a reduction from P 1 to P 2, then: If P 1 is undecidable (not computable), then so is P 2. If P 1 is not c.e., then neither is P 2. Proof. See Section Examples. Let L e = { M L(M) = be the set of (codings of) TMs whose language is empty. Let L ne = L e = { M L(M) be the set of (codings of) TMs whose language is nonempty. Then L ne is c.e. but not computable, and hence L e is not c.e. (Section 9.3.2) A property of the c.e. languages is a subset of the c.e. languages. For example, the property of being empty is the set consisting of the empty language. The property of being a regular language is the set consisting of all regular languages. A property is trivial if it is either empty (satisfied by no c.e. language) or is the set of all c.e. languages. Otherwise, it is nontrivial. Rice s Theorem: Every nontrivial property of the c.e. languages is undecidable. (Proof not required.) By Rice s Theorem, the following properties are all undecidable: 1. Whether the language accepted by a TM is empty. 2. Whether the language accepted by a TM is finite. 3. Whether the language accepted by a TM is regular. 4. Whether the language accepted by a TM is context-free. That is, for example, the set of codes of TMs that accept a regular language is not computable. 7

### Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras

Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture No. # 31 Recursive Sets, Recursively Innumerable Sets, Encoding

### 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

### 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,

### 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

### 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

### 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

### 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

### A TM. Recall the A TM language: A TM = { M, w M is a TM and M accepts w.} is undecidable. Theorem: The language. p.2/?

p.1/? Reducibility We say that a problem Q reduces to problem P if we can use P to solve Q. In the context of decidability we have the following templates : If A reduces to B and B is decidable, then so

### 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

### 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

### FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION REDUCIBILITY ( LECTURE 16) SLIDES FOR 15-453 SPRING 2011 1 / 20 THE LANDSCAPE OF THE CHOMSKY HIERARCHY ( LECTURE 16) SLIDES FOR 15-453 SPRING 2011 2 / 20 REDUCIBILITY

### 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.

### 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

### 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

### 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

### 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,

### 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

### Finite Automata and Formal Languages

Finite Automata and Formal Languages TMV026/DIT321 LP4 2011 Lecture 14 May 19th 2011 Overview of today s lecture: Turing Machines Push-down Automata Overview of the Course Undecidable and Intractable Problems

### We give a basic overview of the mathematical background required for this course.

1 Background We give a basic overview of the mathematical background required for this course. 1.1 Set Theory We introduce some concepts from naive set theory (as opposed to axiomatic set theory). The

### Turing Machine and the Conceptual Problems of Computational Theory

Research Inventy: International Journal of Engineering And Science Vol.4, Issue 4 (April 204), PP 53-60 Issn (e): 2278-472, Issn (p):239-6483, www.researchinventy.com Turing Machine and the Conceptual

### 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

### 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)

### 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),

### CS 341 Homework 9 Languages That Are and Are Not Regular

CS 341 Homework 9 Languages That Are and Are Not Regular 1. Show that the following are not regular. (a) L = {ww R : w {a, b}*} (b) L = {ww : w {a, b}*} (c) L = {ww' : w {a, b}*}, where w' stands for w

### 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,

### Automata and Languages

Automata and Languages Computational Models: An idealized mathematical model of a computer. A computational model may be accurate in some ways but not in others. We shall be defining increasingly powerful

### 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

### Computing basics. Ruurd Kuiper

Computing basics Ruurd Kuiper October 29, 2009 Overview (cf Schaum Chapter 1) Basic computing science is about using computers to do things for us. These things amount to processing data. The way a computer

### 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

### 6.2 Permutations continued

6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of

### 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

### Practice Problems for Final Exam: Solutions CS 341: Foundations of Computer Science II Prof. Marvin K. Nakayama

Practice Problems for Final Exam: Solutions CS 341: Foundations of Computer Science II Prof. Marvin K. Nakayama 1. Short answers: (a) Define the following terms and concepts: i. Union, intersection, set

### 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

### Sets and Subsets. Countable and Uncountable

Sets and Subsets Countable and Uncountable Reading Appendix A Section A.6.8 Pages 788-792 BIG IDEAS Themes 1. There exist functions that cannot be computed in Java or any other computer language. 2. There

### Homework Five Solution CSE 355

Homework Five Solution CSE 355 Due: 17 April 01 Please note that there is more than one way to answer most of these questions. The following only represents a sample solution. Problem 1: Linz 8.1.13 and

### 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

### 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

### 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

### A Formalization of the Turing Test Evgeny Chutchev

A Formalization of the Turing Test Evgeny Chutchev 1. Introduction The Turing test was described by A. Turing in his paper [4] as follows: An interrogator questions both Turing machine and second participant

### GROUPS SUBGROUPS. Definition 1: An operation on a set G is a function : G G G.

Definition 1: GROUPS 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 the identity, such that (i) the

### 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

### Structural properties of oracle classes

Structural properties of oracle classes Stanislav Živný Computing Laboratory, University of Oxford, Wolfson Building, Parks Road, Oxford, OX1 3QD, UK Abstract Denote by C the class of oracles relative

### Compiler Construction

Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation

### Homework Three Solution CSE 355

Homework Three Solution CSE 355 Due: 06 March 2012 Please note that there is more than one way to answer most of these questions. The following only represents a sample solution. Problem 1: Linz 4.1.13

### 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

### 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

### 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.

### INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING DUNDIGAL 500 043, HYDERABAD COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Name : FORMAL LANGUAGES AND AUTOMATA THEORY Code : A40509 Class : II B. Tech II

### 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

### Finite Sets. Theorem 5.1. Two non-empty finite sets have the same cardinality if and only if they are equivalent.

MATH 337 Cardinality Dr. Neal, WKU We now shall prove that the rational numbers are a countable set while R is uncountable. This result shows that there are two different magnitudes of infinity. But we

### 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

### 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

### Theory of Computation

Theory of Computation For Computer Science & Information Technology By www.thegateacademy.com Syllabus Syllabus for Theory of Computation Regular Expressions and Finite Automata, Context-Free Grammar s

### 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

### Sets. A set is a collection of (mathematical) objects, with the collection treated as a single mathematical object.

Sets 1 Sets Informally: A set is a collection of (mathematical) objects, with the collection treated as a single mathematical object. Examples: real numbers, complex numbers, C integers, All students in

### 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

### Theory of Computation Lecture Notes

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

### Lecture 36: Turing Machines [Fa 14]

Caveat lector: This is the zeroth (draft) edition of this lecture note. In particular, some topics still need to be written. Please send bug reports and suggestions to jeffe@illinois.edu. Think globally,

### 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

### 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

### 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.

### (Refer Slide Time: 1:41)

Discrete Mathematical Structures Dr. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture # 10 Sets Today we shall learn about sets. You must

### Mathematical Induction. Lecture 10-11

Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

### 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

### MAT2400 Analysis I. A brief introduction to proofs, sets, and functions

MAT2400 Analysis I A brief introduction to proofs, sets, and functions In Analysis I there is a lot of manipulations with sets and functions. It is probably also the first course where you have to take

University of Virginia - cs3102: Theory of Computation Spring 2010 Final Exam - Comments Problem 1: Definitions. (Average 7.2 / 10) For each term, provide a clear, concise, and precise definition from

### Computing Functions with Turing Machines

CS 30 - Lecture 20 Combining Turing Machines and Turing s Thesis Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata

### 4.6 The Primitive Recursive Functions

4.6. THE PRIMITIVE RECURSIVE FUNCTIONS 309 4.6 The Primitive Recursive Functions The class of primitive recursive functions is defined in terms of base functions and closure operations. Definition 4.6.1

### the lemma. Keep in mind the following facts about regular languages:

CPS 2: Discrete Mathematics Instructor: Bruce Maggs Assignment Due: Wednesday September 2, 27 A Tool for Proving Irregularity (25 points) When proving that a language isn t regular, a tool that is often

### Discrete Mathematics, Chapter 5: Induction and Recursion

Discrete Mathematics, Chapter 5: Induction and Recursion Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 5 1 / 20 Outline 1 Well-founded

### 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

### 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

### 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*.

### Logic & Discrete Math in Software Engineering (CAS 701) Dr. Borzoo Bonakdarpour

Logic & Discrete Math in Software Engineering (CAS 701) Background Dr. Borzoo Bonakdarpour Department of Computing and Software McMaster University Dr. Borzoo Bonakdarpour Logic & Discrete Math in SE (CAS

### Universal Turing Machine: A Model for all Computational Problems

Universal Turing Machine: A Model for all Computational Problems Edward E. Ogheneovo Lecturer I, Dept of Computer Science, University of Port Harcourt, Port Harcourt Nigeria. ABSTRACT: Turing machines

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

### 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

### 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

### Theory of Computation Class Notes 1

Theory of Computation Class Notes 1 1 based on the books by Sudkamp and by Hopcroft, Motwani and Ullman ii Contents 1 Introduction 1 1.1 Sets.............................................. 1 1.2 Functions

### Chapter 2. Finite Automata. 2.1 The Basic Model

Chapter 2 Finite Automata 2.1 The Basic Model Finite automata model very simple computational devices or processes. These devices have a constant amount of memory and process their input in an online manner.

### Outline. Database Theory. Perfect Query Optimization. Turing Machines. Question. Definition VU , SS Trakhtenbrot s Theorem

Database Theory Database Theory Outline Database Theory VU 181.140, SS 2016 4. Trakhtenbrot s Theorem Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 4.

### CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

### Automata Theory and Languages

Automata Theory and Languages SITE : http://www.info.univ-tours.fr/ mirian/ Automata Theory, Languages and Computation - Mírian Halfeld-Ferrari p. 1/1 Introduction to Automata Theory Automata theory :

### 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

### 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,

### Fundamentals of Mathematics Lecture 6: Propositional Logic

Fundamentals of Mathematics Lecture 6: Propositional Logic Guan-Shieng Huang National Chi Nan University, Taiwan Spring, 2008 1 / 39 Connectives Propositional Connectives I 1 Negation: (not A) A A T F

### Markov Algorithm. CHEN Yuanmi December 18, 2007

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

### 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

### ECS 120 Lesson 17 Church s Thesis, The Universal Turing Machine

ECS 120 Lesson 17 Church s Thesis, The Universal Turing Machine Oliver Kreylos Monday, May 7th, 2001 In the last lecture, we looked at the computation of Turing Machines, and also at some variants of Turing

### Mathematical Induction

Mathematical Induction Victor Adamchik Fall of 2005 Lecture 1 (out of three) Plan 1. The Principle of Mathematical Induction 2. Induction Examples The Principle of Mathematical Induction Suppose we have

### The Classes P and NP

The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

### 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

### 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

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### Math 317 HW #7 Solutions

Math 17 HW #7 Solutions 1. Exercise..5. Decide which of the following sets are compact. For those that are not compact, show how Definition..1 breaks down. In other words, give an example of a sequence

### 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

### Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU

Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Birgit Vogtenhuber Institute for Software Technology email: bvogt@ist.tugraz.at office hour: Tuesday 10:30 11:30 slides: http://www.ist.tugraz.at/pact.html

### Deterministic Push-Down Store Automata

Deterministic Push-Down tore Automata 1 Context-Free Languages A B C D... A w 0 w 1 D...E The languagea n b n : a b ab 2 Finite-tate Automata 3 Pushdown Automata Pushdown automata (pda s) is an fsa with