Sie sind auf Seite 1von 17


UNIT I PART-A 1. What is a Turing Machine? Turing machine is a simple mathematical model of a computer. TM has unlimited an unrestricted memory and is a much more accurate model of a general purpose computer. The turing machine is a FA with a R/W Head. It has an infinite tape divided into cells ,each cell holding one symbol. 2.What are the difference between finite automata and Turing Machines? Turing machine can change symbols on its tape, whereas the FA cannot change symbols on tape. Also TM has a tape head that moves both left and right side, whereas the FA doesnt have such a tape head. 3. Define Turing Machine? A turing machine is a 7-tuple (Q, , , , q0, qaccept, qreject) where Q: finite set of states : input alphabet (cannot include blank symbol, _) : tape alphabet, includes and _ : transition function: Q Q {L, R} q0: start state, q0 Q qaccept: accepting state, qaccept Q qreject: rejecting state, qreject Q 4. What is configuration? Turing machine computes, changes occur in the current state, the current tape contents and the current head location.a setting of these three items is called a configuration. 5. What is a recursively enumerable language? The languages that is accepted by TM is said to be recursively enumerable (r. e ) languages. Enumerable means that the strings in the language can be enumerated by the TM. The class of r. e languages include CFLs. 6. Define variants of Turing Machine?

