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)

Slides:



Advertisements
Similar presentations
Introduction to Computability Theory
Advertisements

4b Lexical analysis Finite Automata
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Lecture 6 Nondeterministic Finite Automata (NFA)
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.
February 6, 2015CS21 Lecture 141 CS21 Decidability and Tractability Lecture 14 February 6, 2015.
Turing Machines New capabilities: –infinite tape –can read OR write to tape –read/write head can move left and right q0q0 input tape.
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)
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 16 Distinguishability –Definition –Help in designing/debugging FSA’s.
1 Lecture 13 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Lecture 26 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
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 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 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.
1 Lecture 15 Distinguishability –Definition –Help in designing/debugging FSA’s NFA’s –nondeterministic transition functions computations are trees, not.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
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 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 Module 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
1 Module 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
CSC 361Finite Automata1. CSC 361Finite Automata2 Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
Lecture 2UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 2.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Lecture Pushdown Automata. stack stack head finite control tape head tape.
MA/CSSE 474 Theory of Computation Decision Problems DFSMs.
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
Natural Language Processing Lecture 4 : Regular Expressions and Automata.
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
1 Turing machines Chapter 4, Smith and Kimber. A Turing machine is an abstraction of a human “computer”. Consists of - control, in the form of states -
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,
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Module 12 Computation and Configurations –Formal Definition –Examples.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of Computation Automata Theory Dr. Ayman Srour.
MA/CSSE 474 Theory of Computation Decision Problems, Continued DFSMs.
Theory of Computation Pushdown Automata pda Lecture #10.
Busch Complexity Lectures: Turing Machines
Turing Machines Chapter 17.
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
CSE 105 theory of computation
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
COSC 3340: Introduction to Theory of Computation
CSE322 Finite Automata Lecture #2.
Chapter 3: The CHURCH-Turing thesis
CSE322 Definition and description of finite Automata
MA/CSSE 474 Theory of Computation
4b Lexical analysis Finite Automata
MA/CSSE 474 Theory of Computation
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Nondeterministic Finite State Automata (Dr. Torng)
Presentation transcript:

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)

2 Finite State Automata New Computational Model

3 Tape We assume that you have already seen FSA’s in CSE 260 –If not, review material in reference textbook Only data structure is a tape –Input appears on tape followed by a B character marking the end of the input –Tape is scanned by a tape head that starts at leftmost cell and always scans to the right

4 Data type/States The only data type for an FSA is char The instructions in an FSA are referred to as states Each instruction can be thought of as a switch statement with several cases based on the char being scanned by the tape head

5 Example program 1 switch(current tape cell) { case a: goto 2 case b: goto 2 case B: return yes } 2 switch (current tape cell) { case a: goto 1 case b: goto 1 case B: return no; }

6 New model of computation FSA M=(Q, ,q 0,A,  ) –Q = set of states = {1,2} –  = character set = {a,b} don’t need B as we see below –q 0 = initial state = 1 –A = set of accepting (final) states = {1} A is the set of states where we return yes on B Q-A is set of states that return no on B –  = state transition function 1 switch(current tape cell) { case a: goto 2 case b: goto 2 case B: return yes } 2 switch (current tape cell) { case a: goto 1 case b: goto 1 case B: return no; }

7 Textual representations of  * 1 switch(current tape cell) { case a: goto 2 case b: goto 2 case B: return yes } 2 switch (current tape cell) { case a: goto 1 case b: goto 1 case B: return no; } 1 2 ab  (1,a) = 2,  (1,b)=2,  (2,a)=1,  (2,b) = 1 {(1,a,2), (1,b,2), (2,a,1), (2,b,1)}

8 Transition diagrams 1 2 a,b 1 switch(current tape cell) { case a: goto 2 case b: goto 2 case B: return yes } 2 switch (current tape cell) { case a: goto 1 case b: goto 1 case B: return no; } Note, this transition diagram represents all 5 components of an FSA, not just the transition function 

9 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

10 Transition Diagram a a a b b b

11 Computing with FSA’s

12 Computation Example * a a a b b b Input: aabbaa

13 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

14 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

15 (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 *

16 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

17 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 Why? FSA M on x b b b a a a FSA M * *

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

19 Notation from the book  (q, c) = p  k (q, x) = p –k is the length of x  * (q, x) = p Examples –  (1, a) = 1 –  (1, b) = 2 –  4 (1, abbb) = 1 –  * (1, abbb) = 1 –   (2, baaaaa) = 3 Definition of  * (q, x) a a a b b b FSA M