Theory of Computation

Size: px
Start display at page:

Download "Theory of Computation"

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

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Closure under the Regular Operations

Closure under the Regular Operations September 7, 2013 Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have shown this closure

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #6 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 39 Lecture 6: Overview Prove the equivalence of enumerators and TMs. Dovetailing

More information

Theory of Computation

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

More information

Theory of Computation

Theory of Computation Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation 1 / 38 Lecture 21: Overview Big-Oh notation. Little-o notation. Time Complexity Classes Non-deterministic TMs The Class

More information

Fooling Sets and. Lecture 5

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,

More information

Extended transition function of a DFA

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

More information

TURING MAHINES

TURING MAHINES 15-453 TURING MAHINES TURING MACHINE FINITE STATE q 10 CONTROL AI N P U T INFINITE TAPE read write move 0 0, R, R q accept, R q reject 0 0, R 0 0, R, L read write move 0 0, R, R q accept, R 0 0, R 0 0,

More information

CSE 105 Theory of Computation Professor Jeanne Ferrante

CSE 105 Theory of Computation  Professor Jeanne Ferrante CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s agenda NFA Review and Design NFA s Equivalence to DFA s Another Closure Property proof for Regular Languages

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

Course 4 Finite Automata/Finite State Machines

Course 4 Finite Automata/Finite State Machines Course 4 Finite Automata/Finite State Machines The structure and the content of the lecture is based on (1) http://www.eecs.wsu.edu/~ananth/cpts317/lectures/index.htm, (2) W. Schreiner Computability and

More information

CSE 555 Homework Three Sample Solutions

CSE 555 Homework Three Sample Solutions CSE 555 Homework Three Sample Solutions Question 1 Let Σ be a fixed alphabet. A PDA M with n states and stack alphabet of size σ may recognize the empty language; if its language is non-empty then denote

More information

CS 154, Lecture 3: DFA NFA, Regular Expressions

CS 154, Lecture 3: DFA NFA, Regular Expressions CS 154, Lecture 3: DFA NFA, Regular Expressions Homework 1 is coming out Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and

More information

Chap. 1.2 NonDeterministic Finite Automata (NFA)

Chap. 1.2 NonDeterministic Finite Automata (NFA) Chap. 1.2 NonDeterministic Finite Automata (NFA) DFAs: exactly 1 new state for any state & next char NFA: machine may not work same each time More than 1 transition rule for same state & input Any one

More information

About the relationship between formal logic and complexity classes

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

More information

Chapter Five: Nondeterministic Finite Automata

Chapter Five: Nondeterministic Finite Automata Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more

More information

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r Syllabus R9 Regulation UNIT-II NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: In the automata theory, a nondeterministic finite automaton (NFA) or nondeterministic finite state machine is a finite

More information

Nondeterminism. September 7, Nondeterminism

Nondeterminism. September 7, Nondeterminism September 7, 204 Introduction is a useful concept that has a great impact on the theory of computation Introduction is a useful concept that has a great impact on the theory of computation So far in our

More information

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: Mapping Reducibility 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/mapping.pdf 1 Last time Reducibility

More information

Languages, regular languages, finite automata

Languages, regular languages, finite automata Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,

More information

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand

More information

Exam Computability and Complexity

Exam Computability and Complexity Total number of points:... Number of extra sheets of paper:... Exam Computability and Complexity by Jiri Srba, January 2009 Student s full name CPR number Study number Before you start, fill in the three

More information

Turing Machines. Lecture 8

Turing Machines. Lecture 8 Turing Machines Lecture 8 1 Course Trajectory We will see algorithms, what can be done. But what cannot be done? 2 Computation Problem: To compute a function F that maps each input (a string) to an output

More information

Formal Definition of Computation. August 28, 2013

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

More information

Decidability of WS1S and S1S (An Exposition) Exposition by William Gasarch-U of MD

Decidability of WS1S and S1S (An Exposition) Exposition by William Gasarch-U of MD 1 Introduction Decidability of WS1S and S1S (An Exposition) Exposition by William Gasarch-U of MD We are going to prove that a (small) fragment of mathematics is decidable. 1. A Formula allows variables

More information

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism, CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for

More information

COM364 Automata Theory Lecture Note 2 - Nondeterminism

COM364 Automata Theory Lecture Note 2 - Nondeterminism COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly

More information

Lecturecise 22 Weak monadic second-order theory of one successor (WS1S)

