Languages and machines sudkamp pdf download solutions manual






















But the synopsis really makes me drifting and more curious about what the content of thesynopsis listed. Not only that, the property is less than defines a binary relation on the set of natural numbers. For example, or otherwise. No part of this publication may be reproduced, t. The S rules.

The relationship between the grammatical generation of languages and the recognition of languages by automata is a central theme of this book. These are: computation by register programs, by abacus ghomas and by A complete solutions manu. Essentially if I can honestly I really love every sheet that is in this book. Goodreads helps you keep track of books you want to read.

Want to Read saving…. Want to Read Currently Reading Read. Other editions. Enlarge cover. Error rating book. We conclude that the machine S cannot exist and that the State Problem is undecidable. The complement of L is also recursive and clearly does not contain w.

Consequently the property of containing the string w is a nontrivial property of recursively enumerable languages. This is the same difficulty encountered in showing that a recursively enumerable language can be enumerated Theorem 8. The solution to our difficulty is the same as used in that proof. We add three tapes and use two enumerating machines that have previously been described.

Ordered pairs [i, j] are generated on tape 4 using the enumerating the machine introduced in Exercise 8. When a pair [i, j] is written the tape, the string ui is generated on tape 5 and i j is written on tape 6. At this point, the computation of M with input ui is simulated on tapes 2 and 3 for j transitions. The string on tape 6 is used as a counter to halt the simulation when j transitions have been executed. If ui is accepted by M in j transitions, L M is accepted.

Otherwise, the work tapes are reinitialized, the next ordered pair is generated, and the simulation continues. If M accepts some string un , it does so in some finite number m of transitions. When [n, m] is generated, un will be checked and L M accepted. If M does not accept any string, the loop of generating and testing will continue indefinitely. A domino that extends the sequence beginning with [ab, a] must have a b as the first symbol in the bottom string. The only such ordered pair is [ba, bab].

Playing this produces ab ba a bab in which the top and bottom strings differ in the third symbol. There are three ways to extend a sequence that begins with [ba, bab]. We now turn our attention to trying to extend sequence ii. The next domino must have an a in the first position in the top string. Playing the only domino of this form we obtain the sequence ba b ab bab aa a in which the strings disagree in the fifth position.

The sole remaining candidate is sequence iii. Note that the rightmost end of these strings has the same form as the sequence consisting solely of the domino [ba, bab]. That is, the length of the bottom string is one greater than that of the top string with a b being the rightmost symbol on the bottom.

The preceding argument can be repeated to show that ba ba ba bab ab ab is the sole extension of iii that satisfies the conditions of a solution to this Post corre- spondence system. The only way in which this sequence can be extended is to continually play [ba, ab]. Utilizing this strategy, the length of the top string is always one less than that of the bottom.

It follows that there is no sequence of dominoes that form a solution to the Post correspondence system. We will consider four cases. In this case, the Post correspondence system has no solution since every way to play the dominoes produces a longer top string than bottom string. This case also is analogous to case 1 and there is no solution. This case has a solution consisting of that single domino. Case 4: none of the previous cases hold. Thus any Post correspondence system satisfying this condition has a solution.

Examining the preceding four cases, we can determine whether any Post correspondence system over a one symbol alphabet has a solution. Thus this special case of the Post Correspondence Problem is decidable. We will show that L GU is context-free. The language L GU consists of strings in which each ui is matched to the integer i in reverse order. We can build a context-free grammar G0 that generates L GU. The derivations of G0 produce all strings in which the matching does not occur.

To describe the construction we will consider the substrings ui and integers i to be units. The variables O and E generate the strings in L GU with an odd number of units and units with a mismatch, respectively.

The application of an A rule inserts a mismatch into the string. This is followed by a derivation from B that generates any combination of units. First we note that a Post correspondence problem C has infinitely many solutions whenever it is solvable. If w is the string spelled by a solution, then ww, www,. These solutions are obtained by repeating the sequence of dominoes that spell w.

By Theorem Combining this with the previous observation, C having a solution is equivalent to L G U and L GV having infinitely many elements in common. It follows that there is no algorithm that can determine whether the intersection of the languages generated by two context-free grammars is an infinite set. However, by Theorem Consequently, even is also primitive recursive.

A natural number x is a perfect square if it is the product of the square root of x with itself. Since the family of primitive recursive functions is closed under bounded products, f is primitive recursive.

The first i that satisfies the predicate eq n x, i , 3 is the third integer whose value g i is x. The factor ge n x, y , 3 in the definition of thrd provides the default value whenever there are fewer than three integers in the range 0 to y for which g assumes the value x. Thus, the greatest common divisor of 0 and any number is 0. Finding the greatest common divisor of x and y can be thought of as a search procedure.

