×
DON'T LET YOURSELF DOWN

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

• FORMAL LANGUAGES AND AUTOMATA THEORY - FLAT
• Note
• Computer Science Engineering
• 4 Topics
• 7045 Views
Page-2

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

Topic: / 116

0 User(s)

Text from page-2

UNIT – I: Finite Automata Why Study Automata Theory? The Central Concepts of Automata Theory, Automation, Finite Automation, Transition Systems, Acceptance of a String by a Finite Automation, DFA, Design of DFAs, NFA, Design of NFA, Equivalence of DFA and NFA, Conversion of NFA into DFA, Finite Automata with E-Transition, Minimization of Finite Automata, Mealy and Moore Machines, Applications and Limitation of Finite Automata. Why we have to study Formal Language and Automata Theory? In computer science,Every working process in universe can be represented by means of model.The model can be theoretical or mathematical.Mathematical model can be termed as solvable problem. Automata theory is the study of abstract mathematical model and problems which it is able to solve,which mainly deals with the logic of computation with respect to simple machines, referred to as automata. Finite automata, Pushdown automata,Linear bounded automata and turing machines are the model for study. A formal language is an abstraction of the general programming languages and it is necessary to interpret an abstract mathematical model or automata.Formal languages are used among others as the basis for defining the grammar of programming languages and formalized versions of subsets of natural languages in which the words of the language represent concepts that are associated with particular meanings or semantics. Automata theory and formal languages are the base of current compilers, regular expressions, parsers, web-scrapers, natural language processing (NLP), state machines based on markov chains etc. What is automation? Automation is the technology by which a process or procedure is performed with minimum human assistance. Example :-Automated hiring tools can read through applications at amazing speeds, searching for specific keywords to quickly identify the best candidates from thousands of applications. According to CareerBuilder, 71% of employers said automated applicant tracking software helped improve the candidate experience. Automated hiring and recruitment tools such as Mya, Smashfly, and BreezyHR use AI to significantly reduce the time to hire and accelerate the screening process. What is finite automata(Finite state machine)? A finite automaton (FA) is a simple idealized machine used to recognize patterns within input taken from some character set (or alphabet) C. The job of an FA is to accept or reject an input depending on whether the pattern defined by the FA occurs in the input.

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:-

Text from page-5

Input tape: The input tape has the left end and extends to the right end. It is divided into squares and each square containing a single symbol from the input alphabet ∑. The end squares of the tape contain the end markers ₵ at the left end and the end marker \$ at the right end. The absence of endmarkers indicates that the tape is of infinite length. The left-to-right sequence of symbols between the two endmarkers in the input string to be processed. Read only Head: The tape has a read only head that examines only one square at a time and can move one square either to the left or to the right. At the beginning of the operation the head is always at the leftmost square of the input tape. For further analysis, machine restrict the moment of the read only head from left to right direction only and one square every time when it reads a symbols. Note: The read head never moves to the left direction. When it there is not more symbol in the next right move of the input tape, at this state the machine stops proceeding and automaton terminates its operation. Finite control: There is a finite control which determines the state of the automaton and also controls the movement of the head. The input to the finite control will usually be the symbol under the read head (assumed a) and the present state of the machine (assumed q) to give the following outputs; 1. A motion of Read head along the tape to the next square. 2. The next state of the finite state machine given by δ(q, a). Mathematical representation of FSM(finite automata) A finite-state machine is formally defined as a 5-tuple (Q, I, Z, ∂, W) such that:  Q = finite set of states