Then we construct 8 for [q2] and [qo. After constructing 8 for [ql' q2], we do not get any new states and so we terminate the construction of 8. The state table is given by Table 3. Q3], [qo. The value of the output function Z t in the most general case is a function of the present state q t and the present input xU , i. Z n ; where Ie is called the output function. This generalized model is usua! Jy called the! If the output function Z t depends only on the present state and is independent of the cunent input.
It is more convenient to use Moore machine in automata theory. We now give the most general definitIons of these machines. Table 3. The initial state iJo is marked with an arrow. The table defines 8 ane! Transition Table. In the case of a Mealy machine. So for the input string A the output is only A It may be observed that in the case of a Moore machine.
The first output is Ic qo for all output strings. In the case of a 1'1ealy machine if the input string is of length n. Construct a Moore machine which is equivalent to the Mealy - - machine.
We split qi into several different states, the number of such states being equal to the number of different outputs associated with q,. For example, in this problem. Similarly, q3 and '14 are associated with the outputs o and O. Here we observe that the initial state ql is associated with output 1. This means that with input A we get an output of 1, if the machine starts at state ql' Thus this Moore machine accepts a zero- length sequence null sequence which is not accepted by the Mealy machine.
To overcome this situation, either we must neglect the response of a Moore machine to input A. So Table 3. Then the following procedure may be adopted to construct an equivalent Mealy machine Mo. In the case of the Moore machine, for every input symbol we form the pair consisting of the next state and the corresponding output and reconstruct the table for the Mealy Machine.
For example, the states CJ3 and '11 in the next state column should be associated with outputs 0 and I, respectively. The transition table for the Mealy machine is given by Table 3. If two states have identical transitions i. Construct the corresponding Mealy rnachine. In Table 3. We delete if. Table 3,18 gives the reconstructed table. Solution Let us convert the transition diagram into the transition Table 3. For the given problem: qJ is not associated with any output; q2 is associated with two different outputs Zj and 2 2 ; ]3 is associated with two different outputs 2 1 and 2 2, Thus we must split q2 into q21 and ]22 with outputs 2 1 and Z2, respectively and q3 into ]31 and q32 with outputs 2 1 and 2 2, respectively.
I, what really matters is whether a state is a final state or not. We define some relations in Q. We mention some of the properties of these relations. Property 1 The relations we have defined. Property 2 By Theorem 2. These partitions can be denoted by Jr and Jrl' respectively. The elements of Jrl are k-equivalence classes.
Property 3 If qj and q: are k-equivalent for all k ; O. Jr" denotes the set of equivalence classes under l1-equivalence. The following result is the key to the construction of minimum state automaton. As WI is a string of length k, 8 q , a and 8 q:, a are not k-equivalent. This is a contradiction. If so. For the required minimum state automaton. Remark In the above construction, the crucial part is the construction of equivalence classes; for. Thus we see that qj.
Note: The construction of no, lrj, lr:, etc. If the states under some a-column are in different subsets of 7i'Q. Chapter 3: The Theory of Automata ,! Solution It will be easier if we construct the transition table as shown in Table 3. Consider qo and qj E Qt The entries under the O-column corresponding to qo and qj are q] and qr,: they lie in Q!
Similarly, qo is not i-equivalent to q3' qs and q7' Now, consider qo and q4' The entries under the O-column are qj and q7' Both are in Q::o. By considering the entries under the O-column and the I-column, we see that q3 and q are l-equivalent. Now, the entries under the O-column corresponding to qo and q4 are qj and q7' and these lie in the same equivalence class in nj.
The entries under the I-column are qs, qs. So qo and q4 are 2-eqnivalent. But qo and q6 are not 2-equivalent. The qj and Q7 are 3-equivalent. The states qo and q. SO also are ql, q7 and q3' qs But the transitions in both the diagrams i. If there is an arrow from qi to jj with label a.
We start from [qoJ and construct 8, only for those states reachable from [qoJ as in Example 3. As the condition on strings of T M does not at all involve 0. M can come back to the initial state. The required DFA is given by Fig. The state corresponding to ab can be the final state in our DFA. Keeping these in mind we construct the required DFA. Its transition diagram is described by Fig. The student is advised to check. M accepts a b e d 3.
If q2 is also made a final state. M is a nondeterministic automaton. A string having an even number of O's is accepted by M. Is R an equivalence relation'? Use it to construct a DFA accepting the same set of strings.
Construct a deterministic finite automaton equivalent to M. The input symbols are 0 and 1. Compare it with the DFA described by Fig. We also study the inclusion relation between the four classes of languages. Linguists were trying in the early s to define precisely valid sentences and give structural descriptions of sentences. They wanted to define a fomlal grammar i. They tbought that such a desCliption of natural languages the languages that we use in everyday life such as English, Hindi. French, etc.
It was Noam Chomsky who gave a mathematical model of a grammar in Although it was not useful for describing natural languages such as English, it turned alit to be useful for computer languages.
In fact. Before giving the definition of grammar, we shall study, for the sake of simplicity. The sentence 'Ram ate quickly' has the words 'Ram', 'ate', 'quickly' written in that order, If we replace 'Ram' by 'Sam', 'Tom', 'Gita', etc.
So the structure of 'Ram ate quickly' can be given as noun verb adverb. For noun we can substitute 'Ram'. Similarly, the structure of 'Sam ran' can be given in the form noun We have to note that noun vdb is not a sentence but only the description of a particular type of sentence. Let us call noun , adverb as variables. Words like 'Ram', 'Sam', 'ate', 'ran'. So our sentences tum out to be strings of terminals. Let S be a variable denoting a sentence. Let us denote the collection of the mles given above by P.
If our vocabulary is thus restricted to 'Ram', 'Sam', 'Gila', 'ate', 'ran" 'walked', 'quickly' and 'slowly', and our sentences are of the fonn noun verb adverb and noun verb.
The sentences are obtained by i starting with S. As mentioned earlier. Note: The set of productions is the kemel of grammars and language specification.
We obsene the following regarding the production rules. We give a formal definition of derivation as follows: Definition 4. This process is called one-step derivation.
In G particular. In this case we say that the string we started with directly derives the new string. So, 5 in 04S1 4 can be replaced by The resulting string is 04 ". G G Defmition 4. Note: We can note in particular that a 7 a.
Also, if a 7 f3. G G Consider. G G Definition 4. The elements of L G are called sentences. Stated in another way, L G is the set of all terminal strings derived from the start symbol S.
Definition 4. We can note G that the elements of L G are sentential forms but not vice versa. Remarks on Derivation 1. Any derivation involves the application of productions. The derivation of a string is complete when the working string cannot be modified. If the final string does not contain any variable. If the final string contains a variable. I am' We give several examples of grammars and languages generated by them. The derivation of It' starts with 5. In this case ].
C ;; aCa I b. Find L G. If we apply C ;; b. Otherwise we have to apply only C ;; aCa. So we get d'Ca" with a single variable C. To get a terminal string we have to replace C by b. So any delivation is of the fonn S b a"bu n with n 2: 1 Therefore.
Remark By applying the com'ention regarding the notation of variables. We can specify a grammar by its productions alone. All productions are S-productions. The subsequent productions are obtained in a similar way.
So aja Construct a grammar G generating L. Solution For constructing a grammar G generating the set of all palindromes. Iii a. Jii If x is a palindrome axo. Ii; a! So S S al It is easy to see the idea behind the construction. So, as in the earlier example. For n 2: L i --'7 0, we have Thus.
But to get a tenninal string. As A S a"lJ", the resulting terminal string is a"b"c i. As in the previous example, we can prove that G is the required grammar. Thus we arrive at a sentential form 0" 12 A] 2 ,, The A. We try to construct L by recursion. We already know how to construct a"Y' recursively. As it is difficult to construct allb"e" recursively, we do it in two stages: i we construct alld' and ii we convert d' into bne".
A natural choice for a to execute stage ii is be. But converting be " into bile" is not possible as be " has no variables. Chapter 4: Forma! We show that this is the only way of arriving at a tenninal string.
The productions we can apply to a" BC " are either CB. By the application of anyone of these productions. Suppose a C is converted before converting all B's. In ailbierx, the variables appear only in ex.
If rx starts with B, we cannot proceed. As B is preceded by c in a"biciBrx'. Remarks The following remarks give us an idea about the construction of productions P j-P 13' 1. PI is the only S-production.
We can add terminals only by using P2-PS' 6. P6-P9 simply interchange symbols. They push A or B to the right. PIO, PlJ are used to push 52 to the left. We can apply 4. We can discuss the possible ways of reducing aS IS::a5 3 the other case is similar to a terminal string. The resulting string is aaSlaA which cannot be reduced further. From Cases 1 and 2 we see that either we have to apply both PI:: and P 13 or neither of them.
Thus the effect of applying 5 52 , a5 A is to add a to the left of 5 and 53' If we apply 5 S2 , A, S3 , A By Cases 1 and 2 we have to apply both we get abab. Solution We have to start with an 5-production. At every stage we apply a suitable production which is likely to derive w.
In this example, we underline the substring to be replaced by the use of a production. Solution 0- application of any production except S , A , a variable is replaced by two terminals and at the most one variable. So, every step in any derivation increases the number of terminals by 2 except that involving 5 , A. Thus, we have proved i and ii. This proves iii. So if we want to classify grammars. Chomsky classified the grammars into four types in terms of productions types A type 0 grammar is any phrase structure grammar without any restrictions.
All the grammars we have considered are type 0 grammars. To define the other types of grammars. The production simply erases C in any context. A production without any restrictions is called a type 0 production. A is replaced by beD ::j:: A. Here both the left and right contexts are A. Apart from S -1 A, all the other productions do not decrease the length of the working string.
In other words, i epA Iff I ::;! The 3rd edition of Theory Of Computer Science: Theory of Computer Science: Besides providing readers with a detailed introduction to the theories related to computer science, vy book also fully covers mathematical preliminaries which are essential to computation. User Review — Flag as inappropriate book. Organize your life on a single page with this new way to use Evernote.
Computer System Architecture 3e Update by Pearson. Connect with Us Facebook Twitter Instagram. Theory of automata by klp mishra Products are advertisements for products sold by merchants on Amazon.
Account Options Sign in. Operator symbols show up as empty oof. Published 6 months ago. Published 8 months ago. In order to help improve the problem-solving capabilities of students, the author has also made sure that every chapter in this book includes objective-type questions. This book provides numerous examples that illustrate the basic concepts.
It is profusely illustrated with diagrams. While dealing with theorems and algorithms, the emphasis is on constructions. Theory of Computer Science. Each construction is immediately followed by an example and only then the formal proof is given so that the student can master the technique involved in the construction before taking up the formal proof.
The key feature of the book that sets it apart from other books is the provision of detailed solutions at the end of the book to chapter-end exercises. The chapter on Propositions and Predicates Chapter 10 of the second edition is now the first chapter in the new edition.
The changes in other chapters have been made without affecting the structure of the second edition. The chapter on Turing machines Chapter 7 of the second edition has undergone major changes. What makes Biblio different?
Besides, it includes coverage of mathematical preliminaries. US Court has asserted your right to buy computztion use International edition. Besides, it includes coverage of mathematical Automata, Languages and Computation. Formerly Professor. Department of Electrical. Other editions — View all Theory of Computer Science: Besides, it includes coverage of mathematical US Court has asserted your right to buy and use International edition.
Besides, it includes coverage of mathematical preliminaries. Automata, Languages and Computation K. What makes Biblio different? International Edition Textbooks may bear a mishea Not for sale in the U.
0コメント