Automata with Output (sketch) We now have ways to formally define languages, and ways to automatically test whether a given string is a member of a language.

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

Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
YES-NO machines Finite State Automata as language recognizers.
Software Engineering, COMP 201 Slide 1 Automata and Formal Languages Moore and Mealy Automata Ralf Möller Hamburg Univ. of Technology based on slides by.
Finite Automata with Output
Albert Gatt Corpora and Statistical Methods Lecture 8.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
Application of HMMs: Speech recognition “Noisy channel” model of speech.
FSA and HMM LING 572 Fei Xia 1/5/06.
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.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
1 Intro to Finite Automata Chapter 2 introduces the concept of a Finite Automata (or FA). An FA has several properties: It is theoretical. It allows computer.
Topics Automata Theory Grammars and Languages Complexities
Finite Automata Costas Busch - RPI.
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
Rosen 5th ed., ch. 11 Ref: Wikipedia
Introduction Chapter 0. Three Central Areas 1.Automata 2.Computability 3.Complexity.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
CSC312 Automata Theory Lecture # 19 Chapter # 8 by Cohen Finite Automata with Output.
Lecture 1 Computation and Languages CS311 Fall 2012.
Moore machine and Mealy machine (P.274)
Regular Expressions Chapter 6 1. Regular Languages Regular Language Regular Expression Finite State Machine L Accepts 2.
CHAPTER 1 Regular Languages
Copyright © Curt Hill Finite State Machines The Simplest and Least Capable Automaton.
Copyright © Curt Hill Finite State Automata Again This Time No Output.
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
1 Recap lecture 21 Example of Moore machine, Mealy machine, Examples, complementing machine, Incrementing machine.
Complexity and Computability Theory I Lecture #11 Instructor: Rina Zviel-Girshin Lea Epstein.
Natural Language Processing Lecture 4 : Regular Expressions and Automata.
Lecture 8 Theory of AUTOMATA
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Finite Automata Chapter 1. Automatic Door Example Top View.
Computing Machinery Chapter 4: Finite State Machines.
Modeling Computation: Finite State Machines without Output
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Lecture # 15. Mealy machine A Mealy machine consists of the following 1. A finite set of states q 0, q 1, q 2, … where q 0 is the initial state. 2. An.
Formal Languages Finite Automata Dr.Hamed Alrjoub 1FA1.
Lecture 22: Finite State Machines with Output. Moore Machine - A Moore machine is a 6-tuple (Q, , , , q 0,  ) where, (1) Q is a finite set of states.
1 Section 11.2 Finite Automata Can a machine(i.e., algorithm) recognize a regular language? Yes! Deterministic Finite Automata A deterministic finite automaton.
Set, Alphabets, Strings, and Languages. The regular languages. Clouser properties of regular sets. Finite State Automata. Types of Finite State Automata.
Lecture 06: Theory of Automata:08 Finite Automata with Output.
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
1 Advanced Theory of Computation Finite Automata with output Pumping Lemma Theorem.
Finite Automata (FA) with Output FA discussed so far, is just associated with R.Es or language. Is there exist an FA which generates an output string corresponding.
Lecture # 16. Applications of Incrementing and Complementing machines 1’s complementing and incrementing machines which are basically Mealy machines are.
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
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.
Introduction to the Theory of Computation
CIS Automata and Formal Languages – Pei Wang
Jaya Krishna, M.Tech, Assistant Professor
Jaya Krishna, M.Tech, Assistant Professor
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Hierarchy of languages
CSE322 Mealy and Moore Machine
Introduction to Finite Automata
Chapter Five: Nondeterministic Finite Automata
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
Recap lecture 20 Recap Theorem, Example, Finite Automaton with output, Moore machine, Examples.
Finite Automaton with output
Mealy and Moore Machines
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:

Automata with Output (sketch) We now have ways to formally define languages, and ways to automatically test whether a given string is a member of a language. We also have a simple model of a computer. Can we extend this model, so that instead of simply replying "yes" or "no" when presented with input, our abstract machine writes some output from an alphabet, determined by the input string?

Moore Machines A Moore Machine is a 6-tuple (Q,I,T,E, ,O), where Q, I, T and E are as for DFSA's,  is an alphabet (the output alphabet), and O is a set of pairs (a function : Q   ) defining the output corresponding to each state of the machine. Notation: if (q, x)  O, then sketch state q by q/x Example: print out a 1 every time an aab substring is input. 0/ 1/ 2/ 3/  b b b b a a a a aaababaaab gives output of 11.

Mealy Machines A Mealy Machine is a 6-tuple (Q,I,T,E, ,O), where Q,I,T and E are as for DFSA's,  is an alphabet (the output alphabet), and O is a set of triples (a function Q  T   ) defining the output corresponding to each (state,symbol) pair of the machine. Notation: if (q,t,x)  O, then sketch it as an arc from q labelled t/x. Example: read in a binary number (reversed), and output the (reversed) number one larger. 0/1 0/0, 1/1 0/1 1/ input gives as output.

Moore-Mealy Equivalence Let M be a Moore machine or a Mealy machine, with output alphabet . Define M o (w) to be the output of M on w. Let M 1 = (Q 1,I 1,T 1,E 1,  1,O 1 ) be a Moore machine, and M 2 = (Q 2,I 2,T 2,E 2,  2,O 2 ) be a Mealy machine. Let M o ( ) = b. M 1 and M 2 are equivalent if T 1 = T 2 and for all strings w  T 1 *, M 1 0 (w) = b M 2 0 (w) Theorem: Moore-Mealy Equivalence If M 1 is a Moore machine, then there exists a Mealy machine, M 2, equivalent to M 1. If M 2 is a Mealy machine, then there exists a Moore machine, M 1, equivalent to M 2.

Varieties of FSAs FSAs with output have applications e.g. in the design of machines (e.g. a vending machine: reads pounds, pennies, etc; outputs a chocolate bar); coding and decoding of messages; etc. Many other variations on the theme of FSAs exist: Markov models (FSAs whose edges have probabilities) Hidden Markov models (with hidden states) These have many applications, e.g. in Natural Language Processing

Markov Models Markov Models model the probability of one state following another. (Assumption: only the previous state matters.) Example: a simple weather model:

In Natural Language Processing, Markov Models can model how a word is pronounced as phones (“speech sounds”) –State transition model, where each state is a phone Probability of a path through the model is the product of the probabilities of the transitions

Markov models for word pronunciation

Pronunciation Example Suppose this string of Phones has been recognized: [aa n iy dh ax] (Assume we know this for sure) Three different utterances (i.e., stings of words) may explain what was recognized: 1.I/[aa] need/[n iy] the/[dh ax] 2.I/[aa] the/[n iy] the/[dh ax] 3.On/[aa n] he/[iy] the/[dh ax]

Probabilities (based on the Markov Model) Probabilities of paths: –I/[aa] need/[n iy] the/[dh ax].2 *.12 *.92*.77 =.017 –I/[aa] the/[n iy] the/[dh ax].2 *.08 *.12 *.92*.77 =.001 –On/[aa n] he/[iy] the/[dh ax] 1 *.1 *.92*.77 =.071

Ranked Probabilities Ranked list of paths: On he the (.071) I need the (.017) I the the (.001) etc.. System would only keep top N

These probabilities can help a speech recognition system Other information is needed as well: –Probability of each phone –Probability of each word –Probability that one word follows another (Can “on he the” be part of an English sentence?) More about this later.