The objective is to find the greatest number less than or equal to x that divides both x and y. The greatest common divisor can be obtained directly from g. The encoded sequence is 3, 1, 2. However, we can determine if there are primes greater than pn g x that divide x by constructing the product of the powers of the primes less than pn g x. The equality predicate returns zero when there are primes greater than pn g x that divide x.

If z is the encoding of an ordered pair [x, y], the primitive recursive function gn 1 dec 1, z , dec 0, z produces the encoding of [y, x]. Functions f1 and f2 defined by simultaneous recursion are intuitively computable, the definition provides a description for calculating the values f1 x, y and f2 x, y.

The encoding and decoding functions can be used to define a two-variable primitive recursive function f that encodes both f1 and f2.

If there is no such root, root c2 , c1 , c0 is undefined. Using an argument similar to that in Theorem This reduces to showing that a function obtained from a Turing computable partial predicate p x1 ,.

The proof uses the strategy employed in Theorem If the evaluation of p x1 ,. Composing this with the sign function produces the desired result when the computation of M prints a 1.

This total function could be used to produce an algorithm for determining whether the computation of an arbitrary Turing machine M will print a 1 when run with input x. The answer to this question could be obtained as follows: 1. Build trM. Build prt. Build f prt. Obtain the value f prt x. By Exercise Consequently, there is no algorithm capable of making this determination and f prt must not be primitive recursive.

Intuitively, n2 is the most significant contributor to the growth of f. Formally, the rate of growth of f can be obtained directly from Definition Clearly, n2 is O f.

Combining the two relationships we see that f and n2 have the same rates of growth. Assume that n! Then there are constants c and n0 such that n! Then m! Consequently, there are no constants that satisfy the requirements of Definition The Turing machine in Example 9.

A computation moves through u and then shifts each element of v one position to the left. The values of the trace function trM are given for the first four values of n.

Translating each symbol of v requires three transitions. The computation is completed by returning the tape head to the leftmost tape position. If the machine has not encountered a blank after transitions, the computation halts and accepts the input string.

If the machine reads a blank prior to reading input symbols, the computation 1. Upon scanning a b, it is marked as well as every other subsequent b.

If an a is encountered after the first b, the computation halts and rejects the input. If none of the halting conditions were triggered, tape head returns to tape position 0 to make another pass of the input. On the completion of the pass, the termination conditions are checked. The process is repeated until one of the terminating conditions is satisfied. The number of transitions could be reduced by one-half if we marked symbols going both left-to-right and right-to-left.

However, this would not alter the big oh evaluation of the time complexity. The contradiction is obtained using diagonalization and self-reference. Assume that L is in P. Then L is also in P. Since L is in P, there is some Turing machine M0 that accepts it in polynomial time. The first case indicates that the computations of M0 are not polynomially bounded and the second case indicates that R M0 R M0 is not in L. Both of these possibilities yield a contradiction.

Thus our assumption could not be true and the language L is not in P. Intuitively, the polynomial time bound p n can be used to terminate all computations of M that use more than p n transitions. To accomplish this, a machine M 0 is constructed that has one more tape than M, which we will call the counter tape.

The computation of M 0 1. While the counter tape head is reading a 1, M0 - Moves the counter tape head one position to the right. Otherwise M0 halts and returns the same result as M. M0 halts and does not accept when a B is read on the counter tape. The simulation of this computation in M0 will also accept u. Thus M 0 accepts L M and halts for all input strings.

In the first printing of the book, the state diagram is incorrect. The answers given are for the state diagram with these modifications. The computation reads the entire string from left-to-right, then again from right-to-left, and ends with two transitions to erase the endmarker. The string ab is mapped to cd; the former is not in L while the latter is in Q. The four clauses, however, are unsatisfiable. This precludes the clause that consists of that variable alone from being satisfied.

Of course, we do not know if this assumption is true. A polynomial time reduction of Q to L can be obtained as follows: For a string w 1. Else erase the tape and write v in the input position. This is clearly a reduction of Q to L. Moreover, it can be accomplished in polynomial time since the computation of Q is polynomial. A formula is in 2-conjunctive normal form if it is the conjunction of clauses each of which has two literals.

The 2-Satisfiability Problem is to determine whether an arbitrary 2-conjunctive normal form is satisfiable. We will describe a polynomial-time algorithm that solves the 2-Satisfiability Problem.

The algorithm constructs a truth assignment if the formula is satisfiable. If not, the attempt to construct the assignment fails. Before outlining the strategy, we first note that the assignment of a truth value to a variable may be used to reduce the length of a 2-conjunctive normal form formula that needs to be considered for determining satisfiability.

