§11.2 – Finite State Machines with Output

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

Example: Binary Adder We want to construct a finite state machine that will add two numbers. The input is two binary numbers, (xn…x1x0)2 and (yn…y1y0)2.
Modeling Computation Chapter 13.
Lecture 20 Finite State Machines CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Finite-State Machines with No Output Ying Lu
Summer 2011 Wednesday, 07/13. Formal Systems: The ELI System The ELI-system uses only three letters of the alphabet: E, L, I. It has a single axiom, EI,
§12.2 – Finite State Machines with Output. Giving credit where credit is due: Most slides based on lecture notes created byMost slides based on lecture.
January 5, 2015CS21 Lecture 11 CS21 Decidability and Tractability Lecture 1 January 5, 2015.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
CS21 Decidability and Tractability
Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Fall 2008.
Finite State Machines – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Graphs and Finite State Machines Reading: Kolman, Sections.
Rosen 5th ed., ch. 11 Ref: Wikipedia
Finite-State Machines with No Output Longin Jan Latecki Temple University Based on Slides by Elsa L Gunter, NJIT, and by Costas Busch Costas Busch.
Finite-State Machines with Output
CMPS 3223 Theory of Computation
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
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.
CSE 311 Foundations of Computing I Lecture 21 Finite State Machines Spring
Computabilty Computability Finite State Machine. Regular Languages. Homework: Finish Craps. Next Week: On your own: videos +
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Copyright © Curt Hill Finite State Machines The Simplest and Least Capable Automaton.
§12.2 – Finite State Machines with Output. Giving credit where credit is due: Most slides based on lecture notes created byMost slides based on lecture.
Lesson 5-2 Domain and Range.
Complexity and Computability Theory I Lecture #11 Instructor: Rina Zviel-Girshin Lea Epstein.
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
§12.2 – Finite State Machines with Output
1 Languages: Finite State Machines Chapter 6 problemsstrings (languages) machines answers.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
Universal Turing Machine
Lecture # 16. Applications of Incrementing and Complementing machines 1’s complementing and incrementing machines which are basically Mealy machines are.
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.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
1.3 Finite State Machines.
Finite State Machines Dr K R Bond 2009
CSc 453 Lexical Analysis (Scanning)
Lecture2 Regular Language
Discrete Mathematics and its Applications
CSE 105 theory of computation
Turing Machines Chapter 17.
CSE 311 Foundations of Computing I
Finite Automata a b A simplest computational model
G. Pullaiah College of Engineering and Technology
Discrete Mathematics and its Applications
Pushdown Automata Reading: Chapter 6.
Chapter 9 TURING MACHINES.
Finite State Machines.
Some slides by Elsa L Gunter, NJIT, and by Costas Busch
CSE 311 Foundations of Computing I
Discrete Mathematics and its Applications
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
Finite Automata.
Discrete Mathematics and its Applications
Copyright © Cengage Learning. All rights reserved.
CSE 311: Foundations of Computing
Discrete Mathematics and its Applications
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
§11.2 – Finite State Machines with Output
Lecture One: Automata Theory Amjad Ali
CSE 105 theory of computation
Mealy and Moore Machines
Formal Languages and Automata Theory BODDEDA HARITHA LAKSHMI,
Automata theory and formal languages COS 3112 – AUTOMATA THEORY PRELIM PERIOD WEEK 1 AND 2.
Discrete Mathematics and its Applications
Presentation transcript:

§11.2 – Finite State Machines with Output by Dr. Michael P. Frank, University of Florida Modified by Longin Jan Latecki, Temple University

Remember the general picture of a computer as being a transition function T:S×I→S×O? If the state set S is finite (not infinite), we call this system a finite state machine. If the domain S×I is reasonably small, then we can specify T explicitly by writing out its complete graph. However, this is practical only for machines that have a very small information capacity.

Size of FSMs The information capacity of an FSM is C = log |S|. Thus, if we represent a machine having an information capacity of C bits as an FSM, then its state transition graph will have |S| = 2C nodes. E.g. suppose your desktop computer has a 512MB memory, and 60GB hard drive. Its information capacity, including the hard drive and memory (and ignoring the CPU’s internal state), is then roughly ~512×223 + 60×233 = 519,691,042,816 b. How many states would be needed to write out the machine’s entire transition function graph? 2519,691,042,816 = A number having >1.7 trillion decimal digits!

One Problem with FSMs as Models The FSM diagram of a reasonably-sized computer is more than astronomically huge. Yet, we are able to design and build these computers using only a modest amount of industrial resources. Why is this possible? Answer: A real computer has regularities in its transition function that are not captured if we just write out its FSM transition function explicitly. I.e., a transition function can have a small, simple, regular description, even if its domain is enormous.

Other Problems with FSM Model It ignores many important physical realities: How is the transition function’s structure to be encoded in physical hardware? How much hardware complexity is required to do this? How close in physical space is one bit’s worth of the machine’s information capacity to another? How long does it take to communicate information from one part of the machine to another? How much energy gets dissipated to heat when the machine updates its state? How fast can the heat be removed, and how much does this impact the machine’s performance?

Vending Machine Example Suppose a certain vending machine accepts nickels, dimes, and quarters. If >30¢ is deposited, change is immediately returned. If the “coke” button is pressed, the machine drops a coke. It can then accept a new payment. Ignore any other buttons, bills, out of change, etc.

Modeling the Machine Input symbol set: I = {nickel, dime, quarter, button} We could add “nothing” or  as an additional input symbol if we want. Representing “no input at a given time.” Output symbol set: O = {, 5¢, 10¢, 15¢, 20¢, 25¢, coke}. State set: S = {0, 5, 10, 15, 20, 25, 30}. Representing how much money has been taken.

Transition Function Table Old state Input New state Output n 5  d 10 q 25 b 15 30 Old state Input New state Output 10 n 15  d 20 q 30 5¢ b 25 10¢ 5

Transition Function Table cont. Old state Input New state Output 20 n 25  d 30 q 15¢ b 5¢ 20¢ Old state Input New state Output 30 n 5¢ d 10¢ q 25¢ b coke

Another Format: State Table Each pair shows new state, output symbol Old state Input Symbol n d q b 5, 10, 25, 0, 5 15, 30, 10 20, 30,5¢ 15 30,10¢ 20 30,15¢ 25 30,20¢ 30 30,25¢ 0,coke

Directed-Graph State Diagram As you can see, these can get kind of busy. q,5¢ d,5¢ q q q,20¢ d d d n n n n n n 5 10 15 20 25 30 n,5¢ b b b b b b d,10¢ q,15¢ q,25¢ b,coke q,10¢

Formalizing FSMs Just like the general transition-function definition from earlier, but with the output function separated from the transition function, and with the various sets added in, along with an initial state. A finite-state machine M=(S, I, O, f, g, s0) S is the state set. I is the alphabet (vocabulary) of input symbols O is the alphabet (vocabulary) of output symbols f is the state transition function g is the output function s0 is the initial state. Our transition function from before is T = (f,g).

Construct a state table for the finite-state machine in Fig. 3. Find the output string for the input 101011

A unit-delay machine: Construct a finite-state machine that delays an input string by one unit of time: Input: x1x2 … xk-1xk Output: 0x1x2 … xk-1 Language recognizer: Construct a finite-state machine that outputs 1 iff the input string read so far ends with 111.