Lecturecise 22 Weak monadic second-order theory of one successor (WS1S) Lecturecise 22 Weak monadic second-order theory of one successor (WS1S) 2013 Reachability in the Heap Many programs manipulate linked data structures (lists, trees). To express many important properties

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) CS/ECE 374: Algorithms & Models of Computation, Fall 28 Deterministic Finite Automata (DFAs) Lecture 3 September 4, 28 Chandra Chekuri (UIUC) CS/ECE 374 Fall 28 / 33 Part I DFA Introduction Chandra Chekuri

More information

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs CSE : Foundations of Computing Lecture : Finite State Machine Minimization & NFAs State Minimization Many different FSMs (DFAs) for the same problem Take a given FSM and try to reduce its state set by

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

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

More information

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset

More information

September 7, Formal Definition of a Nondeterministic Finite Automaton

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,

More information

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) 1 Deterministic Turing Machine (DTM).. B B 0 1 1 0 0 B B.. Finite Control Two-way, infinite tape, broken into

More information

Finite Automata Part Two

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

More information

Nondeterministic Finite Automata. Nondeterminism Subset Construction

Nondeterministic Finite Automata. Nondeterminism Subset Construction Nondeterministic Finite Automata Nondeterminism Subset Construction 1 Nondeterminism A nondeterministic finite automaton has the ability to be in several states at once. Transitions from a state on an

More information

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

More information

1 Showing Recognizability

1 Showing Recognizability CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) Algorithms & Models of Computation CS/ECE 374, Spring 29 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, January 22, 29 L A TEXed: December 27, 28 8:25 Chan, Har-Peled, Hassanieh (UIUC) CS374 Spring

More information

Turing Machines Part III

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

More information

Most General computer?

Most General computer? Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall

More information

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

More information

CSE 1400 Applied Discrete Mathematics Definitions

CSE 1400 Applied Discrete Mathematics Definitions CSE 1400 Applied Discrete Mathematics Definitions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Arithmetic 1 Alphabets, Strings, Languages, & Words 2 Number Systems 3 Machine

More information

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

Introduction to Theoretical Computer Science. Motivation. Automata = abstract computing devices

Introduction to Theoretical Computer Science. Motivation. Automata = abstract computing devices Introduction to Theoretical Computer Science Motivation Automata = abstract computing devices Turing studied Turing Machines (= computers) before there were any real computers We will also look at simpler

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

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

More information

Lecture 3: Nondeterministic Finite Automata

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

More information

Introduction to Languages and Computation

Introduction to Languages and Computation Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014

More information

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO

More information

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

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

More information

CS154, Lecture 10: Rice s Theorem, Oracle Machines

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

More information

Friendly Logics, Fall 2015, Lecture Notes 1

Friendly Logics, Fall 2015, Lecture Notes 1 Friendly Logics, Fall 2015, Lecture Notes 1 Val Tannen 1 Some references Course Web Page: http://www.cis.upenn.edu/~val/cis682. I have posted there the remarkable On the Unusual Effectiveness of Logic

More information

Introduction to Turing Machines

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

More information

Lecture 4: More on Regexps, Non-Regular Languages

Lecture 4: More on Regexps, Non-Regular Languages 6.045 Lecture 4: More on Regexps, Non-Regular Languages 6.045 Announcements: - Pset 1 is on piazza (as of last night) - If you don t have piazza access but are registered for 6.045, send email to TAs with

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

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

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

More information

Complexity Theory Part I

Complexity Theory Part I Complexity Theory Part I Outline for Today Recap from Last Time Reviewing Verifiers Nondeterministic Turing Machines What does nondeterminism mean in the context of TMs? And just how powerful are NTMs?

More information

CS 322 D: Formal languages and automata theory

CS 322 D: Formal languages and automata theory CS 322 D: Formal languages and automata theory Tutorial NFA DFA Regular Expression T. Najla Arfawi 2 nd Term - 26 Finite Automata Finite Automata. Q - States 2. S - Alphabets 3. d - Transitions 4. q -

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

Please give details of your answer. A direct answer without explanation is not counted.

Please give details of your answer. A direct answer without explanation is not counted. Please give details of your answer. A direct answer without explanation is not counted. Your answers must be in English. Please carefully read problem statements. During the exam you are not allowed to

More information

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY RYAN DOUGHERTY If we want to talk about a program running on a real computer, consider the following: when a program reads an instruction,

More information

Nondeterminism and Epsilon Transitions

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

More information

