Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D.

Similar documents
Computer Sciences Department

Material from Recitation 1

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

Cardinality of Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Cardinality of Sets Fall / 15

Outline. Language Hierarchy

Theory of Computation, Homework 3 Sample Solution

Welcome to MTH401A!! Theory of Computation

Infinity and Uncountability. Countable Countably infinite. Enumeration

A B. bijection. injection. Section 2.4: Countability. a b c d e g

Problems, Languages, Machines, Computability, Complexity

Formal languages and computation models

Regular Languages (14 points) Solution: Problem 1 (6 points) Minimize the following automaton M. Show that the resulting DFA is minimal.

TAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function

Recursive and Recursively Enumerable Languages

Cardinality of Sets. Washington University Math Circle 10/30/2016

Universal Turing Machine Chomsky Hierarchy Decidability Reducibility Uncomputable Functions Rice s Theorem Decidability Continued

MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability)

CSE 105 THEORY OF COMPUTATION

6.045J/18.400J: Automata, Computability and Complexity. Practice Quiz 2

Computation, Computers, and Programs. Administrivia. Resources. Course texts: Kozen: Introduction to Computability Hickey: Introduction to OCaml

Lambda Calculus and Computation

Lecture 18: Turing Machines

Section 1.7 Sequences, Summations Cardinality of Infinite Sets

English for Computer Science

CS21 Decidability and Tractability

Theory of Computations Spring 2016 Practice Final Exam Solutions