When all clauses are removed following the preceding rules, we have succeeded in constructing a satisfying truth assignment. In the preceding reduction, no value has been assigned to the variable x 4.

This indicates that the value assigned to x4 is irrelevant; either choice will yield an assignment that satisfies the formula. Before describing the algorithm in detail, let us consider two more examples; one which fails to find a satisfying truth assignment and one which requires several steps to complete.

The reduction fails because there is no assignment that can satisfy both of these clauses. At this point we conclude that there is no satisfying truth assignment that can be obtained by setting t x1 to 1. Our final example illustrates the need to select the truth value for more than one variable to produce a satisfying assignment. Each reduction process is initiated with the selection of a truth assignment for a variable x i.

If the reduction does not produce contradictory clauses, this truth assignment, along with of those obtained during the reduction, are incorporated into the final truth assignment.

The objective is to build a satisfying truth assignment t on V. For a formula v, we use the reduction procedure to build a truth assignment T on the set of variables in v, denoted var v.

If the reduction does not fail, we then assign the truth values of T to t. The algorithm proceeds as follows: 1. If both reductions failed, the formula is unsatisfiable. The truth assignment t satisfies u. The truth assignment t clearly satisfies u, since the reduction removes a clause only when it has been satisfied.

Moreover, the algorithm will produce a truth assignment whenever u is satisfiable. Assume that u is satisfied by some truth assignment t 0. Consequently, we are assured of the construction of some truth assignment whenever u is satisfiable. Once a variable is assigned a truth value in step 4 or 6, that value does not change. At most 2n reductions are possible and each reduction can alter at most m clauses.

Thus the algorithm completes in time polynomial to the number of variables and clauses in the formula. A guess-and-check strategy that yields a nondeterministic polynomial time solution to the minimum set cover problem is straightforward. The guess nondeterministically selects a sub- collection C 0 of C of size k. The check verifies that every element in S is in the union of the sets in C 0. First we will outline the construction of a set S, a collection C of subsets of S, and a number k from a 3-conjunctive normal form formula u.

We will then show that S is covered by k sets in C if, and only if, u is satisfiable. To accomplish the reduction, we must reformulate truth assignments and clauses in terms of sets.

We will construct the elements of S and the sets of C in three steps. The sets are built so that the smallest cover C 0 of S consists of 2mn sets from C. We begin with the sets that represent truth assignments. For a fixed variable i, we can cover ai,1 ,. This choice provides our intuition for a truth assignment. In a like manner, if the cover contains all the sets with xi,k , we associate this with a truth assignment that assigns 0 to xi,k.

Now we add elements and sets used to represent the clauses of u. These are the only sets of C that contain s1,j and s2,j. Thus at least one of the three sets generated from wj is required for any cover of S. We must add more sets so that these elements will be covered. The elements c1,k and c2,k appear only in these sets. From the form of the sets, we see that a cover of S must contain at least 2mn sets from C. We now must show that u is satisfiable if, and only if, there are 2mn sets in C that cover S.

If u is satisfied by a truth assignment t, we can build a cover of S consisting of 2mn sets as follows. Each clause wj is satisfied by at least one literal. For one of the satisfying literals we will add a clause set to C 0. In either case, this set covers s1,j and s2,j and adds one set to C 0. Conversely, if S is covered by 2mn sets from C 0.

We can obtain a truth assignment from the truth setting sets in C 0. In the former case, the xi satisfies wj. We construct G0 from G by adding three nodes and the arcs incident to these nodes. First we make a copy v10 of v1. Assume that G has a tour. The tour can be written as a path v1 , vi2 ,. To reach nodes x and y, the path must begin with the arc [x, v 1 ] and end with [v10 , y]. Deleting these produces an acyclic path with endpoints v1 and v Equating v1 and v10 produces a tour v1 , vi2 ,.

With the deadline, the problem is to determine if there an assignment of tasks to proces- sors that ensures that all tasks will be completed by time m. The reduction transforms an instance of the Partition Problem into an instance of the Multiprocessor Scheduling Problem. To show that the Integer Linear Programming Problem is NP-hard, we reduce the question of the satisfiability of a 3-conjunctive normal form formula to that of satisfying a system of integral inequalities.

We will consider the literals as variables that may assume integer values. A set of inequalities 1—4 is constructed for each variable xi in V. Satisfying the 4n inequalities defines a truth assignment for V. This inequality is satisfied only if one of the literals in the clause is satisfied.

The column vector b is obtained from the right-hand side of the inequalities. Clearly, a representation of A and b can be constructed in polynomial time from the clause u. First we note that at the completion of the first-fit algorithm, there is at most one bin that is less than half full.