Variants are Non deterministic turing machine. Mutlitape turing machine. Enumerators 7. What is a multitape TM? A multi-tape Turing machine consists of a finite control with k-tape heads and ktapes each tape is infinite in both directions. On a single move depending on the state of finite control and symbol scanned by each of tape heads ,the machine can change state print a new symbol on each cells scanned by tape head, move each of its tape head independently one cell to the left or right or remain stationary. 8. Define nondeterministic TM? Arbitrarily chooses move when more than one possibility exists Accepts if there is at least one computation that terminates in an accepting state 9.What is an algorithm? An algorithm is a collection of simple instruction for carrying out some task. It is sometimes called procedures or recipes. 10.What is a polynomial? It is a sum of terms where each term is a product of certain variables and a constant called a co-efficient. Eg.6 x*x*x*y*z*z=6x3yz2 11. Define Church-Turing thesis? In 1936 Alonzo church used a notational system called -calculus to define algorithms and Alan Turing did it with his machines. These two definitions were shown to be equivalent .This connection between the informal notion and precise definition has come to be called Church-Turing thesis 12. List the types of description. Formal description. Implementation description. High-level description. 13.What is halting problem? | TM M is a TM and M accepts w }=M,w ={=A TM A is undecidable but TM A is Turing recognizable hence TM A is sometimes called the halting problem.

. 14.Define universal Turing machine. A universal Turing machine (UTM) is a TM which is capable of simulating any other Turing machine from the description of the machine. 15. What is a Diagonalization language Ld? The diagonalization language consists of all strings w such that the TM whose code is w does not accept when w is given as input. 16.Why some languages are not decidable or even Turing recognizable? The reason that there are uncountable many languages yet only countably many Turing machines. Because each Turing machine can recognize a single language and there are more languages than Turing machines, some languages are not recognizable by any Turing machine. 17. What do you mean by co-Turing-recognizable? A language is called co-Turing-recognizable if it is the complement of a Turing- recognizable language 18. Define Countable and Uncountable? A set is countable if it is finite or has the same size as N (the set of natural numbers {1, 2, 3, }) Examples: N (natural numbers), Z (integers), Q (rational numbers), E (even numbers), etc. A set is uncountable if it has more elements than N . Examples: R (real numbers) [0,1] Cantor set 19.What is a correspondence? A function that is both one-to-one and onto is called correspond. PART-B 1. Explain the various techniques for Turing machine construction. 2. Briefly explain the different types of Turing machines. 3. Design a TM to accept the language L={0n1n | n>=1} 4. Explain how a TM can be used to determine the given number is prime or not. 5. Prove that if L is recognized by a TM with a two way infinite tape if it is recognized by a TM with a one way infinite tape. 6. Prove that Halting problem is undecidable. 7. Design a Turing machine that accepts the language L={an bn cn

/n>1} 8. What are the various models of Turing Machine? 9. With an example explain the universal Turing machine 10. Show that halting problem of Turing machine is undecidable. 11. Show that a language is decidable if it is Turing-recognizable and co- recognizable UNIT II 1.What is reduction? A reduction is a way of converting one problem into another in such a way that a solution to the second problem can be used to solve the first problem. 2.What is reducibility? The primary method of proving some problems are computationally unsolvable. It is called reducibility.Reducibility always involves two problems which we call A and B. If A reduces to B, we can use a solution to B to solve A. 3. What is linear bounded automation? A linear bounded automation is restricted type of Turing machine where in the tape head isnt permitted to move off the portion of the tape containing the input. It has a limited amount of memory. 4. What is a accepting computation history? An accepting computation history is defined as , Let M be a Turing machine and w be a input string, for M on w is a sequence of configuration c1,c2, cl, Where c1 is the start configuration of M on w . cl is the accepting configuration of M and each ci legally follows from ci-1 according to the rules of M. 5. What is a rejecting computation history? Let M be a Turing machine and w be a input string , for M on w is a sequence of configuration c1, c2 , cl Where cl is a rejecting configuration of M on W . 6. Write down the algorithm that decides ALBA? The algorithm that decides ALBA is as follows: 1. L= on input {M,w} Where M is an LBA and w is a string . 1.1 Simulate M on w for qng^n steps until it halts 1.2 If M has halted accept if it has accepted and reject if it has rejected . If it has not halted , reject.

7. Write about the three conditions of computational history? Suppose consider the input B and it has possible input C1,C2. Cl. If B ants to check whether the Ci satisfy the three conditions of computational history 1. C1 is a start configuration for M on w 2. Each Ci+1 legally follows from Cp 3. Cl is an accepting configuration for M 8. What is called PCP? The phenomenon of undecidability is not confined to problems concerning automata. An undecidable problem concerning on simple manipulation of strings is called the post correspondence problem or PCP. An instance of the pcp is the collection P of dominos: P = {[t1/b1]}, [t2/b2],.. [tk/bk]} and a match is a sequence i1,i2, Where ti1,ti2.til = bi1, bi2..bil PCP={<P>/P is an instance of the post correspondence problem with a match} 9. How can we construct P so that a match is an accepting computation history for M on w? The task is to make a list of the dominos; so that the string we get by reading off the symbols on the top is same as the string of symbols on the bottom.This list is called a match. For example: [a/ab][b/ca][ca/a][a/ab] [abc/c].Reading off the top strings we get abcaaabc , which is same as reading off the bottom. 10. What is MPCP? MPCP Modified Post Correspondence Problem, in that the match is required to start with the first domino in the list. MPCP = {<P>/P is an instance of the post correspondence with a match that starts with the first domino}. 11. What is called mapping reducibility? Language A is mapping reducible to language B, written A<=B; if there is a computational function f: * * , Where for every w, w a f(w) B. 12. Define computable function? A turning machine computes a function by starting with the input to the function on the tape and halting with the output of the function on the tape a function f: * * is a computable function , if some turning machine M, on every input w, halts with just f(w) on its tape. Eg: All arithmetic operations on integers. 13. What is recursion theorem? Let T be a Turing machine that computes a function t: * x * *. There is a Turing machine R that computes a function r: * *, Where for every w :

