# Theory of Computation

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation /

2 Lecture 3: Overview Decidability of Logical Theories Presburger arithmetic Decidability of Presburger Arithmetic Dr. Sarmad Abbasi () Theory of Computation 2 /

3 Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation 3 /

4 We started with an alphabet. {,,, (, ),,, x, R, R 2,..., R k } We considered formulas with this alphabet. Some examples of formulas 2 x x 2 R (x, x 2 ) R 2 (x, x 3 ) x x 2 x 3 R 2 (x ) (R 3 (x, x 3 ) R (x 2, x 2 )) Dr. Sarmad Abbasi () Theory of Computation 4 /

5 A sentence is a formula without any free variables: 2 This defines the syntax. x x 2 R (x, x 2 ) R 2 (x 2, x ) xr (x, x) Dr. Sarmad Abbasi () Theory of Computation 5 /

6 To specify a model M. We have to specify U the universe where the variables will take values. 2 P,..., P k are relation assigned to symbols R,..., R k. Dr. Sarmad Abbasi () Theory of Computation 6 /

7 The language of a model M is the set of all formulas which use the relation symbols with correct airy Suppose in the model M R is assigned a binary relation P. 2 R 2 is assigned a unary relation P 2. 3 R 3 is assigned a 5-ary relation P 3. Dr. Sarmad Abbasi () Theory of Computation 7 /

