Upload
rajendranbehappy
View
9
Download
0
Embed Size (px)
DESCRIPTION
Introduction to an Automaton in Theory of computation
Citation preview
The Theory ofAutomata
In this chapter we begin with the study of automaton. We deal with transitionsystems which are more general than finite automata. We define theacceptability of strings by finite automata and prove that nondeterministic finiteautomata have the same capability as the deterministic automata as far asacceptability is concerned. Besides. we discuss the equivalence of Mealy andMoore models. Finally, in the last section. we give an algorithm to construct aminimum state automaton equivalent to a given finite automaton.
3.1 DEFINITION OF AN AUTOMATON
We shall give the most general definition of an automaton and later modifyit to computer applications. An automaton is defined as a system whereenergy, materials and information are transformed. transmitted and used forperforming some functions without direct participation of man. Examples areautomatic machine tools, automatic packing machines, and automatic photoprinting machines.
In computer science the term 'automaton' means 'discrete automaton' andis defined in a more abstract way as shown in Fig. 3.1.
/1 'j Automaton °1
/2°2
-----~
/p 01,02' ... , On Oq
Fig. 3.1 Model of a discrete automaton.
71
72 li\ Theory ofComputer Science._---------------
The characteristics of automaton are now desClibed.
(i) Input. At each of the discrete instants of time t b t2, ...• tm the input. values Ii' 12..... fp • each of which can take a finite number of fixed
values from the input alphabet ~, are applied to the input side of themodel shown in Fig. 3.l.
iii) Output. a" 0:;., ... , Oq are the outputs of the model, each of which.can take a finite number of fixed values from an output O.
(iii) States. At any instant of time the automaton can be in onenf thestates ql' q:;., ..., qJl'
(iv) State relation. The next state of an automaton at any instant of timeis determined by the present state and the present input.
(v) Output relation. The output is related to either state only or to boththe input and the state. It should be noted that at any instant of timethe automaton is in some state. On 'reading' an input symbol, theautomaton moves to a next state which is given by the state relation.
Note: An automaton in which the output depends only on the input is calledan automaton without a memory. An automaton in which the output dependson the states as well. is called automaton with a finite memory. An automatonin which the output depends only on the states of the machine is called aMoore machine. An automaton in. which the output depends on the state aswell as on the input at any instant of time is called a Mealy machine.
EXAMPLE 3.1
Consider the simple shift register shown in Fig. 3.2 as a finite-state machineand study its operation.
. ID 0 11--,t1>II~ QI. liD 0 ,H,D --,Ol--s-eria-I7:~~~ rU ~_ ootpol
I I I .i
Fig. 3.2 A 4-bit serial shift register using D flip-flops.
Solution
The shift register (Fig. 3.2) can have 2+ = 16 states (0000. 0001, .... 1111).and one serial input and one serial output. The input alphabet is ~ = {O, I}.and the output alphabet is 0 = {O. I}. This 4-bit selial shift register can befurther represented as in Fig. 3.3.
Chapter 3: The Theory of Automata &;! 73
Ii1
1 q1' q2' '
~I Q15' Q16'
Fig. 3.3 .A shift register as a finite-state machine,
From the operation. it is clear that the output will depend upon both the inputand the state and so it is a Mealy machine.
In general. any sequential machine behaviour can be represented by anautomaton.
3.2 DESCRIPTION OF A FINITE AUTOMATON
Definition 3.1 Analytically. a finite automaton can be represented by a5-tuple (Q, E. 0. qo. F). where
(i) Q is a finite nonempty set of states.(ii) I is a finite nonempty set of inputs called the input alphabet.(iii) (5 is a function which maps Qx I into Q and is usually called the direct
transition function. This is the function which describes the change ofstates during the transition. This mapping is usually represented by atransition table or a transition diagram.
(iv) qo E Q is the initial state.(v) F <;:;;; Q is the set of final states. It is assumed here that there may be
more than one final state.
Note: The transition function \vhich maps Q x I* into Q (i.e. maps a stateand a string of input symbols including the empty stling into a state) is calledthe indirect transition function. We shall use the same symbol (5 to representboth types of transition functions and the difference can be easily identifiedby the nature of mapping (symbol or a string), i.e. by the argument. (5 is alsocalled the next state function. The above model can be represented graphically byFig. 3.4.
Dc
r-------------,t String being processerJ
I I I [ I I I S Ilt~~~tn --1-""dieg h,,,
i Finite! control
Fig. 3.4 Block diagram of a finite automaton.