r(w)=T(<R>,w). The recursion theorem is a mathematical result that plays an important role in advanced work in the theory of computability 14. What is self reference? The Turing machine that ignores its input and prints out a copy of its own description, we call this as SELF. There is a computable function q: * *, where for any string w, q(w) is the description of a Turing machine Pw that prints out w and then halt 15. What is computer virus? A computer virus is a computer program that is designed to spread itself among computers. Computer virus are inactive when standing alone as piece of code, but when placed appropriately in a host computer, thereby infecting it and they can become activated and transmit copies of themselves to other accessible machines.Various media can transmit viruses , including internet and transferable disks. 16. Applications of recursion theorem? 1. ATM is undecidble. 2. MINTM is not Turing recognisable 3. Fixed point theorem. 17. What is a fixed point? A fixed point of a function is a value that isnt changed by application of the function. 18. Define formula. A formula is a well formed string over this alphabet. 19. What are the Boolean operations and Quantifiers? The form of the alphabet of this language : {^,v,,(,),for all, x , there exists,R1,.Rk}.The symbols ^,v, are called Boolean operations.The symbols of for all and there exists are called Quantifiers. The symbol x denotes the variable R1,R2,..Rk ,called the relations. 20. What is atomic formula? A string of the form Ri (x1,x2,x3,..xj) is an atomic formula. The value jis the arity of the relation symbol Ri. 21. What is called Sentence/Statement and Free variable? A variable that isnt bound within the scope of a quantifier is called a Free variable. A formula with no free variable is called a Sentence or Statement. 22. What is model? A universe together with an assignment of relations to relation symbol is

called a model. A model M is a tuple (U, P1,P2..Pk), where U is the universe and P1 through Pk are the relations assigned to symbols R1 through Rk. 23. What is language of a model? Language of a model is the collection of formulae that use only the relational symbols the model assign and that use each relation symbol with the correct arity. If is a sentence in a language of a model , is either true or false in that model. 24. What is decidable theory? Let (N,+) be the model, except without x relation. Its theory is Th(N,+). For example: the formula[x+x=y] is true therefore a member of Th(N,+). 25. What is undecidable theory? Let (N, + ,X) be a model whose universe is the Natural numbers with the usual +,X relations. Church showed that Th(N,+,X) the theory of this model; is undecidable. 26. What is called Turing Reducibility? Language A is Turing reducible to language B, written A<=TB, if A is decidable relative to B. Turing reducibility is a generalization of mapping reducibility. 27. What is called Oracle Turing machine? An Oracle for a language B is an external device that is capable of reporting whether any string w is a member of B. An Oracle Turing machine is a modified Turing machine that has the additional capability of quering an Oracle. 28. What is an information? Definition of information depends upon the application. For example: A= 0101010101010101 B= 11101110111000111 Sequence A contain little information because it is merely a repetition of pattern 01 twenty times. In contrast sequence B appears to contain more information. 29. What is minimal Description? Minimal Description of x, written d(x), is the shortest string (M, w), where TM,M on input w halts with x on its tape. 30. What is Descriptive complexity? The Descriptive complexity of x, written k(x) is k(x) = |d(x)| where k(x) length of the minimal description of x. The definition of k(x) is intended to capture the amount of information in the string x.

31. When an x is a C-compressible? Let x be a string, say that x is C-compressible if k(x) <= |x| - C. PART-B 1. Explain how Post correspondence problem is undecidable? 2. Prove that HALTTM is undecidable. 3. Prove that ETM is undecidable. 4. Prove that REGULAR TM is undecidable 5. Prove that EQ TM is undecidable 6. Prove that A LBA is decidable 7. Prove that E LBA is undecidable. 8. Prove that ALL CFG is undecidable 9. State and prove PCP is undecidable 10. Prove that EQ TM is neither Turing-recognizable nor co-Turingrecognizable 11. State and prove recursion therorem 12. Explain self-reference in detail 13. Explain decidability of logical theories? 14. Write a brief note on a decidable theory? 15. Write a brief note on an undecidable theory? 16. Explain Turing reducibility? UNIT III 1. Define complexity Complexity Theory = study of what is computationally feasible (or tractable) with limited resources: running time storage space number of random bits degree of parallelism rounds of interaction others 2. Define time complexity The time complexity of a TM M is a function f:N N, where f(n) is the maximum number of steps M uses on any input of length n. 3. Define Asymptotic Notation Running time of an algorithm as a function of input size n for large