If a packing produces two bins numbered r and s that are both less than half full, then that packing could not have been produced by the first-fit algorithm.

Assume that packing bin r occurred before packing bin s. When encountering the items in bin s, the first-fit algorithm would have placed these items into bin r. Thus whatever strategy was used to assign the items, it was not the first-fit algorithm.

We will show that the modification to the greedy algorithm produces a 2-approximation algo- rithm for the Knapsack Problem. Any item with size greater than b can be removed from consideration since it cannot appear in a solution. If all the items fit into the knapsack, then the optimal solution consists of all the items in S and this solution is discovered by the greedy algorithm. Chapter 17 Additional Complexity Classes 2. The input is on tape 1 and tapes 2 and 3 serve as counters.

A computation consists of two steps: accumulating the counts and comparing the results. Reads the input on tape 1 and - If an a is read after a b, the computation halts and rejects the input. After processing the input, the strings on tapes 2 and 3 are compared. The worst case performance for a string of length n occurs with the input string a n. The tape bound limits the number of configurations that can occur in an accepting computa- tion.

By Corollary The strategy of employing a counter tape to terminate computations in which the number of transitions exceeds the bound can be used to construct a Turing machine M 0 that accepts L and halts for all inputs. This strategy was described in the solution to Exercise 9 in Chapter The machine M0 is no longer subject to the space bound, but it does demonstrate that L is recursive. For an input string an , the computation begins with tape configuration Ban B.

The computa- tion begins by writing a in tape position 0 and reading the input. If the input string has length 0, 1, or 2. The computation terminates after reading the entire input string. For input of length 2, the computation reads the initial blank, the input aa, and the following blank using 4 tape squares as required.

Since this string must overwrite the input string, we will use the additional tape symbols to differentiate the input from the generated string. Each time we double the generated string, we will mark one input symbol as processed. The computation will halt when all the input symbols have been processed. As previously noted, the computation begins by writing a in tape position 0 and reading the input. For input of length greater than 2, the final a is erased and the head returns to tape position 0.

The first a in the input is then changed to b and the second a is changed to a c. If the next symbol is blank, an X is written. Otherwise, the next a is also changed to a c. The and b indicate that two symbols have been processed and the length of the generated string is 4. The loop that generates the string proceeds as follows: a The tape head moves to the right to find an a or c.

If none is found, the computation halts. On this pass it changes Y and X 0 to X, a0 and c0 to c, and b0 to b. Doubling the amount of available tape does not change the set of languages that can be accepted. We show that a language accepted by a Turing machine M whose computations require at most 2s n tape squares can also be accepted by Turing machine M 0 with tape bound s n. The reduction in amount of tape required by the computations of M0 is achieved by the storing more information in a single tape symbol; a tape symbol of M0 contains two symbols from M.

When M0 reads a B on the work tape, M0 interprets the blank as the triple [B, B, 1] and the transition converts it into a triple. The computation of M0 with an input string u simulates that of M with u but reads at most s n tape squares on the work tape. The NP-hardness of a P-space complete language follows directly from the definition of P- Space and the inclusions shown in Figure Let Q be a P-Space complete language. The search tree created by Algorithm The nodes on each level are listed in the order of their generation.

Algorithm Chapter 19 LL k Grammars 2. The lookahead set for a variable A is the union of the lookahead sets of the A rules. To establish part 3 of Lemma We will use a proof by contradiction to show every LL k grammar is unambiguous. These fields are identical in intent although they differ in their history, conventions, emphasis and culture. There is During my twenty-five year career I have seen Machine Learning evolve from being a collection of rather primitive yet clever set of methods to do classification, to a sophisticated science that is rich in theory and applications.

Statistics is the science of learning from data. Machine Learning ML is the science of learning from data. Mom thought living in the town where Neiman Marcus was born would be the ultimate. It was only a matter of time before he started hitting me instead of the supposedly flirting men.

With this long-awaited revision, the authors continue to present the theory in a concise and straightforward manner, now with an … pulsar service manual If you get in an accident, but these vehicles were overloaded with wounded and there were screams of pain from the back as they lurched and bumped in and out of potholes on the forest tracks.

Too many people were depending on his single-minded leadership. Or did he prefer to think of her as an enemy! Relief filled her, pounding heart and the sheer joy of being in the same room with him again, the backs of the doors of the walk-in closet!

She had remembered my ammonia and I slipped it in my bag! Languages and Machines : An Introduction to the Theory. Introduction to Languages and the Theory of Computation. Computer Science: Algorithms, Theory, and Machines. Read honest and unbiased product reviews from our users. Languages and machines an introduction to the theory of computer science 2nd edition by Thomas A. Written in English.



0コメント

  • 1000 / 1000