Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science 516 A Little On Finite State Machines.

Similar presentations


Presentation on theme: "Computer Science 516 A Little On Finite State Machines."— Presentation transcript:

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


Download ppt "Computer Science 516 A Little On Finite State Machines."

Similar presentations


Ads by Google