×
The future belongs to those who believe in the beauty of their dreams.

# Note for Theory Of Computation - TC By Remya Sasi

• Theory Of Computation - TC
• Other
• 96 Views
Page-1

#### Note for Theory Of Computation - TC By Remya Sasi / 60

0 User(s)

#### Text from page-1

MODULE II Historical aspect of Automata Automata theory is the study of computing devices or machines In 1930’s Alen Turing introduced an abstract machine that has all the capabilities of todays computer In 1940 and 1950 simple kinds of machines, which we today call finite automata were developed. In 1950 chomsky began the study of formal grammars. These are not strictly machines, but have close relationships to abstract automata. In computer science we find many example of finite state system and theory of finite automata is a useful design tool for these systems. Introduction Consider the following example systems which can perform basic computations vending machines which “accepts” sequence of coins of appropriate dimension. tape recorders and gramophone players which could “read” a finite input and convert them into sounds. All the above are concrete examples or instances of the following abstraction. a finite sequence of discrete inputs that is “read” from left to right and accepted by a machine with a finite number of possible states. Fig 2.1 AUTOMATA THEORY

#### Text from page-2

In theoretical computer science, automata theory is the study of abstract machines and the problems which they are able to solve. These abstract machines are called automata. A discrete automaton is a mathematical model for a finite state machine (FSM). An FSM is a machine that takes a symbol as input and "jumps" or transitions, from one state to another according to a transition function (which can be expressed as a table). This transition function tells the automaton which state to go to next given a current state and a current symbol. Automata- The plural form of Automaton, a self-operating machine. An automaton is supposed to run on some given sequence or string of inputs in discrete time steps. At each time step, an automaton gets one input that is picked up from a set of symbols or letters, which is called an Alphabet. An automaton takes input from a finite sequence of symbols, which is called a word. An automaton contains a finite set of states. During each time instance of some run, automaton has to be in one of its states. At each time step when automaton reads a symbol, it jumps or transits to next state depending on its current state and the read symbol. This function over current state and input symbol is called transition function. The automaton reads input word one symbol after another in the sequence and transits from state to state according to the transition function, until the word is read completely. Once the input word is read, the automaton is said to have been stopped and the state at which automaton has stopped is called final state. Depending on the final state, it's said that the automaton either accepts or rejects an input word. There is a subset of states of the automaton, which is defined as a set of accepting states. If the final state is an accept state, then the automaton accepts the word. Otherwise, the word is rejected. The set of all the words accepted by an automaton is called the language recognized by the automaton. Automata theory is closely related to formal language theory as the automata are often classified by the class of formal languages they are able to recognize. Automata play a major role in compiler design and parsing. Transition Diagrams and Transition systems A state transition diagram is a type of diagram used in computer science and related fields to describe the behavior of systems. State transition diagram require

#### Text from page-3

that the system described is composed of a finite number of states; State diagrams can be used to graphically represent finite state machines. This was introduced by Taylor Booth in his 1967 book "Sequential Machines and Automata Theory". A classic form of a state diagram for a finite state machine is a directed graph with the following elements • States : a finite set of vertices normally represented by circles and labelled with unique designator symbols or words written inside them; • Input symbols : a finite collection of input symbols or designators; • Output symbols: a finite collection of output symbols or designators; • Edges : represent the "transitions" between two states as caused by the input (identified by their symbols drawn on the "edges"). An 'edge' is usually drawn as an arrow directed from the present-state toward the next-state. This mapping describes the state transitions that is to occur on input of a particular symbol. • Start state : The start state is usually represented by an arrow with no origin pointing to the state. • Accepting state(s): It is usually drawn as a double circle. Another possible representation is the State transition table. A state transition table is a table showing what state a finite state machine will move to, based on the current state and other inputs. A state table is essentially a truth table in which some of the inputs are the current state, and the outputs include the next state, along with other outputs. An example of a state transition table for a machine M together with the corresponding state diagram is given below.

#### Text from page-4

Figure 2.2 : State Transition table and State Diagram. FINITE AUTOMATA Definition : A finite automaton is a 5-tuple M = { Q,∑, δ, q, F } where 1. Q is a finite set, whose elements are called “states” of the machine 2. ∑ is a finite set, called the alphabet, the elements of ∑ are called symbols 3. δ : Q × ∑ → Q is the transition function which specifies for a given state and input symbol what the next state is 4. q € Q is the initial state. 5. F € Q is the set of final states We can think of the transition function δ as being the “program” of the finite automaton M = (Q,∑, δ, q, F). This function tells us what M can do in “one step”: • Let ‘r’ be a state of Q and let ‘a’ be a symbol of the alphabet ∑. If the finite automaton M is in state r and reads the symbol a, then it switches from state r to state δ(r, a). (In fact, δ(r, a) may be equal to ‘r’.) Example : Consider the problem of designing a “computer” that controls a toll gate. When a car arrives at the toll gate, the gate is closed. The gate opens as soon as the driver has payed 25 cents. We assume that we have only three coin denominations: 5, 10, and 25 cents. We also assume that no excess change is returned. After having arrived at the toll gate, the driver inserts a sequence of coins into the machine. At any moment, the machine has to decide whether or not to open the gate, i.e., whether or not the driver has paid 25 cents (or more). In order to decide this, the machine is in one of the following six states, at any moment during the process: