EECS 20 Chapter 3 Sections 3.3-3.41 State Machines Continued Last time we Introduced the deterministic finite state machine Discussed the concept of state.

Slides:



Advertisements
Similar presentations
Relations Functions Definition: Definition:
Advertisements

Automata Theory Part 1: Introduction & NFA November 2002.
Chapter 5 Pushdown Automata
Variants of Turing machines
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
LING/C SC/PSYC 438/538 Lecture 11 Sandiway Fong. Administrivia Homework 3 graded.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
Copyright © Cengage Learning. All rights reserved. CHAPTER 1 SPEAKING MATHEMATICALLY SPEAKING MATHEMATICALLY.
Chapter Section Section Summary Set of Strings Finite-State Automata Language Recognition by Finite-State Machines Designing Finite-State.
EECS 20 Chapter 3 Sections Defining Signals and Systems Last time we Found ways to define functions and systems Defined many example systems Today.
EECS 20 Lecture 14 (February 16, 2001) Tom Henzinger Nondeterminism.
EECS 20 Lecture 38 (April 27, 2001) Tom Henzinger Review.
Introduction to Computability Theory
ECE 331 – Digital System Design
EECS 20 Lecture 15 (February 21, 2001) Tom Henzinger Simulation.
61 Nondeterminism and Nodeterministic Automata. 62 The computational machine models that we learned in the class are deterministic in the sense that the.
EECS 20 Chapter 5 Part 11 Linear Infinite State Systems Last time we Looked at state machines with feedback Considered state machines with constant or.
Week 2/3 1.System interconnections (block diagrams) 2.Finite State Machines (Chapter 3)
EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger Determinization.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
EECS 20 Chapter 21 Defining Signals and Systems Last time we Introduced mathematical notation to help define sets Learned the names of commonly used sets.

11/10/2004EE 42 fall 2004 lecture 301 Lecture #30 Finite State Machines Last lecture: –CMOS fabrication –Clocked and latched circuits This lecture: –Finite.
Week 4 1.More examples 2.Nondeterminism, equivalence, simulation (Ch 3) 3.Composition (Ch 4)
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
EECS 20 Chapter 4 Sections Connecting State Machines Last time we Introduced the nondeterministic state machine Highlighted differences between.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
Copyright © Cengage Learning. All rights reserved.
Table of Contents The independent variable, x, denotes a member of the domain and the dependent variable, y, denotes a member of the range. We say, "y.
Function: Definition A function is a correspondence from a first set, called the domain, to a second set, called the range, such that each element in the.
Sets.
Finite-State Machines with No Output
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
Theory of Languages and Automata
Chapter 4.8: Determine if the Relation is a Function.
Relations and Functions
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Limits Involving Infinity Section 2.2. ∞ Infinity Doesn’t represent a real number Describes the behavior of a function when the values in its domain or.
Math 3121 Abstract Algebra I Lecture 9 Finish Section 10 Section 11.
Introduction to State Machine
Math Chapter 6 Part II. POWER SETS In mathematics, given a set S, the power set of S, written P(S) or 2 n(S), is the set of all subsets of S. Remember.
Chapter 5 – Relations and Functions. 5.1Cartesian Products and Relations Definition 5.1: For sets A, B  U, the Cartesian product, or cross product, of.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
Do Now Find the domain & range:. Answers to Homework
Bell Ringer 10/30/ Objectives The student will be able to: 1. identify the domain and range of a relation. 2. show relations as sets and mappings.
Section 7.1: Functions and Representations of Functions.
Modeling Computation: Finite State Machines without Output
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
December 3, 2009Theory of Computation Lecture 21: Turing Machines III 1 Simulation of T in L Now the MIDDLE section of Q can be generated by replacing.
August 2003 CIS102/LECTURE 9/FKS 1 Mathematics for Computing Lecture 9 LOGIC Chapter 3.
Review Functions. Function A function is a special type of relation in which each element of the domain is paired with exactly one element of the range.
Chapter 2: Linear Equations and Functions Section 2.1: Represent Relations and Functions.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Notes:Relations and Functions Section 1-6 Student Objective: The students will be able to identify relations and functions and evaluate functions. 1.Definitions:
Lecture #4 Thinking of designing an abstract machine acts as finite automata. Advanced Computation Theory.
Chapter 8.1 vocabulary Relation Is a pairing of numbers or a set of ordered pair {(2,1) (3,5) (6, 3)} Domain: first set of numbers Range: Second set of.
Modeling Arithmetic, Computation, and Languages
Relations and Functions
2-1 Relations and Functions
Bellringer Graph each ordered pair on the coordinate plane.
Functions Introduction.
Formalizing Relations & Functions
Copyright © Cengage Learning. All rights reserved.
2.1: Represent Relations and Functions HW: p.76 (4-20 even, all)
UNDERSTANDING FUNCTIONS
Relation (a set of ordered pairs)
2-1 Relations & Functions
Theory of Computation Lecture 23: Turing Machines III
Chapter 2 Functions, Equations, and Graphs
Presentation transcript:

EECS 20 Chapter 3 Sections State Machines Continued Last time we Introduced the deterministic finite state machine Discussed the concept of state Talked about the parts and behaviors of state machines Found ways to define state machines (tables and diagrams) Today we will Introduce the nondeterministic state machine Highlight differences between deterministic and nondeterministic machines Introduce ideas of equivalence between state machines: simulation and bisimulation

