1 Lecture 5 Topics –Closure Properties for REC Proofs –2 examples Applications.

Slides:



Advertisements
Similar presentations
1 Lecture 32 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union,
Advertisements

More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Summary Showing regular Showing non-regular construct DFA, NFA
Chapter 5 The Witness Reduction Technique: Feasible Closure Properties of #P Greg Goldstein Andrew Learn 18 April 2001.
Automata and Formal Languages Tim Sheard 1 Lecture 9 Reasoning with DFAs.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
1 Lecture 4 Topics –Problem solving Subroutine Theme –REC language class The class of solvable problems Closure properties.
Lecture 9 Recursive and r.e. language classes
1 Module 8 Closure Properties –Definition –Language class definition set of languages –Closure properties and first-order logic statements For all, there.
1 Lecture 14 Language class LFSA –Study limits of what can be done with FSA’s –Closure Properties –Comparing to other language classes.
1 Module 9 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
Lecture 8 Recursively enumerable (r.e.) languages
1 Module 21 Closure Properties for LFSA using NFA’s –From now on, when I say NFA, I mean any NFA including an NFA- unless I add a specific restriction.
1 Lecture 26 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
1 Lecture 10 Proving more specific problems are not recursive Reduction technique –Use subroutine theme to show that if one problem is unsolvable, so is.
CS 310 – Fall 2006 Pacific University CS310 Strings, String Operators, and Languages Sections: August 30, 2006.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions.
1 Lecture 18 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
Fall 2006Costas Busch - RPI1 Properties of Regular Languages.
Homework #9 Solutions.
1 Lecture 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
1 Lecture 7 Topics –Problems about program behavior At least problem input is a program/algorithm –Halting Problem Fundamental problem about program behavior.
1 Module 31 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union, concatenation.
1 Lecture 23 Decision problems about regular languages –Programs can be inputs to other programs FSA’s, NFA’s, regular expressions –Basic problems are.
1 Module 25 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
1 Lecture 19 Closure Properties for LFSA using NFA’s –union second proof –concatenation –Kleene closure.
Fall 2006Costas Busch - RPI1 Languages. Fall 2006Costas Busch - RPI2 Language: a set of strings String: a sequence of symbols from some alphabet Example:
1 Lecture 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
1 Module 10 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Introduction to CS Theory Lecture 1 – Introduction Piotr Faliszewski
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
1 Strings and Languages. 2 Review Sets and sequences Functions and relations Graphs Boolean logic:      Proof techniques: – Construction, Contradiction,
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 Let L= { w= u v : u  {a, b}*, v  {c, d}* and |u|= |v|} 1.Design a context-free grammar that generates L. 2.Use your grammar and the construction from.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
1 Problem of the Day: Factor (ab) k as xyz in all ways such that y ≠ ε.
1 Module 31 Closure Properties for CFL’s –Kleene Closure –Union –Concatenation CFL’s versus regular languages –regular languages subset of CFL.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
CS 203: Introduction to Formal Languages and Automata
Chapter 8 Properties of Context-free Languages These class notes are based on material from our textbook, An Introduction to Formal Languages and Automata,
Lecture 17 Undecidability Topics:  TM variations  Undecidability June 25, 2015 CSCE 355 Foundations of Computation.
Strings and Languages Denning, Section 2.7. Alphabet An alphabet V is a finite nonempty set of symbols. Each symbol is a non- divisible or atomic object.
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
Decidability Decidable/Undecidable problems. Jaruloj Chongstitvatana Decidability2 Accepting: Definition Let T = (Q, , , , s) be a TM. T accepts.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed.
Dept. of Computer Science & IT, FUUAST Automata Theory 2 Automata Theory III Properties of Regular Languages 1.Closure 2.Union 3.Concatenation 4.Complement(Negation)
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
Properties of Context-Free Languages
CSE 105 theory of computation
Languages Prof. Busch - LSU.
Languages Costas Busch - LSU.
Properties of Regular Languages
PDAs Accept Context-Free Languages
CSE322 PROPERTIES OF REGULAR LANGUAGES
Deterministic PDAs - DPDAs
Closure Properties of Regular Languages
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
Closure Properties of Regular Languages
Instructor: Aaron Roth
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
CSE 105 theory of computation
Languages Fall 2018.
Presentation transcript:

1 Lecture 5 Topics –Closure Properties for REC Proofs –2 examples Applications

2 Closure Properties of REC We now prove REC is closed under two set operations –Set Complement –Set Intersection We then show how to apply closure properties to prove a target language is or is not recursive

3 Quick Questions What does the following statement mean? –REC is closed under set complement How do you prove a language L is in REC?

4 Why study closure properties? 1: It tests how well we really understand the concepts we encounter –language classes, REC, decidability, subroutine 2: It highlights the subroutine concept and how we can build on previous algorithms to construct new algorithms –we don’t have to build our algorithms from scratch every time

5 Set Complement Example Even: the set of even length strings over {0,1} Complement of Even? –Odd: the set of odd length strings over {0,1} Is Odd recursive? How is the program P’ which decides Odd related to the program P which decides Even?

6 Set Complement Lemma If L is a recursive language, then L complement is a recursive language –Rewrite this in first-order logic Proof –Let L be an arbitrary recursive language First line comes from For all L in REC –Let P be the C ++ program which decides L P exists by definition of REC

7 –Modify P to form P’ as follows Identical except at very end Complement answer –Yes -> No –No -> Yes –Program P’ decides L complement Halts on all inputs Answers correctly –Thus L complement is recursive Definition of recursive proof continued

8 P’ Illustration P Input x YES No P’ YES No

9 Set Intersection Example Even: the set of even length strings over {0,1} Mod-5: the set of strings of length a multiple of 5 over {0,1} What is Even intersection Mod-5? –Mod-10: the set of strings of length a multiple of 10 over {0,1} How is the program P 3 (Mod-10) related to programs P 1 (Even) and P 2 (Mod-5)

10 Set Intersection Lemma If L 1 and L 2 are recursive languages, then L 1 intersection L 2 is a recursive language –Rewrite this in first-order logic –Note we have two languages because intersection is a binary operation Proof –Let L 1 and L 2 be arbitrary recursive languages –Let P 1 and P 2 be programs which decide L 1 and L 2, respectively

11 –Construct program P 3 from P 1 and P 2 as follows P 3 runs both P 1 and P 2 on the input string If both say yes, P 3 says yes Otherwise, P 3 says no –P 3 decides L 1 intersection L 2 Halts on all inputs Answers correctly –L 1 intersection L 2 is a recursive language proof continued

12 P 3 Illustration P1P1 P2P2 Yes/No AND Yes/No P3P3

13 Other Closure Properties Unary Operations –Language Reversal –Kleene Star Binary Operations –Set Union –Set Difference –Symmetric Difference –Concatenation

14 Closure Property Applications How can we use closure properties to prove a language L T is recursive? Unary operator op (e.g. complement) –1) Find a known recursive language L –2) Show L T = L op Binary operator op (e.g. intersection) –1) Find 2 known recursive languages L 1 and L 2 –2) Show L T = L 1 op L 2

15 Closure Property Applications How can we use closure properties to prove a language L T is not recursive? Unary operator op (e.g. complement) –1) Find a known non-recursive language L –2) Show L T op = L Binary operator op (e.g. intersection) –1) Find a known recursive language L 1 –2) Find a known non-recursive language L 2 –2) Show L 2 = L 1 op L T

16 Summary Closure Properties –proof methods –Applications Proving new languages are recursive Proving new languages are NOT recursive –Need a specific non-recursive language