8 The formula x x 2 (R (x, x 2 ) R 2 (x 4 )) (R 3 (x 2, x, x 3, x 4, x 5 ) is in the language. Since, all relations have the right airty but x x 2 (R (x ) R 2 (x 4 )) (R 3 (x 2, x ) is not since the airty of two relations is wrong. Dr. Sarmad Abbasi () Theory of Computation 8 /

9 If M is a model. We let TH(M) denote the theory of M. It is by definition the set of all sentences that are true sentences in the language of that M. A central point of investigation is to find out which theories are decidable and which ones are not. Dr. Sarmad Abbasi () Theory of Computation 9 /

10 Note that when we are talking about a model in which relations have some usual meaning then we shift to infix notation. We also saw examples of sentences that are true in one model and false in another model. Dr. Sarmad Abbasi () Theory of Computation /

11 Let us look at one: φ = y x[r (x, x, y)] M was the model with N as the universe. R was assigned PLUS. The sentence can be rewritten as and it is not true. φ = y x[x + x = y] 2 M 2 was the model with R as the universe. R was again assigned PLUS. The sentence can be rewritten as and it is true. φ = y x[x + x = y] Dr. Sarmad Abbasi () Theory of Computation /

12 Given a Model M we would like to know which sentences are true and which ones are not true. What we want is a decision procedure or an algorithm which will take a sentence and tell us if the sentence is true or not. Dr. Sarmad Abbasi () Theory of Computation 2 /

13 One of the most interesting model is number theory where M with relation + and, =, with their usual meaning. This theory is undecidable. This is a major theorem by Alonzo Church building on the work of Godel. Dr. Sarmad Abbasi () Theory of Computation 3 /

14 Let us start with a simpler theory. This theory is called Presburger Arithmetic. The universe is the natural numbers N. 2 Two relations + and = with their usual meaning. So only multiplication is missing in Presburger Arithmetic. Dr. Sarmad Abbasi () Theory of Computation 4 /

15 Let us look at some sentences: y x[x + x = y] 2 x y z[(x + y = z) ((x + x + y = z) (x + y = z + z + z))] Note that it is possible to write 5x as x + x + x + x + x. However, we cannot write xy or x 2. So in this theory the variables are only multiplied by constants. We cannot use higher powers either. Dr. Sarmad Abbasi () Theory of Computation 5 /

16 We want to prove that this theory is decidable. So, we want to design an algorithm (or a TM) with will take as input a sentence and decide if it is true or not. How does the input look like: y z x[(x + x = y) (y + x = z)] 2 x y z[(z + x = z + y) (y + x = z + z])] How will the algorithm decide if a sentence is true. Dr. Sarmad Abbasi () Theory of Computation 6 /

17 Lets start with something simpler. Let us look at the simple atomic formula x + y = z Can we design a DFA that accepts x, y, z if and only if they satisfy this equation? Dr. Sarmad Abbasi () Theory of Computation 7 /

18 Let us be more clear. How will the input be given to the DFA. Let us define Σ 3 =,,,,,, Dr. Sarmad Abbasi () Theory of Computation 8 /

19 Now, we can give input to the DFA. Suppose x = 5, y = 3, z = 6 then the input to the DFA would be The top row is x in binary. 2 The second row is y in binary. 3 The third row is z in binary. Dr. Sarmad Abbasi () Theory of Computation 9 /

20 Can we design a DFA where the input alphabet is Σ 3 and it accepts a string I Σ 3 such that the top row of the string when added to the second row of the string gives us the last row of the string? Dr. Sarmad Abbasi () Theory of Computation 2 /

21 The answer is yes. But it is easier if the machine is given the strings in reverse. Lets see how do we add in binary: The way we add is we remember the carry and compute the next digit and keep moving left. If the numbers were given to us in reverse we will remember the carry and keep moving right. So, if these numbers were given to us in reverse. Dr. Sarmad Abbasi () Theory of Computation 2 /

22 c = c = c = Dr. Sarmad Abbasi () Theory of Computation 22 /

23 c = c = c = Dr. Sarmad Abbasi () Theory of Computation 23 /

24 If the answer were given to us. We could check it as we go along. Actually this DFA is very very simple. Let us look at it. It has only two state and a trap state. q, q and q r. q is the accept state. Here are the transitions. When the machine is in q the carry is. When it is in q the carry is. 2 δ(q, δ(q, ) = q ) = q r Dr. Sarmad Abbasi () Theory of Computation 24 /

25 2 3 δ(q, δ(q, δ(q, ) = q r ) = q ) = q Dr. Sarmad Abbasi () Theory of Computation 25 /

26 So we can make a DFA which accepts all strings I Σ 3 such that The top row of I read revered in binary + Second row of I read reversed in binary = Last row of I read reverse in binary Thus if I represents three numbers x, y and z then the DFA accepts if and only if x + y = z. Dr. Sarmad Abbasi () Theory of Computation 26 /

27 What about other equations in Presburger Arithmetic. Let us think about We can use the same trick. Let Σ 4 = x + y = z + z + t,, Each string I Σ 4 represents four numbers x, y, z and t written in reverse binary. We can make a DFA D such that D accepts I if and only if. x + y = z + z + t Dr. Sarmad Abbasi () Theory of Computation 27 /

28 Given a atomic formula F (in Presburger Arithmetic) in i variables variables we define x,..., x i to be an alphabet with 2 i characters. Each string S Σ i defines i numbers a,..., a i. We can make a DFA D such that D accepts S if and only if a,..., a i satisfy the equation F. Σ i Dr. Sarmad Abbasi () Theory of Computation 28 /

29 x + x 2 + x 2 + x 2 = x 3 + x 3 + x 4 + x 5. 2 x + x 2 + x 3 + x 5 = x 4 + x 4 + x 4 We can make DFA D such which accepts strings over Σ 5 in the first case and another DFA D 2 which accepts strings over Σ 5. So, in some sense DFAs can capture atomic formulas of Presburger Arithmetic. What about non atomic formulas? Dr. Sarmad Abbasi () Theory of Computation 29 /

30 What about non atomic formulas? (x + x 2 + x 2 + x 2 = x 3 + x 3 + x 4 + x 5 ) (x + x 2 + x 3 + x 5 = x 4 + x 4 + x 4 ) (x + x 2 + x 2 + x 2 = x 3 + x 3 + x 4 + x 5 ) (x + x 2 + x 3 + x 5 = x 4 + x 4 + x 4 ) (x + x 2 + x 2 + x 2 = x 3 + x 3 + x 4 + x 5 ) (x + x 2 + x 3 + x 5 = x 4 + x 4 + x 4 ) In the first case we can make a DFA that accepts all the strings accepted by D or D 2. Regular languages are closed under union, intersection and complementarily. Dr. Sarmad Abbasi () Theory of Computation 3 /

31 Given quantifier free formula f (in Presburger Arithmetic) in i variables variables we define x,..., x i to be an alphabet with 2 i characters. Each string S Σ i defines i numbers a,..., a i. We can make a DFA D such that D accepts S if and only if a,..., a i satisfy F. Σ i Dr. Sarmad Abbasi () Theory of Computation 3 /

32 What about formulas with quantifiers lets look at one of them:. This formula has two free variables x 3 [x + x 2 + x 2 = x 3 ] x, x 2 So lets work with Σ 2 and Σ 3. We can make a DFA D that accepts strings S Σ 3 such that S represents x, x 2 and x 3 which satisfy x + x 2 + x 2 = x 3. We would like a DFA D that accepts strings S Σ 2 such that S represent x, x 2 and satisfy x 3 [x + x 2 + x 2 = x 3 ]. Dr. Sarmad Abbasi () Theory of Computation 32 /

33 It is much easier to make an NFA given the DFA D. The NFA N simply guesses the value of x 3 as it goes along moving to the right. Thus in each move it makes two non-deterministic moves. One pretending the current bit of x 3 is and the other pretending that it is. We can then convert this NFA N to a DFA using a standard algorithm. Dr. Sarmad Abbasi () Theory of Computation 33 /

34 We can deal with quantifiers like this one by one. Let say we have a formula φ = x i ψ First we make an DFA D that accepts those over Σ i that represent x,..., x i and satisfy ψ. Then we make an NFA that uses D and guesses the value of each bit of x i as it goes along. We convert this D to D which now accepts strings over Σ i. Dr. Sarmad Abbasi () Theory of Computation 34 /

35 How to handle This is easy since φ = x i ψ x i ψ = ψ First we make an DFA D that accepts those over Σ i that represent x,..., x i and satisfy ψ. Thus we can use the fact that regular languages are closed under complementarily to make a DFA D that accepts φ. We also use the technique for handling. Dr. Sarmad Abbasi () Theory of Computation 35 /

36 This way if we have a sentence Q x Q 2 x 2 x i φ We can make a DFA D that will accept the empty string over Σ if and only if the formula is true. In the end we run D on the empty string to see if accepts ɛ. If it does then the formula is true. Otherwise it is false. Dr. Sarmad Abbasi () Theory of Computation 36 /

### Theory of Computation

Theory of Computation Lecture #2 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 1 Lecture 2: Overview Recall some basic definitions from Automata Theory.

### Theory of Computation

Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 43 Lecture 10: Overview Linear Bounded Automata Acceptance Problem for LBAs

### Fooling Sets and. Lecture 5

Fooling Sets and Introduction to Nondeterministic Finite Automata Lecture 5 Proving that a language is not regular Given a language, we saw how to prove it is regular (union, intersection, concatenation,

### Extended transition function of a DFA

Extended transition function of a DFA The next two pages describe the extended transition function of a DFA in a more detailed way than Handout 3.. p./43 Formal approach to accepted strings We define the

### About the relationship between formal logic and complexity classes

About the relationship between formal logic and complexity classes Working paper Comments welcome; my email: armandobcm@yahoo.com Armando B. Matos October 20, 2013 1 Introduction We analyze a particular

### September 7, Formal Definition of a Nondeterministic Finite Automaton

Formal Definition of a Nondeterministic Finite Automaton September 7, 2014 A comment first The formal definition of an NFA is similar to that of a DFA. Both have states, an alphabet, transition function,

### Formal Definition of Computation. August 28, 2013

August 28, 2013 Computation model The model of computation considered so far is the work performed by a finite automaton Finite automata were described informally, using state diagrams, and formally, as

### cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages

### Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure

### Turing Machines Part III

Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's

### Finite Automata Part Two

Finite Automata Part Two Recap from Last Time Old MacDonald Had a Symbol, Σ-eye-ε-ey, Oh! You may have noticed that we have several letter- E-ish symbols in CS103, which can get confusing! Here s a quick

### FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are

### Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

### Automata and Computability. Solutions to Exercises

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

### ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

ECS 120: Theory of Computation Handout MT UC Davis Phillip Rogaway February 16, 2012 Midterm Exam Instructions: The exam has six pages, including this cover page, printed out two-sided (no more wasted

### Lecture 3: Nondeterministic Finite Automata

Lecture 3: Nondeterministic Finite Automata September 5, 206 CS 00 Theory of Computation As a recap of last lecture, recall that a deterministic finite automaton (DFA) consists of (Q, Σ, δ, q 0, F ) where

### CS154, Lecture 10: Rice s Theorem, Oracle Machines

CS154, Lecture 10: Rice s Theorem, Oracle Machines Moral: Analyzing Programs is Really, Really Hard But can we more easily tell when some program analysis problem is undecidable? Problem 1 Undecidable

### CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) Sungjin Im University of California, Merced 2-3-214 Example II A ɛ B ɛ D F C E Example II A ɛ B ɛ D F C E NFA accepting

### 3515ICT: Theory of Computation. Regular languages

3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,

### Finite Automata and Regular languages

Finite Automata and Regular languages Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/

### Decidability and Undecidability

Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an

### arxiv: v2 [cs.fl] 29 Nov 2013

A Survey of Multi-Tape Automata Carlo A. Furia May 2012 arxiv:1205.0178v2 [cs.fl] 29 Nov 2013 Abstract This paper summarizes the fundamental expressiveness, closure, and decidability properties of various

### 1 Computational Problems

Stanford University CS254: Computational Complexity Handout 2 Luca Trevisan March 31, 2010 Last revised 4/29/2010 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

### Nondeterminism and Epsilon Transitions

Nondeterminism and Epsilon Transitions Mridul Aanjaneya Stanford University June 28, 22 Mridul Aanjaneya Automata Theory / 3 Challenge Problem Question Prove that any square with side length a power of

### E.g. The set RE of regular expressions is given by the following rules:

1 Lecture Summary We gave a brief overview of inductively defined sets, inductively defined functions, and proofs by structural induction We showed how to prove that a machine is correct using induction

### CpSc 421 Homework 9 Solution

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

### Theory of Computation

Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation 1 / 33 Lecture 20: Overview Incompressible strings Minimal Length Descriptions Descriptive Complexity Dr. Sarmad Abbasi

### Nondeterministic Finite Automata

Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

### CSC173 Workshop: 13 Sept. Notes

CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of

### Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

CS 373: Theory of Computation Sariel Har-Peled and Madhusudan Parthasarathy Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 This lecture covers Rice s theorem, as well as

### Automata Theory for Presburger Arithmetic Logic

Automata Theory for Presburger Arithmetic Logic References from Introduction to Automata Theory, Languages & Computation and Constraints in Computational Logic Theory & Application Presented by Masood

### Computer Sciences Department

1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 objectives Finite automaton Infinite automaton Formal definition State diagram Regular and Non-regular

### Computability Theory

CS:4330 Theory of Computation Spring 2018 Computability Theory Decidable Problems of CFLs and beyond Haniel Barbosa Readings for this lecture Chapter 4 of [Sipser 1996], 3rd edition. Section 4.1. Decidable

### 3 Probabilistic Turing Machines

CS 252 - Probabilistic Turing Machines (Algorithms) Additional Reading 3 and Homework problems 3 Probabilistic Turing Machines When we talked about computability, we found that nondeterminism was sometimes

### Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

### Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting

### CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

CSE 20 Lecture 4: Introduction to Boolean algebra Reminder First quiz will be on Friday (17th January) in class. It is a paper quiz. Syllabus is all that has been done till Wednesday. If you want you may

### CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

CS 154 Finite Automata vs Regular Expressions, Non-Regular Languages Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and guessing

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

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

### Mathematical Preliminaries. Sipser pages 1-28

Mathematical Preliminaries Sipser pages 1-28 Mathematical Preliminaries This course is about the fundamental capabilities and limitations of computers. It has 3 parts 1. Automata Models of computation

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

Theory of Computer Science May 2, 2018 D7. Halting Problem and Reductions Theory of Computer Science D7. Halting Problem and Reductions Gabriele Röger University of Basel May 2, 2018 D7.1 Introduction

### PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

University of Virginia - cs3102: Theory of Computation Spring 2010 PS2 - Comments Average: 77.4 (full credit for each question is 100 points) Distribution (of 54 submissions): 90, 12; 80 89, 11; 70-79,

### Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Automata and Formal Languages - CM81 Non-Deterministic Finite Automata Andrés Sicard-Ramírez Universidad EAFIT Semester 217-2 Non-Deterministic Finite Automata (NFA) Introduction q i a a q j a q k The

### CISC4090: Theory of Computation

CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

### Finite Automata Part Two

Finite Automata Part Two DFAs A DFA is a Deterministic Finite Automaton A DFA is defined relative to some alphabet Σ. For each state in the DFA, there must be exactly one transition defined for each symbol

### Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

### 2.2 Lowenheim-Skolem-Tarski theorems

Logic SEP: Day 1 July 15, 2013 1 Some references Syllabus: http://www.math.wisc.edu/graduate/guide-qe Previous years qualifying exams: http://www.math.wisc.edu/ miller/old/qual/index.html Miller s Moore

### CS481F01 Solutions 6 PDAS

CS481F01 Solutions 6 PDAS A. Demers 2 November 2001 1. Give a NPDAs that recognize the following languages: (a) The set of all strings in {0, 1} that contain twice as many 1s as 0s. (answer a) We build

### Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Turing Machines a n b n c The anguage Hierarchy n? ww? Context-Free anguages a n b n egular anguages a * a *b* ww Courtesy Costas Busch - PI a n b n c n Turing Machines anguages accepted by Turing Machines

### cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 13 CHAPTER 4 TURING MACHINES 1. The definition of Turing machine 2. Computing with Turing machines 3. Extensions of Turing

### Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications

### cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6a REVIEW for Q2 Q2 covers Lecture 5 and Lecture 6 Chapter 2 - Deterministic Finite Automata DFA Chapter 2 - Nondeterministic

### Nondeterministic finite automata

Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the

### Concatenation. The concatenation of two languages L 1 and L 2

Regular Expressions Problem Problem Set Set Four Four is is due due using using a late late period period in in the the box box up up front. front. Concatenation The concatenation of two languages L 1

### 1 More finite deterministic automata

CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.

### Automata: a short introduction

ILIAS, University of Luxembourg Discrete Mathematics II May 2012 What is a computer? Real computers are complicated; We abstract up to an essential model of computation; We begin with the simplest possible

### Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

### Lecture Notes: The Halting Problem; Reductions

Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings

### 17.1 The Halting Problem

CS125 Lecture 17 Fall 2016 17.1 The Halting Problem Consider the HALTING PROBLEM (HALT TM ): Given a TM M and w, does M halt on input w? Theorem 17.1 HALT TM is undecidable. Suppose HALT TM = { M,w : M

### Theory of Computation Lecture Notes. Problems and Algorithms. Class Information

Theory of Computation Lecture Notes Prof. Yuh-Dauh Lyuu Dept. Computer Science & Information Engineering and Department of Finance National Taiwan University Problems and Algorithms c 2004 Prof. Yuh-Dauh

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

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

### Chapter 3. Regular grammars

Chapter 3 Regular grammars 59 3.1 Introduction Other view of the concept of language: not the formalization of the notion of effective procedure, but set of words satisfying a given set of rules Origin

### Logic: The Big Picture

Logic: The Big Picture A typical logic is described in terms of syntax: what are the legitimate formulas semantics: under what circumstances is a formula true proof theory/ axiomatization: rules for proving

### (a) Definition of TMs. First Problem of URMs

Sec. 4: Turing Machines First Problem of URMs (a) Definition of the Turing Machine. (b) URM computable functions are Turing computable. (c) Undecidability of the Turing Halting Problem That incrementing

CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

### Turing Machine Variants

CS311 Computational Structures Turing Machine Variants Lecture 12 Andrew Black Andrew Tolmach 1 The Church-Turing Thesis The problems that can be decided by an algorithm are exactly those that can be decided

### ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM. Turing 1936

ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM Turing 1936 Where are We? Ignoramus et ignorabimus Wir mussen wissen Wir werden wissen We do not know We shall not know We must know

### Before we show how languages can be proven not regular, first, how would we show a language is regular?

CS35 Proving Languages not to be Regular Before we show how languages can be proven not regular, first, how would we show a language is regular? Although regular languages and automata are quite powerful

### Notes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013

Notes on Satisfiability-Based Problem Solving First Order Logic David Mitchell mitchell@cs.sfu.ca October 23, 2013 Preliminary draft. Please do not distribute. Corrections and suggestions welcome. In this

### Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

### Lecture 17: Language Recognition

Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to

### The Turing machine model of computation

The Turing machine model of computation For most of the remainder of the course we will study the Turing machine model of computation, named after Alan Turing (1912 1954) who proposed the model in 1936.

### Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

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

CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Church-Turing Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan

### Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? What is the most powerful of automata? In this lecture we will introduce

### Theory of Computation

Theory of Computation (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2018 Theory of Computation, Feodor F. Dragan, Kent State University 1 Before we go into details, what

### Computability Theory. CS215, Lecture 6,

Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David

### Turing Machines Part Two

Turing Machines Part Two Recap from Last Time Our First Turing Machine q acc a start q 0 q 1 a This This is is the the Turing Turing machine s machine s finiteisttiteiconntont. finiteisttiteiconntont.

### Formal Definition of a Finite Automaton. August 26, 2013

August 26, 2013 Why a formal definition? A formal definition is precise: - It resolves any uncertainties about what is allowed in a finite automaton such as the number of accept states and number of transitions

### Chapter 2: Finite Automata

Chapter 2: Finite Automata 2.1 States, State Diagrams, and Transitions Finite automaton is the simplest acceptor or recognizer for language specification. It is also the simplest model of a computer. A

### Notes on State Minimization

U.C. Berkeley CS172: Automata, Computability and Complexity Handout 1 Professor Luca Trevisan 2/3/2015 Notes on State Minimization These notes present a technique to prove a lower bound on the number of

### September 13, Cemela Summer School. Mathematics as language. Fact or Metaphor? John T. Baldwin. Framing the issues. structures and languages

September 13, 2008 A Language of / for mathematics..., I interpret that mathematics is a language in a particular way, namely as a metaphor. David Pimm, Speaking Mathematically Alternatively Scientists,

### Uses of finite automata

Chapter 2 :Finite Automata 2.1 Finite Automata Automata are computational devices to solve language recognition problems. Language recognition problem is to determine whether a word belongs to a language.

### Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols

Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols The purpose of this document is to illustrate what a completed project should look like. I have chosen a problem that

### Further discussion of Turing machines

Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

### CS 361 Meeting 26 11/10/17

CS 361 Meeting 26 11/10/17 1. Homework 8 due Announcements A Recognizable, but Undecidable Language 1. Last class, I presented a brief, somewhat inscrutable proof that the language A BT M = { M w M is

### 6.045 Final Exam Solutions

6.045J/18.400J: Automata, Computability and Complexity Prof. Nancy Lynch, Nati Srebro 6.045 Final Exam Solutions May 18, 2004 Susan Hohenberger Name: Please write your name on each page. This exam is open

### Lecture 7 Properties of regular languages

Lecture 7 Properties of regular languages COT 4420 Theory of Computation Section 4.1 Closure properties of regular languages If L 1 and L 2 are regular languages, then we prove that: Union: L 1 L 2 Concatenation:

### Lecture 10: Synchronous Sequential Circuits Design

Lecture 0: Synchronous Sequential Circuits Design. General Form Input Combinational Flip-flops Combinational Output Circuit Circuit Clock.. Moore type has outputs dependent only on the state, e.g. ripple

### Topic 1: Propositional logic

Topic 1: Propositional logic Guy McCusker 1 1 University of Bath Logic! This lecture is about the simplest kind of mathematical logic: propositional calculus. We discuss propositions, which are statements

### Primitive recursive functions: decidability problems

Primitive recursive functions: decidability problems Armando B. Matos October 24, 2014 Abstract Although every primitive recursive (PR) function is total, many problems related to PR functions are undecidable.

### FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY THURSDAY APRIL 3 REVIEW for Midterm TUESDAY April 8 Definition: A Turing Machine is a 7-tuple T = (Q, Σ, Γ, δ, q, q accept, q reject ), where: Q is a

### Notes for Comp 497 (Comp 454) Week 10 4/5/05

Notes for Comp 497 (Comp 454) Week 10 4/5/05 Today look at the last two chapters in Part II. Cohen presents some results concerning context-free languages (CFL) and regular languages (RL) also some decidability

### Finite Automata Part One

Finite Automata Part One Computability Theory What problems can we solve with a computer? What problems can we solve with a computer? What kind of computer? Computers are Messy http://www.intel.com/design/intarch/prodbref/27273.htm

### Lecture 13: Foundations of Math and Kolmogorov Complexity

6.045 Lecture 13: Foundations of Math and Kolmogorov Complexity 1 Self-Reference and the Recursion Theorem 2 Lemma: There is a computable function q : Σ* Σ* such that for every string w, q(w) is the description

### More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences. Computability and Logic

More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences Computability and Logic Equivalences Involving Conditionals Some Important Equivalences Involving Conditionals

### Regular Languages and Finite Automata

Regular Languages and Finite Automata Theorem: Every regular language is accepted by some finite automaton. Proof: We proceed by induction on the (length of/structure of) the description of the regular

### FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION IDENTIFYING NONREGULAR LANGUAGES PUMPING LEMMA Carnegie Mellon University in Qatar (CARNEGIE MELLON UNIVERSITY IN QATAR) SLIDES FOR 15-453 LECTURE 5 SPRING 2011