EECS 20 Chapter 3 Sections Facts About State Machines The state machines we consider in this class have (at least) one possible transition for each combination of current state and input. We will not encounter a situation where no transition is given for an input. Machines with this property are called receptive. For the state machines studied last lecture, there was exactly one possible transition for each combination of current state and input. These state machines are called deterministic. Sometimes it is useful to model a system using a state machine that may have more than one possible transition for each combination of current state and input. These state machines are called nondeterministic.

EECS 20 Chapter 3 Sections Nondeterministic State Machines Nondeterministic state machines are like the deterministic state machines studied in the last lecture, except there may be more than one possible transition for a given current state and input. ab 0/0 1/1 {0,1}/1 0/0 When in state s(n)=b, if x(n) = 0, the next state s(n+1) can be either a or b. The output y(n) can be either 0 or 1. In a nondeterministic state machine, there is more than one possible state response and output sequence.

EECS 20 Chapter 3 Sections Nodeterministic State Machines: Parts Nondeterministic state machines are described with the same type of 5-tuple used for deterministic machines: (States, Inputs, Outputs, possibleUpdates, initialState) The difference between the definitions is in the update function, now called possibleUpdates. For a given input x(n) and current state s(n), possibleUpdates provides the set of possible next states s(n+1) and outputs y(n). possibleUpdates: States × Inputs  P(States × Outputs) Here, the notation P() denotes the power set. For some set S, P(S) is the set of all subsets of S. Thus, the range of possibleUpdates is a set of ordered pairs.

EECS 20 Chapter 3 Sections Nondeterministic State Machines: Example Provide the 5-tuple definition for the following state machine: ab 0/0 1/1 {0,1}/1 0/0 States = {a, b} Inputs = {0, 1, absent} Outputs = {0, 1, absent} initialState = a (s(n+1), y(n)) = possibleUpdates(s(n), x(n)) x(n) = 0x(n) = 1 s(n) = a s(n) = b (a, 0)(b, 1) {(b, 1), (a, 0)}(b, 1)

EECS 20 Chapter 3 Sections Nondeterministic State Machines: Abstraction This example is a deterministic model of a parking meter. The inputs are coin5 (5 minutes) coin25 (25 minutes) and tick. The outputs are safe and expired. The states represent the number of minutes left until expiration. This model of meter operation is accurate, but complicated!

EECS 20 Chapter 3 Sections Here is a nondeterministic model of the parking meter. It contains less detail – it is an abstraction of the previous model. But, some outputs are possible in this model that are impossible in the previous model: x = coin5, tick, tick can result in y = safe, safe, expired The meter expires 2 minutes after inserting a 5 minute coin! Nondeterministic State Machines: Abstraction

EECS 20 Chapter 3 Sections State Machines: Behaviors A behavior of a state machine is a pair (x, y) where x is an input sequence and y is a corresponding output sequence. We define Behaviors = {(x, y) Î [Naturals 0  Inputs]×[Naturals 0  Outputs] | y is a possible output sequence for the input x} For a deterministic state machine, there is one output sequence y for each input sequence x. Behaviors is the graph of a function in this case; each element in the domain [Naturals 0  Inputs] is mapped to one element in [Naturals 0  Outputs]. For a nondeterministic state machine, there may be more than one output sequence in [Naturals 0  Outputs] corresponding to each input sequence in [Naturals 0  Inputs]. Behaviors is not the graph of a function in this case, as a function cannot map a domain element to more than one range element.

EECS 20 Chapter 3 Sections Equivalence of State Machines Two different state machines may be equivalent in the sense that, given the same input sequence, they produce the same output sequence. We identify two equivalence relations: simulation & bisimulation. Roughly speaking, we say that machine A simulates machine B if, for any input sequence, every output of machine B is also a possible output of machine A. We say that A bisimulates B if A simulates B and B simulates A.

EECS 20 Chapter 3 Sections Simulation Relations A simulation relation associates the sets of two machines. It is a set of ordered pairs which match a state from machine A with an “equivalent” state from machine B. Formally, we say that A simulates B if there exists a simulation relation S Ì States B × States A such that 1. (initialState B, initialState A ) Î S, and 2. " x(n) Î Inputs, " (s B (n), s A (n)) Î S, and " (s B (n+1), y B (n)) Î possibleUpdates(s B (n),x(n)), $ (s A (n+1), y A (n)) Î possibleUpdates(s A (n),x(n)) such that (s B (n+1), s A (n+1)) Î S and y A (n) = y B (n).

EECS 20 Chapter 3 Sections Simulation Relations In plain words, A simulates B when there exists a set of state pairings so that any input x(n) moves both machines from equivalent states (s B (n), s A (n)) to equivalent states (s B (n+1), s A (n+1)) generating the same output y A (n) = y B (n). If A simulates B, then A has all of the behaviors that B has, and maybe more. A simulates B Þ Behaviors B Ì Behaviors A If A simulates B, then any behavior which is impossible for A, is also impossible for B. Suppose A simulates B. Then (x,y) ¹ Behaviors A Þ (x,y) ¹ Behaviors B

EECS 20 Chapter 3 Sections Simulation Relations: Example Inputs = {1, absent}, Outputs = {0, 1, absent} Find a bisimilar state machine with two states, and give the bisimulation relation. a b c d 1/1 1/0 a new b new 1/1 1/0 S = {(a, a new ), (b, b new ), (c, a new ), (d, b new )}