Finite State Automata: A Brief Introduction CSE 260 / CMPSC 360 Doug Hogan Penn State University.

Slides:



Advertisements
Similar presentations
Modeling Computation Chapter 13.
Advertisements

Lecture 20 Finite State Machines CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
CSE 311 Foundations of Computing I
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
CSE 311: Foundations of Computing Fall 2013 Lecture 23: Finite state machines and minimization.
Chapter Two: Finite Automata
Chapter Section Section Summary Set of Strings Finite-State Automata Language Recognition by Finite-State Machines Designing Finite-State.
January 5, 2015CS21 Lecture 11 CS21 Decidability and Tractability Lecture 1 January 5, 2015.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
Fall 2005Costas Busch - RPI1 CSCI-2400 Models of Computation.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
COMS 3261, Lecture 2 Strings, Languages, Automata September 6, 2001.
Costas Busch - RPI1 CSCI-2400 Models of Computation.
Finite Automata Chapter 5. Formal Language Definitions Why need formal definitions of language –Define a precise, unambiguous and uniform interpretation.
CSC 361Finite Automata1. CSC 361Finite Automata2 Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers.
1.Defs. a)Finite Automaton: A Finite Automaton ( FA ) has finite set of ‘states’ ( Q={q 0, q 1, q 2, ….. ) and its ‘control’ moves from state to state.
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Copyright © Cengage Learning. All rights reserved.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Rosen 5th ed., ch. 11 Ref: Wikipedia
Finite-State Machines with Output
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
An ordered n-tuple is a set of n objects with an order associated with them. If n objects are represented by x 1, x 2,..., x n, then we write the ordered.
Theory of Computation - Lecture 3 Regular Languages What is a computer? Complicated, we need idealized computer for managing mathematical theories... Hence:
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
Models of Computation. Computation: Computation is a general term for any type of information processing information processing CPU memory.
Fundamentals of Informatics
Fundamentals of Informatics Lecture 3 Turing Machines Bas Luttik.
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
Modeling Computation: Finite State Machines without Output
Theory of Computation Automata Theory Dr. Ayman Srour.
  An alphabet is any finite set of symbols.  Examples: ASCII, Unicode, {0,1} ( binary alphabet ), {a,b,c}. Alphabets.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Theory of Computation Automata Theory Dr. Ayman Srour.
Finite-State Machines (FSM) Chuck Cusack Based partly on Chapter 11 of “Discrete Mathematics and its Applications,” 5 th edition, by Kenneth Rosen.
Finite Automata.
CSE202: Introduction to Formal Languages and Automata Theory
Lecture2 Regular Language
Non Deterministic Automata
Copyright © Cengage Learning. All rights reserved.
CSE 311 Foundations of Computing I
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
What Are They? Who Needs ‘em? An Example: Scoring in Tennis
CSE322 Finite Automata Lecture #2.
CSE 311 Foundations of Computing I
THEORY OF COMPUTATION Lecture One: Automata Theory Automata Theory.
CSCI-2400 Models of Computation Costas Busch - RPI.
Non-Deterministic Finite Automata
Chapter Two: Finite Automata
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Non Deterministic Automata
What Are They? Who Needs ‘em? An Example: Scoring in Tennis
Finite Automata.
4b Lexical analysis Finite Automata
4b Lexical analysis Finite Automata
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Chapter 1 Regular Language
Finite Automata with Output
AUTOMATA THEORY.
Lecture 5 Scanning.
Teori Bahasa dan Automata Lecture 6: Regular Expression
Non Deterministic Automata
What is it? The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled.
Presentation transcript:

Finite State Automata: A Brief Introduction CSE 260 / CMPSC 360 Doug Hogan Penn State University

2 What is a finite state automaton? A model of computation A set of states and how to get from some state to other states

3 Why do we care? An ideal representation of a computer  Why? A state describes the computer at any given point  Programs, memory, etc. Many states, but still a finite number Represents legal steps of a process  Some computation  Valid inputs  Valid words in a language Compilers

4 Vending Machine Example Accepts only nickels and dimes Everything costs 20 cents Consider the state of the vending machine  We’ll model the state by how much money has been deposited.  What is the initial state of the vending machine?

5 Vending Machine Initial State Start with 0¢ deposited.  Called the initial state of the machine.  A circle is drawn for the state  An arrow pointing to this state marks it as the initial state. 0¢ deposited

6 Where to from here? Make transitions to different states… What can we do?  Deposit a nickel  Deposit a dime

7 Depositing a nickel… Takes us to a new state: 5¢ deposited Add an arrow for the transition  Label it with the input we gave to the machine 0¢ deposited 5¢ deposited nickel

8 Depositing a dime… Similarly… 0¢ deposited 5¢ deposited nickel 10¢ deposited dime

9 From here… There are many possibilities as to what could happen We’re going to consider what happens when we deposit another dime.  Goes to a new state: 20¢ deposited. That means we’ve put in enough money to buy something. The vending machine “accepts” 20¢ as a place to stop.  called an accepting state

10 Another dime… Add new state with double circle to denote that it’s an accepting state. 0¢ deposited 5¢ deposited nickel 10¢ deposited dime 20¢ deposited

11 Complete Vending Machine

12 Another Representation: Next-State Table

13 Another example Initial state? Accepting state?

14 Another example What happens if we input 01?  String is “accepted” by this automaton What about 011?  Go back to non-accepting state. String is rejected.

15 Closing words We could do a lot more with automata; we’re only concerned with the basics here. Look to Chapter 12 of the current edition of Epp if you’re interested in learning more. Automata can become very complicated. Chapter 12 discusses more how to convert one automaton to an equivalent, simpler one. There’s much more on this topic in CMPSC 464.

16 Works Cited Epp, Susanna S. Discrete Mathematics with Applications. 2nd Ed. Belmont, CA: Brooks, 1995.