Download presentation
Presentation is loading. Please wait.
Published bySabina Cain Modified over 8 years ago
1
Computer Science 516 A Little On Finite State Machines
2
Finite State Machines Commonly used in upper division Computer Science classes You will see them again Used in Electronic Engineering Digital Circuit Design Used in parsing for compiler writing classes Used in Huffman encoding
3
What is it? Basically, it’s a diagram or picture which relates the various states a process (machine) can go through as part of its execution Circles (nodes) A final node may have concentric circles Arcs (transitions)
4
Sample Problem: Separate a string into its individual words Step 1: Define terms: Word - 1-n characters in {A-Z, a=z} white space - 1-n characters from {space, comma, period, dash, slash, et cetera} Sentence - 1-n words and 0-n white space sequences terminated by {period, ?, !}
5
FSM Sample Step 2: Define states: Start Consuming white space Consuming a word End of sentence Stop
6
Step 3: Draw a diagram
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.