Download ebook of theory of computation by klp mishra
Published 6 months ago. Published 8 months ago. Amazon Restaurants Miahra delivery from local restaurants. Besides, it includes coverage of mathematical This Third Edition, in response to the enthusiastic reception given by academia and students to the previous edition, offers a cohesive presentation of all aspects of theoretical computer science, namely automata, formal languages, computability, and complexity.
In addition, explanatory solutions have been provided at theory of automata by klp mishra end of the book for the questions given towards the conclusion thsory each chapter. The book is designed to meet the needs of the undergraduate and postgraduate students of computer ebolk and engineering as well as those of the students offering courses in computer applications. There misra a problem filtering reviews right now. User Review — Flag as inappropriate nice book.
Introduction to Automata Theory, Thepry, and Computation, 3e. Automata, Languages and Computation K. Every important note or file is just two clicks theory of automata by klp mishra when you use Master Notes. This edition has incorporated new chapters and sections on topics such as the np class of the computational theory and quantum computability. This comprehensive academic book covers formal computer languages and computation.
Kindle Edition Verified Purchase. Fundamentals of Database System. This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent.
You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience. Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information. This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.
Privacy Overview This website uses cookies to improve your experience while you navigate through the website. Corresponding to any day of the year say, 4th February , we can associate the set of all persons born on that day. In each of the subsets, any two elements are related. This leads to one more property of equivalence relations. In general, th6Ca' s are called equivalence classes. Also, we may note that the union of all the equivalence classes is the set of all persons in Delhi.
This is true for any equivalence relation because of the following theorem. Theorem 2. Proof Let U Ca denote the union of distinct equivalence classes. C" ;f. Then 5 E C, since sRs, R being reflexive. Before proving ii , we may note the following: if aRb 2. As bRa and aRd. This means d E C b. Now we prove ii by the method of contradiction refer to Section 2. Suppose Cil II Cb ::;t: 0. Then there exists some element d in 5 such that d E C a and d E Cb.
As dEC", we have aRd. By symmetry of R, dRb. As aRd and dRb, by transitivity of R, we have aRb. Now we can use 2. Thus ii is proved. I If we apply Theorem 2. Define aRb if a and b study in the same class. What are the equivalence classes? In what way does R partition 5? By adding more ordered pairs to R we can make it reflexive or transitive. R is not reflexive as 3R'3. But by adding 3, 3 to R, we get a reflexive relation. Also, R is not transitive as 1R2 and 2R3 but 1R'3.
By adding the pair 1. There are many transitive relations T containing R. But the smallest among them is interesting. Note: We can define ref1exive closure and symmetric closure in a similar way. Let R j and R 2 be the two relations in 5. Solution From Example 2. The element f x is called the image of. Functions can be defined either i by giving the images of all elements of X, or ii by a computational rule which computes f x once x is given.
R denotes the set of all real numbers. Dpfmition 2. Hence f is one-to-one. It is not onto since no odd integer can be the image of any element in Z as any image is even. The following theorem distinguishes a finite set from an infinite set. Note: The above result is not tme for infinite sets as Example 2. Solution Let y E R. Thus, f is onto. The Pigeonhole Principle t Suppose a postman distributes 51 letters in 50 mailboxes pigeonholes.
Then it is evident that some mailbox will contain at least two letters. This is enunciated as a mathematical principle called the pigeonhole principle. Solution Arrange the numbers 1. There are 11 numbers to be selected. Take these numbers from the boxes. By the pigeonhole principle, at least one box will contain two of these eleven numbers. These two numbers differ by 38 or less.
Lejeune Dirichlet Our interest lies mainly in trees special types of graphs and their properties. Representation of a Graph Usually a graph. In generaL an edge is called a self-loop if the vertices in its associated pair coincide. Defmition 2. Representation of a Digraph The representation is as in the case of undirected graphs except that the edges ; The ordered pairs v:, 1'3 , 1'3, 1'4 , VI.
For example, the undirected graph corresponding to the digraph given in Fig. A self-loop is counted twice while calculating the degree. In Fig. We now mention the following theorem without proof. The path is said to be a path from 1'1 to VIZ" For example.
It is a path from V] to 1'2' In Fig. The graphs given by Figs. The graphs given in Figs. We no",,- discuss some properties of trees both directed and undirected used in developing transition systems and studying grammar rules. Theory of Computer Science Property 1 A tree is a connected graph with no circuits or loops. Property 2 In a tree there is one and only one path between every pair of vertices. Property 3 If in a graph there is a unique i.
Property 4 A tree with n vertices has 11 - 1 edges. Property 5 If a connected graph with n vertices has 11 - 1 edges, then it is a tree.
Property 6 If a graph with no circuits has n vertices and 11 - 1 edges,tben it is a tree. A leaf in a tree can be defined as a vertex of degree one. The vertices other than leaves are called internal ve11ices. V6' Vi are leaves and 1'1, 1'3' 1'4 are internal vertices. The following definition of ordered trees will be used for representing derivations in context-free grammars. T:: There is a directed path from the root to every other vertex.
T3 : Every ve11ex except the root has exactly one predecessor. T4 : The successors of each vertex are ordered 'from the left'. Note: The condition T 4 of the definition becomes evident once we have the diagram of the graph. In this figure the successors of 1'1 are ordered as 1':1'3' The successors of 1'3 are ordered as 1'51'6'!
Chapter 2: Mathematical Preliminaries J;1 51 By adopting the following convention, we can simplify Fig. The root is at the top. The directed edges are represented by arrows pointing downwards. As all the arrows point downwards, the directed edges can be simply represented by lines sloping downwards, as illustrated in Fig. Note: An ordered directed tree is connected which follows from T2.
It has no circuits because of T3. Hence an ordered directed tree is a tree see Definition 2. As we use only the ordered directed trees in applications to grammars, we refer to ordered directed trees as simply trees. For example, the trees given by Figs. The tree given by Fig. Proof Let n be the number of vertices. The root is of degree 2 and the remaining n - 1 vertices are of odd degree by Definition 2.
By Theorem 2. I We now introduce some more terminology regarding trees: i A son of a vertex v is a successor of 1'. For example, for the tree given by Fig. Solution In a binacy tree the root is at level O. As T has n vertices. In a binary tree we have the root at zero level and at least two vertices at level 1. When T is of height k. But, n is odd by Theorem 2. The height of the tree in Fig. For the tree in Fig. Chapter 2: Mathematical Preliminaries ;l, 53 Fig.
As each edge is counted twice while calculating the degrees of its end vertices. Solving for in. Solutions a 10, 4, 9, 8, 6 are leaves. Let us form a new string :: by placing y after x, i. The string z is said to be obtained by concatenation of x and y. We give below some basic properties of concatenation. Property 2 Identity element.
We introduce below some more operations on strings. A palindrome is a string which is the same whether written forward or backward, e. A palindrome of even length can be obtained by concatenation of a string and its transpose. Prefix and suffix of a string. A prefix of a string is a substring of leading symbols of that string. For example, the string has four prefixes, i. L 12, Similarly, a suffix of a string is a substring of trailing symbols of that string, i. For example, the string has four suffixes, i.
A tenninal symbol is a unique indivisible object used in the generation of strings. A nonterminal symbol is a unique object but divisible, used in the generation of strings. A nonterminal symbol will be constructed from the terminal symbols: the number of terminal symbols in a nontenninal symbol may vary; it is also called a variable. In a natural language, e. English, the letters a, b, A, B, etc. In programming languages, A, B, C, Property 2 The successor of any natural number is also a natural number.
Property 3 Zero is not the successor of any natural number. Property 4 No two natural numbers have the same successor. Property 5 Let a property pen be defined for every natural number n.
A proof by complete enumeration of all possible combinations is called perfect induction. The method of proof by induction can be used to prove a property pen for all n. This is called the proof for the basis. This is called the induction hypothesis. Solution a Prooffor the basis. The method we shall apply will be clear once we mention the induction hypothesis.
Thus, there is basis for induction. Property of a tree: There is a unique path between every pair of vertices in a tree. Thus, the deletion of e from the graph will divide the graph into two subtrees. Let nl and n: be the number of vertices in the subtrees.
As ::; 11 and ::; n. By induction. Prove by induction that the two definitions are equivalent. Definition 1 A palindrome is a string that reads the same forward and backward. Definition 2 i A is a palindrome. Solution Let x be a string which satisfies the Definition L i. By induction on the length of x we prove that x satisfies the Definition 2. Let x be a string which is constructed using the Definition 2.
We show by induction on i x I that it satisfies the Definition 1. There is basis for induction by rule ii. Let x be a string of length n. As x has to be constructed using the rule iii. Proof We prove the theorem by induction on m. Assume the theorem for m. Consider a particular place. Three cases arise: i P contains at least two objects. In case i. Consider case ii. By induction hypothesis, at least one place not the same as P contains at least two objects. Once again, by induction hypothesis, one place other than P receives at least two objects.
By the principle of induction. To prove these, we may apply two induction proofs simultaneously. Prove that: P" : 2. Hence there is basis for induction. Assume Pn and Qw So 2. We conclude this chapter with the method of proof by contradiction. The method of proof by contradiction is as follows: Assume that property P is not true. By logical reasoning get a conclusion which is either absurd or contradicts the given conditions.
The following example illustrates the use of proof by contradiction and proof by induction. For the definition of strings. In both cases ax ;f. So there is basis for induction. Assume the result for any string whose length is less than Let x be any string of length We prove that ax ;f. As a is the first symbol on the L. As b is the last symbol on R. Thus, ax xb.
By induction the result is true for all strings. We use the Venn diagram to represent these sets see Fig. Show that R is a partial ordering. A relation is a pattial ordering if it is reflexive, antisymmetric and transitive. This implies that both k and I are odd. Therefore, c aiel. Hence aRc. So - is retlexive.
Hence P, q - m, n. So - is symmenic. Hence - is an equivalence relation. Solution G has n vertices and n - 1 edges. Every edge is counted twice while computing the degree of each of its end vertices. So, L deg v is the sum of II positive integers. If deg v? Solution We prove the result by induction on n. Obviously, there is basis for induction.
Assume the result for connected graphs with n - 1 vertices. Let T be a connected graph with II vertices and J1 - 1 edges. By Example 2. Drop the vertex '. The resulting graph Of is still connected and has 11 - 1 vertices and n 2 edges. By induction hypothesis. Of is a tree. So 0' has no circuits and hence 0 also has no circuits. Addition of the edge incident with v does not create a circuit in G. Hence G is a tree. By the principle of induction, the property is true for all n.
Find a fonnula for Sen , where Sen denotes the number of ways of climbing n stairs. Solution When there is a single stair. In reaching n steps, the person can climb either one step or two steps in his last stride. For these two choices, the number of 'ways are sen - 1 and Sen - 2. Solution Let Sn denote the number of subsets of 1. Consider a set A with n elements. If a subset having the desired property 'ontains n, it cannot contain n - 1.
If it does not contain n. Assume the result for n, i. A tree with 10 vertices has a 10 edges b 9 edges el 8 edges d 7 edges. A binary tree with seven vertices has a one leaf b two leaves c three leaves d four leaves Justify your answer. Show that R is an equivalence relation. Is R an equivalence relation? Show that f is one-to-one but not onto. Show that g is one-to-one and onto. If a person opens an envelope, he has to then follow the instruction contained therein.
Show that if a person opens the first envelope. The Theory of Automata In this chapter we begin with the study of automaton. We deal with transition systems which are more general than finite automata. We define the acceptability of strings by finite automata and prove that nondeterministic finite automata have the same capability as the deterministic automata as far as acceptability is concerned. Finally, in the last section.
An automaton is defined as a system where energy, materials and information are transformed. Examples are automatic machine tools, automatic packing machines, and automatic photo printing machines. In computer science the term 'automaton' means 'discrete automaton' and is defined in a more abstract way as shown in Fig. At each of the discrete instants of time t b t2, At any instant of time the automaton can be in onenf the states ql' q:;.
The next state of an automaton at any instant of time is determined by the present state and the present input. The output is related to either state only or to both the input and the state. It should be noted that at any instant of time the automaton is in some state. On 'reading' an input symbol, the automaton 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 called an automaton without a memory.
An automaton in which the output depends on the states as well. An automaton in which the output depends only on the states of the machine is called a Moore machine. An automaton in. Solution The shift register Fig. This 4-bit selial shift register can be further represented as in Fig. A shift register as a finite-state machine, From the operation. In general. This is the function which describes the change of states during the transition.
This mapping is usually represented by a transition table or a transition diagram. It is assumed here that there may be more than one final state. We shall use the same symbol 5 to represent both types of transition functions and the difference can be easily identified by the nature of mapping symbol or a string , i. The above model can be represented graphically by Fig. The various components are explained as follows: i Input tape. The input tape is divided into squares, each square containing a single symbol from the input alphabet L.
The left-to-right sequence of symbols between the two endmarkers is the input string to be processed. The head examines only one square at a time and can move one square either to the left or to the right. For further analysis, we restrict the movement of the R-head only to the right side. The input to the finite control will usually be the symbol under the R-head, say a, and the present state of the machine, say q, to give the following outputs: a A motion of R-head along the tape to the next square in some a null move, i.
A typical transition system is shown in Fig. In the figure, the initial state is represented by a circle with an arrow pointing towards it, the final state by two concentric circles, and the other states are represented by just a circle.
It outputs O. Defmition 3. Chapter 3: The Theory of Automata ;1 75 In other words, if qj, w. DefInition 3. Example 3. Determine the initial states. Solution The initial states are qo and q!.
As j3 is the final state, is accepted by the transition system. But a transition system need not be a finite automaton. For example, a transition system may contain more than one initial state. This means that the state of the system can be changed only by an input symbol. This proves 3. This is basically the acceptability of a string by the final state.
Note: A final state is also called an accepting state. Give the entire sequence of states for the input string TABLE 3. Thus some moves of the machine cannot be determined uniquely by the input symbol and the present state. Such machines are called nondeterministic automata.
Definition 3. We note that the difference between the deterministic and nondeterministic automata is only in 0. For deterministic automaton DFA , the outcome is a state, i. Consider, for example, the nondeterministic automaton whose transition diagram is described by Fig.
The sequence of states for the input string is given in Fig. Chapter 3: The Theory of Automata ,g 79 o o o o o Fig. Note: As At is nondetenninistic, O q j, 'v may have more than one state. So w is accepted by At if a final state is one among the possible states that At can reach on application of w. If 8 q, a has n elements, the automaton splits into n identical copies of itself: each copy pursuing one choice determined by an element of 8 q, a. This type of parallel computation continues.
If anyone of the copies of At reaches a final state after processing the entire input string ',1', then we say that At accepts w. Another way of looking at the computation by an NDFA At is to assign a tree structure for computing 8 q. The root of the tree has the label q. For every input symbol in ',1', the tree branches itself. When a leaf of the tree has a final state as lts labeL then At accepts w.
It is denoted by T At. In other words. Theorem 3. Before defining 8'. M is initially at qo. But on application of an input symbol, say a, M can reach any of the states 8 qo, a. To describe M, just after the application of the input symbol a. So, lvI' has to remember all these possible states at any instant of time. Hence the states of M' are defined as subsets of Q. As M starts with the initial state qo, q'o is defined as [qo]. A string w belongs to T M if a final state is one of the possible states that M reaches on processing w.
So, a final state in M' i. Now we can define 8': iv 8' [qb q2. We prove by induction on Ix I. Thus there is basis for induction. Assume that 3. The other part i. To construct 8' [ql These states constitute 8' [q] qd. Note: We write 8' as 8 itself when there is no ambiguity. This is because our interest is only in constructing M 1 accepting T M. So, we start the construction of 8 for [qo].
We continue by considering only the states appearing earlier under the input columns and constructing 8 for such states. We halt when no more new states appear under the input columns. We get [q2] and [qo.
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!
0コメント