© M. Winter COSC/MATH 4P61 - Theory of Computation 7.17.1 CFL are closed under Substitution Union Concatenation Closure (*) Homomorphism Reversal Intersection.

Slides:



Advertisements
Similar presentations
CS2303-THEORY OF COMPUTATION Closure Properties of Regular Languages
Advertisements

Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Variants of Turing machines
Natural Language Processing - Formal Language - (formal) Language (formal) Grammar.
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
Programming Languages Wrap-up. Your Toolkit Object-oriented Imperative Functional Logic.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
More Turing Machines Sipser 3.2 (pages ).
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
Lecture Note of 12/22 jinnjy. Outline Chomsky Normal Form and CYK Algorithm Pumping Lemma for Context-Free Languages Closure Properties of CFL.
Programming the TM qa  (,q) (,q) q1q1 0q1q1 R q1q1 1q1q1 R q1q1  h  Qa  (,q) (,q) q1q1 0q2q2  q1q1 1q3q3  q1q1  h  q2q2 0q4q4 R q2q2 1q4q4.
Lecture 5 Turing Machines
October 29, 2009Introduction to Cognitive Science Lecture 14: Theory of Computation I 1 Finite Automata Example 2: Can we build a finite automaton that.
Transparency No. P3C1-1 Turing Machines PART III Turing Machines and Effective Computability.
Linear Bounded Automata LBAs
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
Normal forms for Context-Free Grammars
Fall 2006Costas Busch - RPI1 The Chomsky Hierarchy.
Fall 2003Costas Busch - RPI1 Turing Machines (TMs) Linear Bounded Automata (LBAs)
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
1 Final Course Review Reading: Chapters Objectives Introduce concepts in automata theory and theory of computation Identify different formal language.
Turing Machines Recursive and Recursively Enumerable Languages
Review Byron Gao. Overview Theory of computation: central areas: Automata, Computability, Complexity Computability: Is the problem solvable? –solvable.
1 Section 14.2 A Hierarchy of Languages Context-Sensitive Languages A context-sensitive grammar has productions of the form xAz  xyz, where A is a nonterminal.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
1 Computability Five lectures. Slides available from my web page There is some formality, but it is gentle,
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
1 More About Turing Machines “Programming Tricks” Restrictions Extensions Closure Properties.
CSCI 2670 Introduction to Theory of Computing October 12, 2005.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
September1999 CMSC 203 / 0201 Fall 2002 Week #15 – 2/4/6 December 2002 Prof. Marie desJardins.
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
Recursively Enumerable Languages
Lecture 17 Undecidability Topics:  TM variations  Undecidability June 25, 2015 CSCE 355 Foundations of Computation.
Lecture 25 Undecidability Topics: Recursively Enumerable Languages Recursive languages The halting problem Post Correspondence Problem Problem reductions.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Introduction Why do we study Theory of Computation ?
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Lecture 16b Turing Machines Topics: Closure Properties of Context Free Languages Cocke-Younger-Kasimi Parsing Algorithm June 23, 2015 CSCE 355 Foundations.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
C Sc 132 Computing Theory Professor Meiliu Lu Computer Science Department.
Transparency No. P3C1-1 Turing Machines PART III Turing Machines and Effective Computability.
Lecture 6: Context-Free Languages
1 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
1 Unit – 5 : STATE MACHINES Syllabus: Languages and Grammars – Finite State Machines State machines and languages – Turing Machines – Computational Complexity.
CS 154 Formal Languages and Computability May 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
© M. Winter COSC/MATH 4P61 - Theory of Computation Pumping Lemma as a game 1.Player 1 picks the language L to be proven nonregular. 2.Player 2 picks.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
Lecture 23 Turing Machines Topics: Pumping Lemma for CFL Example Chomsky hierarchy What’s Computable ? Turing Machines November 24, 2008 CSCE 355 Foundations.
Computability. Turing Machines Read input letter & tape letter, write tape letter, move left or right.
CS6800 Advance Theory of Computation Spring 2016 Nasser Alsaedi
Linear Bounded Automata LBAs
Natural Language Processing - Formal Language -
Context Sensitive Languages and Linear Bounded Automata
OTHER MODELS OF TURING MACHINES
CSE 105 theory of computation
Turing Machines Acceptors; Enumerators
Course 2 Introduction to Formal Languages and Automata Theory (part 2)
CSE322 Chomsky classification
CSE322 The Chomsky Hierarchy
Jaya Krishna, M.Tech, Assistant Professor
CSE322 CONSTRUCTION OF FINITE AUTOMATA EQUIVALENT TO REGULAR EXPRESSION Lecture #9.
CSE 105 theory of computation
Sub: Theoretical Foundations of Computer Sciences
Theoretical Foundations of Computer Sciences
The Chomsky Hierarchy Costas Busch - LSU.
CSE 105 theory of computation
Presentation transcript:

