Sie sind auf Seite 1von 2

Kural,1 Mge Kural David ORegan Comm 106 Section 11

DEFINITION PAPER Finite State Machines Finite State Machine (FSM) is a diagram used in most of engineering disciplines, especially in computer engineering, to predetermine the execution map of the implemented program . That is, it is not a machine as its name suggests, this technical drawing may help us to visualize the running program's procedure. Even though designing them is very simple, they consitute the basis of the model of computation in computer science. FSMs are comprised by circles representing some particular states and arrows representing conditions between these states (circles). The states depend on the purpose and use of the program and the initial state is always displayed by special arrow as Start. The arrows show the fulfilled conditions and according to them they transfer the FSM from one state to another one. FSMs can be categorized as FSM with output and FSM with no output. FSMs with output, generate output from input and state pairs. So what is an output and input ? Since they can be very different things and change based on the system in use, you can only get this idea as a common well-known example. Imagine you want to get a coffee from a vending machine that you use everyday and coffee costs 1 $. Also this vending machines FSM - that is, models this vending machine- has states depend on the amount of money that the machine has collected. Here its initial state is 0 $ in machine. Then you threw 1$ to the machine. This 1$ is your input for the FSM. So you fulfilled the 1$ condition and you changed the FSMs state from initial state (0 $ in machine) to second state (1$ in machine). Then coffee that machine gives you, is this FSMs output arised from your

Kural,2

input (1$) and the state (1$ in machine). Now, in a nutshell you gave your input to FSM, you changed the state and it returned you an output. From now on, enjoy your output! Namely your coffee! As we see, vending machines are daily instance of FSMs with output. On the other hand, FSMs with no output (also called Finite State Automata) are used to recognize languages by the programs. Because of this , they are more common in computer programming than the FSMs with output. In these machines, as you can guess there is no output generated from input and state pairs. In other words, nothing returns to you. Instead the outputs, this kind of FSM has final states which are represented by intertwined circles. You can think these final states as the end of the way. That is, after you gave some inputs to the machine and fulfilled some conditions, it reaches the end and it stops. By this way, the program recognizes specific input strings. For example, you have a locked door by a password and your password is 91925. What are the ordered inputs you should enter here? After you entered 9,1,9,2 inputs in sequence, you will fulfil first four conditions. That is, you will change the FSMs state for four times, and after this step if you enter 5, you will reach the final state and your machine will recognize this password. So come in, it is unlocked! In conclusion, FSMs can be pretended as an outline for programs and they form the basis of computation and logic. They have also much more improvements than mentioned in this paper. However, the main idea and purpose of these diagrams is mapping and computing the possibilities using some definite finite states shown as bubbles and edges (arrows) between them. For simplicity to understand what FSM is, stand at an initial state, make your choice, follow the arrow, and see what happens if you perform these steps!

Das könnte Ihnen auch gefallen