n. Expressed using only the highest-order term in the expression for the exact running time 4. What do you mean by polynomial and exponential bounds? Bounds of the form nc for c greater than 0 .such a bound are called polynomial bounds.Bounds of the form 2(n ) . s.uch a bound are called exponential bounds when is a real number greater than 0 5. What is Hamiltonian path? A Hamiltonian path in a directed graph G is a directed path that goes through each node exactly once. We consider a special case of this problem where the start node and target node are fixed. 6. List the types of Asymptotic Notation. Big Oh (O) notation provides an upper bound for the function f Omega () notation provides a lower-bound

Theta (Q) notation is used when an algorithm can be bounded both from above and below by the same function Little oh (o) defines a loose upper bound. 7. What is Hamiltonian path? A Hamiltonian path in a directed graph G is a directed path that goes through each node exactly once. We consider a special case of this problem where the start node and target node are fixed. 8. Defines brute force search Exponential time algorithms typically arise when we solve by searching through a spsce of solutions called brute force search 9. Define running time. The running time of N is the function NN, wheref(n) is the maximum of steps that N uses on any branch of its computation on any of length n. 10. Define class P The class of all sets L that can be recognized in polynomial time by deterministic TM. The class of all decision problems that can be decided in polynomial time. 11. Define class NP. Problems that can be solved in polynomial time by a nondeterministic TM.