© M. Winter COSC/MATH 4P61 - Theory of Computation CFL are closed under Substitution Union Concatenation Closure (*) Homomorphism Reversal Intersection with a Regular Language (L  R) Set-difference with a Regular Language (L\R) Inverse Homomorphism Closure Properties of CFL

© M. Winter COSC/MATH 4P61 - Theory of Computation Problem: Is the first string that a C program prints the string “ hello, world ”? I.e. is there are program that always tells correctly whether a program P with input I prints “ hello, world ” as its first string? This question is very easy to answer for the program: main() { printf(“hello, world\n”); } Unsolvable Problems (informal) I

© M. Winter COSC/MATH 4P61 - Theory of Computation This question is not easy to answer for the program: main() { int n, total, x, y, z; scanf(“%d”,&n); total = 3; while(1) { for (x=1; x<=total; x++) { for (y=1; y<=total-x-1; y++) { z = total-x-y; if (exp(x,n)+exp(y,n)==exp(z,n)) printf(“hello, world\n”); } total++; } Unsolvable Problems (informal) II

© M. Winter COSC/MATH 4P61 - Theory of Computation Unsolvable Problems (informal) III Hello-world tester H Step 1: Assume H exists I P yes no H1H1 Step 2: Modify H to H 1 I P yes hello, world H2H2 Step 3: Modify H 1 to H 2 P yes hello, world H2H2 What happens if H 2 gets H 2 as input? H2H2 yes hello, world

© M. Winter COSC/MATH 4P61 - Theory of Computation Turing Machine

© M. Winter COSC/MATH 4P61 - Theory of Computation Transition Diagram for TMs

© M. Winter COSC/MATH 4P61 - Theory of Computation The following extensions, restrictions to the basic TM and other computational models are possible. All of them are equivalent to the basic TM: Multitape TMs Nondeterministic TMs TM with Semi-Infinite Tapes Multistack Machines Counter Machines Alternative Concepts

© M. Winter COSC/MATH 4P61 - Theory of Computation A Linear Bounded Automaton (LBA) is a nondeterministic TM that satisfies the following three conditions: Its input alphabet includes two special symbols, serving as left and right end markers. Its transitions may not print other symbols over the end markers. Its transitions may neither move to the left of the left end marker nor to the right of the right end marker. Not every recursively enumerable language can be accepted by a LBA. Linear Bounded Automaton

© M. Winter COSC/MATH 4P61 - Theory of Computation Types of grammars G=(V,T,P,S) based on the form  of the production in P :  V,  = w or  = wA with w  T* and A  V regular grammar  V,  ( V  T )*CFG  ( V  T )*,  ( V  T )* with |  |≤|  |context-sensitive grammar  ( V  T )*,  ( V  T )*Semi-Thue System Grammars

© M. Winter COSC/MATH 4P61 - Theory of Computation Type-3: Regular Languages, Regular Expressions, DFAs, Regular Grammars Type-2:CFLs, CFGs, PDAs Type-1: Context-Sensitive Grammars/Languages, Linear Bounded Automatons Type-0:Recursively Enumerable Languages, Semi-Thue Systems, TMs Chomsky Hierarchy