1 / 6

Understanding Finite-State Machines with Outputs: A Vending Machine Example

Explore finite-state machines (FSMs) with outputs through a practical example of a vending machine. This machine accepts nickels, dimes, and quarters, and provides orange and apple juice based on user input after receiving 30¢ or more. Learn about the components of an FSM, including states, input and output alphabets, initial states, and functions. We present examples of FSMs with outputs, demonstrating concepts like unit-delay machines and binary integer addition, enhancing your grasp of FSM functionality and application.

torgny
Download Presentation

Understanding Finite-State Machines with Outputs: A Vending Machine Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Finite-State Machines with Output

  2. Example of a FSM with Output • A vending machine accepts nickels (5¢), dimes (10¢), and quarters (25¢). When 30¢ or more has been deposited, the machine returns the amount over 30¢. The customer can then press an O-button to receive orange juice or an R-button to receive apple juice

  3. Example of a FSM with Output • The same FSM can be represented using a table

  4. FSMs with Outputs • A finite-state machine M = (S, I, O, f, g, s0) consists of: • a finite set S of states • a finite input alphabet I • a finite output alphabet O • an initial state s0 • a transition function f • an output function g • Example 1: • S = {s0, s1, s2, s3} • I = {0, 1} • O = {0, 1} • Initial: s0 • f, g: state table/diagram

  5. FSMs with Outputs • Example2: unit-delay machine • given the bit string x1x2…xk it produces 0x1x2…xk-1

  6. FSMs with Outputs • Example3: adding machine for binary integers • given (xn…x1x0)2 and (yn…y1y0)2 it produces their sum

More Related