Includes all problems in P and some problems possibly outside P. 12. Define verifier. A verifier for a language A is an algorithm V, where A = {w | V accepts <w,c> for some string c}. We measure the time of a verifier only in terms of the length of w, so a polynomial time verifier runs in polynomial time in the length of w. A language A is polynomially verifiable if it has a polynomial time verifier. The above string c, used as additional information to verify that w A, is called a certificate, or proof, of membership in A. 13. What do you mean by NP-completeness? If a polynomial time algorithm exists for any of the NP-complete problems, all problems in NP would be polynomial time solvable. These problems are called by NP-completeness 14. Define polynomial time computable functions. A function f: * is a polynomial time computable functions if some polynomial time turing machine exists that halts with just f(w) on its tape. when started on any input w. 15. Define polynomial time mapping reducible. We say that A is polynomial time mapping reducible, or simply polynomial time reducible, to B, written APB, if a polynomial time computable function f: * * exists s.t. for every string w*, wA iff f(w)B. Such a function f is called a polynomial time reduction of A to B. 16. Define literal. A literal is a Boolean variable x or a negated Boolean variable x. 17. Define clause. A clause s several literals connected with s, as in (x y z t). 18. Define conjunctive normal form. A Boolean formula is in conjunctive normal form, called a cnf-formula, if it comprises several clauses connected with s, as in (x y z t) (x z) (x y t) A cnf-formula is a 3cnf-formula if all the clauses have 3 literals, as in (x y z) (x z t) (x y t) (z PART-B 1. Show that every CFL is a member of class P problem 2. Show that a language is in NP if it is decided by some non deterministic polynomial time Turing machine.

3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

Explain the cook-Levin theorem Explain about the vertex cover problem Explain about Hamiltonian path problem. Briefly discuss about the subset sum problem? With an example explain BIG-O and SMALL-O notation Explain about Analyzing algorithms in detail? Explain CLASS P in briefly with an example? State and prove PATH P. State and prove RELPRIME P Prove that every context-free language is a member of P. Explain with an example CLASS-NP?

UNIT IV PART-A 1. Define space complexity for a deterministic Turing machine. Let M be a deterministic Turing machine that halts on all inputs. The space complexity of M is the function f:NN where f(n) is the maximum number of taps cells M scans on any input of length n be M runs in space f(n). 2. Define space complexity for a non-deterministic Turing machine. Let M is a nondeterministic Turing machine that halts on all inputs the space complexity f(n) is the maximum number of tape cells that M scans on any branch of its computation for any input of length n. 3. Define SPACE(f(n)) and NSPACE(f(n)). SPACE(f(n))={L| L is a language decided by O(f(n)) space deterministic Turing machine} NSPACE(f(n))={L| L is a language decided by an O(f(n)) space nondeterministic Turing machine} 4. State Savitchs theorem. For any function f:NR+, where f(n) n , NSPACE(f(n))sub set of SPACE(f2(n)) 5. Define PSPACE. PSPACE is the class of languages that are decidable in polynomial on a deterministic turing machine. PSPACE(nk) 6. What are the conditions for a language to be in PSAPCE complete?. a. B is in PSPACE b. Every A in PSPACE is polynomial time reducible to B 7. What do you mean by PSPACE Hard? If a language B satisfies the condition that every A in PSPACE is

Polynomial time reducible to B. 8. What do you mean by quantified Boolean formula? = V x y[(x V y) (x V y) 9. Define TQBF. The TQBF problem is to determine whether a fully quantified formula is true or false. 10. Give some example for PSPACE Complete problems. a. TQBF= { < > | is a true fully quantified Boolean formula} b. FORMULA GAME= {< > | player E has a winning strategy in the formula game associated with } c. GG= { <G, b> | Player I has a winning strategy for the generalized geography game played on graph G starting at node b} 11. Define L class of languages L is the class of languages that are decidable in logarithmic space on a deterministic Turing machine L=SPACE(logn) 12. Define NL class of languages. It is the class of languages that are decidable in logarithmic space on a nondeterministic Turing machine. L=NSPACE(logn) 13. What are the components of configuration of M on w. a. Setting of the state b. Work tape c. Positions of the two tape head 14. What are the components of a log space transducer a. Read only input tape b. Write only output tape c. Read/write worktape 15. What is log space reducibility? Language A is log space reducible to language B, written AL B, if A is mapping reducible to B of a log space computable function f. f is called computable function. 16. What are the conditions for a language to be NL complete? a. B NL and b. Every A in NL is log space reducible to B. 17. Give an example for NL Complete problems. PATH={ <G,s,t> | G is a directed graph that has been directed path from s to t} 18. What is the basic idea for hierarchy theorems? Hierarchy theorems form a hierarchy whereby the classes with larger bounds contain more languages than do the classes with smaller bounds.

Eg Turing machines should be able to decide more languages in time n3 then they can in time n2 19. State hierarchy theorem. For any space constructible function f:NN, a language A exists that decidable in O(f(n)) space but not in O(f(n)) space. 20. When a function is called space constructible function. A function f:NN where f(n) is atleat O(logn) is called space constructible if the function that maps the string 1n to the binary representation of f(n) is computable in space O(f(n)). PART-B 1. State and prove Savitchs theorem 2. Prove the following theorems a. TQBF is PSPACE Complete b. FORMULA GAME IS PSPACE complete c. GG is PSPACE Complete 3. Prove the following a. PATH is NL Complete b. NL= coNL 4. State and prove space hierarchy theorems 5. State and prove time hierarchy theorems 6. Prove the following theorems a. An oracle A exists whereby PA NPA b. An oracle B exists whereby PB NPB 7. Prove the following theorem t : NN be a function where t(n)n. if A TIME(t(n)), then A has circuit complexity O(t2(n)) 8. Prove the following CIRCUIT SAT is NP Complete 3SAT is NP complete.


What do u mean by optimization problem?

Optimization problem seek the best solution among a collection of possible solutions. 2 What are the nature of approximation problem? approximation problem is designed to find approximately optimal solutions. 3 What is minimization and maximization problem? Minimization problem aims to find the smallest among the collection of possible solutions. E.g. IN-VERTEX-COVER. Maximization seeks the largest solutions. 4 What do you mean by cut and uncut edge of a graph? A cut in an undirected graph is a separation of the variables V into 2 disjoint sets S and T. A cut-edge is an edge that goes between a node in S and a node T. uncut edge is an edge that is not a cut edge. 5 What is mean by k-optimal solution ? An approximation algorithm for a minimization problem is k-optimal if it always finds a solution that is not more than k times optimal. 6 What is probabilistic Turing Machine? A probabilistic Turning machine M is a type of nondererministic Turning machine in which each nondrministic Turning machine in which each nondeterministic step is called a coin-flip step and has 2 legal moves .We assign a probability to each branch b of Ms computation on input w as follows. The probability of branch b be Pr[b]= .Where k is the number of coin flip steps that occur on branch b. The probability that M accepts w to be Pr[M accepts w ] = 7 Define BPP? BPP is the class of languages that are recognized by probabilistic polynomial time turing machine with error probability f1/3.

8 When 2 numbers are said to equivalent modulo p ? For any p>1 two numbers are equivalent modulo p if they differ by a multiple of p. If x and y are equivalent module p, they are represented as xy(mod p). 9 What is the need for fermet test? Fermets test is used to check the primality of a number. Fetmet test is for a number p is 1(mod p).If p passes the test it is a prime number otherwise not. 10 What we call a number to be pseudoprime? A number is called pseudoprime if it passes Fermet testes for all smaller a relatively prime to it. 11 What is the Chinese remainder theorem? A one to one correspondence exists between Zpq and Zp x Zq id p and q are relatively prime. Each number r Zpq corresponds to a pair (a,b) where aZp and b Zq such that ra(mod p) and ra(mod q). 12 What is RP? RP is the class of languages that are recognized by probabilistic polynomial time turing machines where inputs in the languages are accepted with probability of at least and inputs are not in the language are rejected with probability of 1. 13 What is branching problem ? A branching problem is a directed acycle graph where all nodes are labeled by variables except for output nodes labeled 0 or 1. The nodes are labeled by variables are called query nodes. 14 What is read once branching program? A read once branching program is one that can query each variable at most one time on every directed path from the start node to an output node. 15 What is an alternating Turing machine? An Alternating Turning machine is a nondeterministic Turing machine with an additional feature. Its states except for and are divided into universal and existential states. 16 What are alternating time and space complexity classes? ATIME(t(n))={L|L is decided by an O(t(n)) time alternating Turing machine}.

ASPACE(t(n))={L|L is decided by an O(f(n)) space alternating Turing machine}. 17 What is alternating Turing machine alternating Turing machine? An alternating Turning machine is an alternating Turing machine that contains atmost i runs of universal or existential steps starting at existential steps. alternating Turing machine is an alternating Turing machine that contains atmost i runs of Universal or existential steps starting at Universal steps. 18 What are the components of Interactive Proof systems? a.verifier b. Prover c.Interaction between verifier and prover. 19 When the language is said to be in interactive proof systems or IP systems? A language is in IP if some polynomial time function V and arbitrary P exist where for every function and string w. a. wA implies Pr[V P accepts w] and b. w A implies Pr[V accepts w ] . 20 What is a parallel computer? A parallel computer can perform multiple operations simultaneously.

PART-B 1 Prove the following theorems a. A is Polynomial time algorithm that produces a vertex cover of G that is no more than twice as large as a smallest vertex cover b. B is a polynomial time 2-optimal approximation algorithm for MAX-CUT 2 Explain the algorithm to determine whether a number is prime or pseudoprime 3 Prove that EQRPQB is in BPP 4 Prove the following theorems

1. For f(n)n we have ATIME(f(n)) sub set of SPACE(f(n))sub set of ATIME(f2(n)) 2. For f(n) logn we have ASPACE(f(n))=TIME(2O(f(n))) 5 Explain interactive proof (IP) system model. 6 Explain the theorem IP=PSPACE. 7 Explain parallel computation 8 Explain cryptography