False. They are the same language.

False. They are the same language. CS 3100 Models of Computation Fall 2010 Notes 8, Posted online: September 16, 2010 These problems will be helpful for Midterm-1. More solutions will be worked out. The midterm exam itself won t be this

More information

3515ICT: Theory of Computation. Regular languages

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,

More information

CpSc 421 Homework 9 Solution

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

More information

Automata and Computability. Solutions to Exercises

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

More information

Harvard CS 121 and CSCI E-121 Lecture 20: Polynomial Time

Harvard CS 121 and CSCI E-121 Lecture 20: Polynomial Time Harvard CS 121 and CSCI E-121 Lecture 20: Polynomial Time Harry Lewis November 12, 20123 Review of Asymptotic Notation For f, g : N R + f = O(g): c > 0 s.t. f(n) c g(n) for all sufficiently large n. f

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

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

More information

CS 154 Formal Languages and Computability Assignment #2 Solutions

CS 154 Formal Languages and Computability Assignment #2 Solutions CS 154 Formal Languages and Computability Assignment #2 Solutions Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak www.cs.sjsu.edu/~mak Assignment #2: Question 1

More information

Computability Theory

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

More information

Homework 1 Due September 20 M1 M2

Homework 1 Due September 20 M1 M2 Homework 1 Due September 20 1. Consider the state diagrams for two DFAs, M1 and M2 M1 M2 a. Give the formal descriptions of the two machines above specifically, specify the elements of the 5-tuple (Q,

More information

Notes for Lecture Notes 2

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

More information

where Q is a finite set of states

where Q is a finite set of states Space Complexity So far most of our theoretical investigation on the performances of the various algorithms considered has focused on time. Another important dynamic complexity measure that can be associated

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

CSCI3390-Lecture 14: The class NP

CSCI3390-Lecture 14: The class NP CSCI3390-Lecture 14: The class NP 1 Problems and Witnesses All of the decision problems described below have the form: Is there a solution to X? where X is the given problem instance. If the instance is

More information

Chapter 6: NFA Applications

Chapter 6: NFA Applications Chapter 6: NFA Applications Implementing NFAs The problem with implementing NFAs is that, being nondeterministic, they define a more complex computational procedure for testing language membership. To

More information

Non-deterministic Finite Automata (NFAs)

Non-deterministic Finite Automata (NFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Non-deterministic Finite Automata (NFAs) Part I NFA Introduction Lecture 4 Thursday, September 7, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 39 Sariel

More information

Nondeterministic Finite Automata

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

More information

Decidability: Church-Turing Thesis

Decidability: Church-Turing Thesis Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there

More information

Proving languages to be nonregular

Proving languages to be nonregular Proving languages to be nonregular We already know that there exist languages A Σ that are nonregular, for any choice of an alphabet Σ. This is because there are uncountably many languages in total and

More information

front pad rear pad door

front pad rear pad door front pad rear pad door REAR BOTH NEITHER closed FRONT open FRONT REAR BOTH NEITHER Think of this as a simple program that outputs one of two values (states) when provided with the current state and an

More information

Deterministic Finite Automaton (DFA)

Deterministic Finite Automaton (DFA) 1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

More information

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010 CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010 We now embark on a study of computational classes that are more general than NP. As these classes

More information

ACS2: Decidability Decidability

ACS2: Decidability Decidability Decidability Bernhard Nebel and Christian Becker-Asano 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

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

More information

CSC173 Workshop: 13 Sept. Notes

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

More information

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

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018 CS 301 Lecture 18 Decidable languages Stephen Checkoway April 2, 2018 1 / 26 Decidable language Recall, a language A is decidable if there is some TM M that 1 recognizes A (i.e., L(M) = A), and 2 halts

More information

arxiv: v2 [cs.fl] 29 Nov 2013

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

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 4.1 Explain what it means for a problem to be decidable. Justify the use of encoding.

More information

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018 CS 301 Lecture 17 Church Turing thesis Stephen Checkoway March 19, 2018 1 / 17 An abridged modern history of formalizing algorithms An algorithm is a finite, unambiguous sequence of steps for solving a

More information

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

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

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 35 Lecture 10: Overview Undecidability of the Halting Problem Russell s Paradox

More information

Decidability (What, stuff is unsolvable?)

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

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.1 Explain what it means for a problem to be decidable. Justify the use of encoding.

More information

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

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

More information

Automata Theory for Presburger Arithmetic Logic

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

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information