1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

1 Lecture 32 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union,
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
1 Module 20 NFA’s with -transitions –NFA- ’s Formal definition Simplifies construction –LNFA- –Showing LNFA  is a subset of LNFA (extra credit) and therefore.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Lecture 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
1 Module 15 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
Lecture 9 Recursive and r.e. language classes
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 19 LNFA subset of LFSA –Theorem 4.1 on page 131 of Martin textbook –Compare with set closure proofs Main idea –A state in FSA represents a set.
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 Lecture 21 Regular languages review –Several ways to define regular languages –Two main types of proofs/algorithms Relative power of two computational.
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.
Why the algorithm works! Converting an NFA into an FSA.
1 Lecture 13 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA.
1 Lecture 20 Regular languages are a subset of LFSA –algorithm for converting any regular expression into an equivalent NFA –Builds on existing algorithms.
1 Lecture 26 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
1 Module 18 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.
Lecture 18 NFA’s with -transitions –NFA- ’s Formal definition Simplifies construction –LNFA- –Showing LNFA  is a subset of LNFA and therefore a subset.
1 Lecture 12 Computations –Formal Definition –Important Terms Computational Models –Formal Definition –Sequential access memory (tape) –Graphical representation.
1 Lecture 18 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Graphical representation –Formal.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
1 Lecture 15 Distinguishability –Definition –Help in designing/debugging FSA’s NFA’s –nondeterministic transition functions computations are trees, not.
1 Lecture 36 Attempt to prove that CFL’s are closed under intersection –Review previous constructions –Translate previous constructions to current setting.
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 16 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.
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 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Formal Definition –Equivalence.
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.
1 Lecture 20 LNFA subset of LFSA –Theorem 4.1 on page 105 of Martin textbook –Compare with set closure proofs Main idea –A state in FSA represents a set.
1 Module 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
Converting an NFA into an FSA Proving LNFA is a subset of LFSA.
1 Module 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
1 Module 10 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
Finite-State Machines with No Output
Lecture 2UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 2.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
Turing Machines. Intro to Turing Machines A Turing Machine (TM) has finite-state control (like PDA), and an infinite read-write tape. The tape serves.
1 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Natural Language Processing Lecture 4 : Regular Expressions and Automata.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
1 Module 12 Computation and Configurations –Formal Definition –Examples.
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
BİL711 Natural Language Processing1 Regular Expressions & FSAs Any regular expression can be realized as a finite state automaton (FSA) There are two kinds.
1 Introduction to Turing Machines
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
1 Module 12 Computation and Configurations –Formal Definition –Examples.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
Chapter 2 Finite Automata
Chapter 9 TURING MACHINES.
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Hierarchy of languages
CSE322 Finite Automata Lecture #2.
MA/CSSE 474 Theory of Computation
MA/CSSE 474 Theory of Computation
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Nondeterministic Finite State Automata (Dr. Torng)
Mealy and Moore Machines
Presentation transcript:

1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)

2 Quick Review What is the functional definition of a configuration? What is a computation?

3 Finite State Automata New Computational Model

4 Finite State Automata (FSA) 1 2 a,b 1 2 a;a;R b;b;R a;a;R b;b;R Written character is identical to read character Tape head moves right one cell Model can be simplified by removing these elements

5 Formal Definition FSA M=(Q, ,q 0,A,  ) –Q = set of states = {1,2} –  = character set = {a,b} –q 0 = initial state = 1 –A = set of accepting (final) states = {1} –  = state transition function Comments: –Read only –Tape head moves right 1 2 a,b

6 Exercise FSA M = (Q, , q 0, A,  ) –Q = {1, 2, 3} –  = {a, b} –q 0 = 1 –A = {2,3} –  : {  (1,a) = 1,  (1,b) = 2,  (2,a)= 2,  (2,b) = 3,  (3,a) = 3,  (3,b) = 1} Draw this FSA as a transition diagram

7 Transition Diagram a a a b b b

8 Computing with FSA’s

