×
Listen to your teachers when they tell you WHAT to do. But more importantly, think about it later and ask yourself WHY they told you to do it.

# Note for FORMAL LANGUAGES AND AUTOMATA THEORY - FLAT By Manjula Poojary

• FORMAL LANGUAGES AND AUTOMATA THEORY - FLAT
• Note
• Computer Science Engineering
• 4 Topics
• 7170 Views
Manjula Poojary
0 User(s)

#### Text from page-3

or A Finite State Machine is a model of computation based on a hypothetical machine made of one or more states. Only one single state of this machine can be active at the same time. It means the machine has to transition from one state to another in to perform different actions. or A Finite State Machine is any device storing the state of something at a given time. The state will change based on inputs, providing the resulting output for the implemented changes. Finite State Machines come from a branch of Computer Science called “automata theory”. The family of data structure belonging to this domain also includes the Turing Machine. The important points here are the following:  We have a fixed set of states that the machine can be in  The machine can only be in one state at a time  A sequence of inputs is sent to the machine  Every state has a set of transitions and every transition is associated with an input and pointing to a state Representation of Finite state automata: Finite state machine can be represented in two ways. 1.state diagram 2.state transition table State diagram: FSM models the behaviour of a system by representing it in different states it can be in and the transition between each state. A state is simply a specific action. Example for action is waiting for button 1 is to be pressed, or rotating the dc motor to any direction etc. State diagram consists of a set of states (represented by circles) and transitions (represented by arrows connecting states). One state is designated as the initial state, via an arrow pointing to a state. And states can be designated as final states, via a doubled circle. State transition tables: A state transition table follows every state and input. Inputs are usually placed on the left, and separated from the outputs, which are on the right. How to design FSM: To design any FSM machine first we have to identify the set of states,state transition on each input and output. Example:Design a FSM for traffic Light  States: Red, Yellow, Green

#### Text from page-4

 Transitions: After a given time, Red will change to Green, Green to Yellow, and Yellow to Red The light is initially red then after certain time it becomes green or yellow based on some input signal. Considering the input signal t, the transition diagram for traffic signal will be as shown in fig: Here the transition is based on two input parameter 1 and 0. If t = 1 then it jumps to the next state or continue in the same state for t = 0. Transition table for above example is Input input input state 0 1 red red green green green yello w yellow yello red w that is on input 0 state of red does not change on input 1 on Red goes to Green 0 on Green goes to Green o input 1 on Green goes to Yellow 0 on Yellow goes to Yellow 1 on Yellow goes to Red Components or elements of Finite State Automata(FSM): 1.input tape 2.reading head 3.finite control. Fig shows the diagramitical representation Finite state automata:-