(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar

Section 2.4 Sequences and Summations

Enumerations and Turing Machines

We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack.

Comparing sizes of sets

1. [5 points each] True or False. If the question is currently open, write O or Open.

CSE 105 THEORY OF COMPUTATION

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

Theory of Computations Spring 2016 Practice Final

CSE 105 THEORY OF COMPUTATION

Variants of Turing Machines

The Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems

A Characterization of the Chomsky Hierarchy by String Turing Machines

A Note on the Succinctness of Descriptions of Deterministic Languages

CS 531: Notes II. January 31, 2014

Computability, Cantor s diagonalization, Russell s Paradox, Gödel s s Incompleteness, Turing Halting Problem.

Turing Machines, continued

Theory of Languages and Automata

Lecture 5: The Halting Problem. Michael Beeson

ONE-STACK AUTOMATA AS ACCEPTORS OF CONTEXT-FREE LANGUAGES *

Computation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer

t!1; R 0! 1; R q HALT

The Big Picture. Chapter 3

Cantor s Diagonal Argument for Different Levels of Infinity

ECS 120 Lesson 16 Turing Machines, Pt. 2

Actually talking about Turing machines this time

CIT3130: Theory of Computation. Regular languages

MITOCW watch?v=4dj1oguwtem

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Recursively Enumerable Languages, Turing Machines, and Decidability

More Simulations. CS154 Chris Pollett Apr 25, 2007.

CSE 20 DISCRETE MATH. Fall

pp Variants of Turing Machines (Sec. 3.2)

HW 1 CMSC 452. Morally DUE Feb 7 NOTE- THIS HW IS THREE PAGES LONG!!! SOLUTIONS THROUGOUT THIS HW YOU CAN ASSUME:

(a) Give inductive definitions of the relations M N and M N of single-step and many-step β-reduction between λ-terms M and N. (You may assume the

Slides for Faculty Oxford University Press All rights reserved.

Computability Summary

CS402 - Theory of Automata Glossary By

THEORY OF COMPUTATION

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.

R10 SET a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA?

Equivalence of NTMs and TMs

05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability.

Final Course Review. Reading: Chapters 1-9

Turing Machines. A transducer is a finite state machine (FST) whose output is a string and not just accept or reject.

I have read and understand all of the instructions below, and I will obey the Academic Honor Code.

Theory of Computation

CSE 20 DISCRETE MATH. Winter

1 Finite Representations of Languages

Reducibilities relations with applications to symbolic dynamics

Theory of Programming Languages COMP360

ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES. Nikolay Kosovskiy

Decidable Problems. We examine the problems for which there is an algorithm.

6 NFA and Regular Expressions

Tutorial: Computable Model Theory and Differential Algebra

CS154. Streaming Algorithms and Communication Complexity

To illustrate what is intended the following are three write ups by students. Diagonalization

Automata and Formal Languages - CM0081 Introduction

Does this program exist? Limits of computability. Does this program exist? A helper function. For example, if the string program is

Lecture 3: Tilings and undecidability

Proof Techniques Alphabets, Strings, and Languages. Foundations of Computer Science Theory

Phil 320 Chapter 1: Sets, Functions and Enumerability I. Sets Informally: a set is a collection of objects. The objects are called members or

Introduction to the Theory of Computation, Sipser, PWS, ISBN X, 1996

Let A(x) be x is an element of A, and B(x) be x is an element of B.

Turing Machine Languages

The Size of the Cantor Set

Introduction to Computers & Programming

Closure Properties of CFLs; Introducing TMs. CS154 Chris Pollett Apr 9, 2007.

Theory of Computation p.1/?? Theory of Computation p.2/?? A Turing machine can do everything that any computing

Languages and Automata

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

CSE 105 THEORY OF COMPUTATION

Rice s Theorem and Enumeration

Cardinality Lectures

Transcription:

Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction to Languages and The by J. C. Martin

Basic Mathematical Definitions Numbers: N = natural numbers = {1, 2, 3, } Z = integers = {, -2, -1, 0, 1, 2, } Q = rational numbers ( expressed in ratios, 1/5, 3/7, 2/9 etc.) R = real numbers ( floating point, 1.5, 2.5674 etc. ) C = complex numbers (2+5i, 27-3i etc. ) Countable Set: A set is countable if there is a one-to-one correspondence between the set and N, the natural numbers. It can be enumerated. { a, b, c, d, e, } 1 2 3 4 5 N, Z and Q are countable. R and C are uncountable. 2

Rational Numbers, Q are countable 1/1 1/2 1/3 1/4 1/5 1/6 2/1 2/2 2/3 2/4 2/5 2/6 3/1 3/2 3/3 3/4 3/5 3/6 4/1 4/2 4/3 4/4 4/5 4/6 5/1. 3

Uncountable Set: Cantor s Diagonalization s 1 = (0, 0, 0, 0, 0, 0, 0,...) s 2 = (1, 1, 1, 1, 1, 1, 1,...) s 3 = (0, 1, 0, 1, 0, 1, 0,...) s 4 = (1, 0, 1, 0, 1, 0, 1,...) s 5 = (1, 1, 0, 1, 0, 1, 1,...) s 6 = (0, 0, 1, 1, 0, 1, 1,...) s 7 = (1, 0, 0, 0, 1, 0, 0,...). s 0 = (1, 0, 1, 1, 1, 0, 1,...) 4

R is uncountable Proof: o Suppose R is countable o List R according to the bijection f: n f(n) _ 1 3.14159 2 5.55555 3 0.12345 4 0.50000 5

R is uncountable Proof: o Suppose R is countable o List R according to the bijection f: n f(n) _ 1 3.14159 2 5.55555 3 0.12345 4 0.50000 set x = 0.a 1 a 2 a 3 a 4 where digit a i i th digit after decimal point of f(i) (not 0, 9) e.g. x = 0.2312 x cannot be in the list! 6

Turing Machine Decidability Turing decidability L is Turing decidable (or just decidable) if there exists a Turing machine M that accepts all strings in L and rejects all strings not in L. Note that by rejection we mean that the machine halts after a finite number of steps and announces that the input string is not acceptable. Acceptance, as usual, also requires a decision after a finite number of steps. 7

Decidability Turing Recognizability L is Turing recognizable if there is a Turing machine M that recognizes L, that is, M should accept all strings in L and M should not accept any strings not in L. This is not the same as decidability because recognizability does not require that M actually reject strings not in L. M may reject some strings not in L but it is also possible that M will simply "remain undecided" on some strings not in L; for such strings, M's computation never halts. 8

Recursion and Recursive Functions Enumerable Sets Recursively Enumerable Languages Resursive Languages Non-Recursively Enumerable Languages 9

regular languages decidable all languages context free languages RE decidable RE all languages 10

A language is recursively enumerable if some Turing machine accepts it. 11

A language is recursive if some Turing machine accepts it and halts on any input string. OR A language is recursive if there is a membership algorithm for it. 12

A language is recursively enumerable if and only if there is an enumeration procedure for it. If a language L is recursive then there is an enumeration procedure for it 13

14

15

Theorem: S is an infinite countable set, the powerset 2 s of S is uncountable Since S is countable, we can write S = { s 1, s 2, s 3, s 4,.. } where S consists of s 1, s 2, s 3, s 4,.. elements and the powerset 2 s is of the form: { {s 1 }, {s 2 }, {s 1, s 2 },.. {s 1, s 2, s 3, s 4 } } 16

String Encoding: 17

18

19

20

Coding Turing Machines 21

Transition Rules are: Coding Code for M 22

Diagonalization Language: 23

Theorem: L d is not a recursively enumerable language. That is there is no Turing Machine that accepts L d 24

25

Fig. 10 26

27

28

29

Decidable Languages about DFA 30

31

32

Halting and Acceptance Problems: Acceptance Problem: Does a Turing machine accept an input string? A TM is recursively enumerable. 33

34

35

36

END 37

38

39

40

41

42