9 Computation Example (1, aabbaa) (1,abbaa) (1,bbaa) (2,baa) (3,aa) (3,a) (3  a a a b b b Input: aabbaa

10 Computation of FSA’s in detail A computation of an FSA M on an input x is a complete sequence of configurations We need to define –Initial configuration of the computation –How to determine the next configuration given the current configuration –Halting or final configurations of the computation

11 Given an FSA M and an input string x, what is the initial configuration of the computation of M on x? –(q 0,x) –Examples x = aabbaa (1, aabbaa) x = abab (1, abab) x = (1, ) Initial Configuration a a a b b b FSA M

12 (1, aabbaa) |- M (1, abbaa) –config 1 “yields” config 2 in one step using FSA M (1,aabbaa) |- M (2, baa) –config 1 “yields” config 2 in 3 steps using FSA M (1, aabbaa) |- M (2, baa) –config 1 “yields” config 2 in 0 or more steps using FSA M Comment: –|- M determined by transition function  –There must always be one and only one next configuration If not, M is not an FSA Definition of |- M a a a b b b 3 FSA M *

13 Halting configuration –(q, ) –Examples (1, ) (3, ) Accepting Configuration –State in halting configuration is in A Rejecting Configuration –State in halting configuration is not in A Halting Configurations a a a b b b FSA M

14 Two possibilities for M running on x –M accepts x M accepts x iff the computation of M on x ends up in an accepting configuration (q 0, x) |- M (q, ) where q is in A –M rejects x M rejects x iff the computation of M on x ends up in a rejecting configuration (q 0, x) |- M (q, ) where q is not in A –M does not loop or crash on x There is always one and only one next configuration. Tape head always moves right one cell until EOF FSA M on x b b b a a a FSA M * *

15 –For the following input strings, does M accept or reject? aa aabba aab babbb Examples b b b a a a FSA M

16 Notation from the book  (q, c) = p  k (q, x) = p  * (q, cx) = p –q, p in Q –k is any integer >= 1 –c in  –x in  * or  k Examples –  (1, a) = 1 –  (1, b) = 2 –  4 (1, abbb) = 1 –  * (1, abbb) = 1 –   (2, baaaaa) = 1 Definition of  * (q, x) a a a b b b FSA M

17 L(M) or Y(M) –The set of strings M accepts Basically the same as Y(P) from previous unit –We say that M accepts/decides/recognizes/solves L(M) Remember an FSA will not loop or crash –What is L(M) (or Y(M)) for the FSA M above? N(M) –Rarely used, but it is the set of strings M rejects LFSA –L is in LFSA iff there exists an FSA M such that L(M) = L. L(M) and LFSA b b b a a a FSA M

18 LFSA Unit Overview Study limits of LFSA –Understand what languages are in LFSA Develop techniques for showing L is in LFSA –Understand what languages are not in LFSA Develop techniques for showing L is not in LFSA Prove Closure Properties of LFSA Identify relationship of LFSA to other language classes

19 Comparing language classes Showing LFSA is a subset of REC, the set of solvable languages

20 LFSA subset REC Proof –Let L be an arbitrary language in LFSA –Let M be an FSA such that L(M) = L M exists by definition of L in LFSA –Construct C++ program P from FSA M –Argue P solves L –There exists a C++ program P which solves L –L is solvable

21 Visualization LFSA REC FSA’s C ++ Programs L L M P Let L be an arbitrary language in LFSA Let M be an FSA such that L(M) = L M exists by definition of L in LFSA Construct C++ program P from FSA M Argue P solves L There exists a program P which solves L L is solvable

22 Construction The construction is an algorithm which solves a problem with a program as input –Input to A: FSA M –Output of A: C ++ program P such that P solves L(M) –Informal description of algorithm Implement FSA M as C ++ program using switch statements, etc. Construction Algorithm FSA M Program P

23 Comparing computational models The previous slides show one method for comparing the relative power of two different computational models –Computational model CM 1 is at least as general or powerful as computational model CM 2 if Any program P 2 from computational model CM 2 can be converted into an equivalent program P 1 in computational model CM 1. –Question: How can we show two computational models are equivalent?