Workman Notes - COT 4210 Finite State Automata D.A Workman...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
COT 4210 Finite State Automata © D.A. Workman 10/27/2009 Page 1 F inite State Automata Our next series of definitions and results characterize the family of Regular Languages . Specifically, this family is exactly the set of languages that can be recognized or accepted by Deterministic Finite Automata (DFAs) and Non-deterministic Finite Automata (NFAs). DFAs and NFAs are examples of a more general class of formal language specifications called recognizers. A model of a typical Recognizer is illustrated in the figure below. A Recognizer takes as its only input some string x over its input alphabet, . If x L(R), the language recognized by R, then R must eventually halt and output accept . If x L(R), then R will have one of two behaviors, (a) it will halt and output reject , or (b) it will never halt. For example, message decoding devices (e.g. communication protocols) and programming language compilers are examples of recognizers. In the former case, messages are symbol strings over some natural language alphabet, while inputs to compilers are strings (programs) over the alphabet of some programming language. Example 9 . To illustrate the recognizer concept, consider an algorithm for searching a text file for an occurrence of the string “end”. The algorithm will "accept" the text file if it contains at least one occurrence of this word and will "reject" or "fail" otherwise. We model the algorithm with a state transition diagram (STD), where "states" (numbered circles) denote distinct configurations of the algorithm's "memory"(local variables) that define intermediate stages of "success" in making a final determination about the correctness or incorrectness of the input file. Transitions between states occur with the next character read from the input file. In the STD below, State 1 . Defines the initial starting point of computation, and denotes a state of processing that implies no occurrence of the target word has been encountered, and last character read was not the first letter "e" of the target word. States 2 and 3 . Define intermediate states of processing where some proper prefix of the target word has just been encountered. State 4. Denotes the accept state. That is, this state can only be reached if a complete occurrence of the target word has just been encountered. The algorithm could terminate with success at this point. 2 start 3 l 4 e all other e e n d all other all other all symbols Recognizer (R) for L, a subset of * x in * “accept” (x is in L) “reject” (x not in L)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COT 4210 Finite State Automata © D.A. Workman 10/27/2009 Page 2 Our next definition formalizes the concept of finite state recognizer illustrated in the previous example. Definition 9 . A Deterministic Finite Automata (DFA) is a 5-tuple, M = (Q, , , q 0 , A) where: Q = a finite non-empty set of states , = the input alphabet , q 0 Q, is the initial state , A Q, is the (possibly empty) set of accepting states , and : Q Q, a the transition function (a total function). If q’ = (q, a), then “q” denotes the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2011 for the course COT 4210 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 87

Workman Notes - COT 4210 Finite State Automata D.A Workman...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online