Discrete 2 Final Review
If every string of a language can be determined wheter it is legal or illegal in finite time the language is called A. Decidable B. Undecidable C. Interpretive D. Non deterministic E. None of the above
A
L=Σ∗ is undecidable if A. L is context free but not regular B. L is regular C. It does not matter the type of L D. None of the above
A
Recursive languages are A. A proper superset of CFL B. Always recognized by PDA C. Are also called type 0 languages D. Always recognized by FSA E. None of the above
A
The statement, "A TM can't solve the halting problem" is A. True B. False C. Still an open question D. All of these
A
Which of the following denotes the Chomskian hierarchy? A. REG->CFL->CSL->type0 B. CFL->REG->type0->CSL C. CSL->type0->REG->type0 D. CSL->CFL->REG->type0 E. None of the above
A
Which of the following is complement of a A. Recursive language is recursive B. Recursively enumerable language is recursively enumerable C. Recursive language is either recursive of recursively enumerable D. a. and b. E. None of the above
A
Assume the statements S1 and S2 are defined as S1: L2-L1 is recursive enumerable where L1 and L2 are recursive and recursive enumerable respectively S2: The set of all Turing machines is countable Which of the following are true? A. S1 is correct and S2 is not correct B. Both S1 and S2 are correct C. Both S1 and S2 are not correct D. S1 is not correct and S2 is correct E. None of the above
B
Consider the following CFG S->aB | bA B->aBB | bS | b A->bAA | aS | a Consider the following derivation S->aB S->aaBB S->aaBb S->aabSb S->aabbAb S->aabbab The derivation is A. A leftmost derivation B. A rightmost derivation C. Both leftmost and rightmost derivation D. Neither leftmost or rightmost derivation E. None of the above
B
Consider the following language L={a^n b^n c^n d^n | n >=1} is: A. CFL but not regular B. CSL but not CFL C. Regular D. Type 0 language but not type 1 E. None of the above
B
Consider the following statements I. Recursive languages are closed under complementation II. Recursively enumerable languages are closed under union III. Recursively enumerable languages are close under complementation Which of the above statements are true? A. I only B. I and II C. I and III D. II and III E. None of the above
B
Consider the following statements: I. Recursive languages are closed under complementation II. Recursively enumerable languages are closed under union III. Recursively enumerable languages are closed under complementation Which of the above statements are true? A. I only B. I and II C. II and III D. I and III E. None of the above
B
Function x*y defined as x*0=0 x*(y+1)=x*y+x is an example of A. A base function B. A primitive recursive function C. A µ-recursive function D. An undecided function E. None of the above
B
If there exists a language L, for which there exists a TM, T, that accepts every word in L and either rejects or loops for every work that is not in L, L is called A. Recursive B. Recursively enumerable C. NP-HARD D. None of these
B
The following grammar G = {N, T, P, S} where N={S,A,B}, T={a,b,c}, P = S->aSa S->aAa A->bB B->bB B->b A. Is type 3 B. Is type 2 but not type 3 C. Is type 1 but not type 2 D. Is type 0 but not type 1 E. None of the above
B
The running time T(n), where n is input size of a recursive function T(n) = {c + T(n - 1) if n > 1, d if n <= 1} The order of the algorithm is A. n^2 B. n C. n^3 D. n^n E. log n
B
There exists a TM which when applied to any problem in the class, teminates, if correct answer is yes and may or may not terminate otherwise is called A. Stable B. Unsolvable C. Partially solvable D. Unstable
B
Which of the following CF language is inherently ambiguous? A. {a^n b^n c^m d^m | n, m >= 1} B. {a^n b^m c^p d^q | n = p or m = q, n, m, p, q >= 1} C. {a^n b^m c^p d^q | n >= m >= p >=q} D {a^n b^m c^p d^q | n <= m <= p <= q} E. All of the above
B
Bounded minimization is a technique for A. Proving whether a primitive recursive function is Turing computable or not B. Proving whether a primitive recursive function is a total function or not C. Generating primitive recursive functions D. Generating partial recursive functions
C
Hilbert's Tenth asking ofr an algorithm to find integral roots of polynomials with integral coefficients, is A. Decidable B. Undecidable C. Semi-decidable D. Not a computation problem E. Does not exist
C
Recursively enumerable languages are not closed under A. Union B. Homomorphism C. Complementation D. Concatenation E. None of the above
C
Suppose S != {}, i.e., S!=∅, then the following are equivalent except A. S is re B. S is the range of a primitive recursive function C. S is the same class of language as TOTAL D. S is the domain of a partial recursive function E. S is the range/domain of a partial recursive function whose domain is the same as its range and which acts as an identity when it converges
C
The following CFG is in S->AB B->CD | AD | b D->AD | d A->a C->a A. Comsky normal form but not strong Chomsky normal form B. Weak Chomsky normal form but not Chomsky normal form C. Strong Chomsky normal form D. Greibach normal form E. None of the above
C
The following grammar G={N,T,P,S} where N={S,A,B,C,D,E}, T={a,b,c}, P = S->aAB AB->CD CD->CE C->aC C->b bE->bc A. Is type 3 B. Is type 2 but not type 3 C. Is type 1 but not type 2 D. Is type 0 but not type 1 E. None of the above
C
The set N(natural numbers) and R(real numbers) are respectively A. Both countably finite B. Both countably infinite C. Countably infinite and uncountably infinite D. Both uncountably infinite E. None of the above
C
Which of the following problems is solvable? A. Writing a universal Turing machine B. Determining if an arbitrary Turing machine is a universal Turing machine C. Determining if a universal Turing machine can be written for fewer than k instructions for some k D. Determining if a universal Turing machine and some input will halt E. None of the above
C
Consider a language L for which there exists at Turing machine, T, that accepts every word in L and either rejects or loops for every word that is not in L. The language L is A. NP hard B. NP complete C. Recursive D. Recursively enumerable E. None of the above
D
The following CFG is in S-> aBB B-> bAA | b A-> a A. Comsky normal form but not strong Chomsky normal form B. Weak Chomsky normal form but not Chomsky normal form C. Strong Chomsky normal form D. Greibach normal form E. None of the above
D
The next move function δ of a Turing machine M = (Q, Σ, Γ...) A. δ : Q X Σ → Q X Γ B. δ : Q X Γ → Q X Σ X {L, R} C. δ : Q X Σ → Q X Γ X {L, R} D. δ : Q X Γ → Q X Γ X {L, R}
D
Which of the following is not primitive recursive but partially recursive? A. Carnot function B. Rieman function C. Bounded function D. Ackermann's function E.None of the above
D
Which of the following is the most general phrase structured grammar? A. Regular B. Context-sensitive C. Context-free D. None of the above
D
Which of the following problem is undecidable? A. Membership problem for CFL B. Membership problem for regular sets C. Membership problem for CSL D. Membership problem for type 0 languages E. None of the above
D
Which of the following problems are decidable? 1. Does a given program ever produce an output? 2. If L is a context free language, then, is ~L also context free? 3. If L is a regular language, then, is !L also regular? 4. If L is a recursive language, then, is ~L also recursive? A. 1, 2, 3, 4 B. 1, 2 C. 2, 3, 4 D. 3, 4 E. None of the above
D
Which of the following statements is false? A. Halting problem of Turing machines is undecidable B. Determining whether a context-free grammar is ambiguous is undecidable C. Given two arbitrary context-free grammars G1 G2 and it is undecidable whether L(G1) = L(G2) D. Given two regular grammars G1 G2 and it is undecidable whether L(G1) = L(G2) E. All of the above
D
Which of the following statements is wrong? A. Any regular language can be generated by context-free grammar B. Some non-regular languages cannot be generated by any CFG C. The intersection of a CFL and a regular set is a CFL D. All non-regular languages can be generated by CFGs. E. None of the above
D
CSGs are not closed under A. Init B. Final C. Mid D. Quotient with regular sets E. None of the above
E
The following languages are undecidable except A. For type 0, emptiness and even membership problems B. Membership in L1/L2, L1 and L2 CFLs C. L regular, for CFL(CSL), L D. ~L CFL, for CFL, L? E. All of the above
E
Which of the following is not the correct statement(s)? i. Every context sensitive language is recursive. ii. There is a recursive language that is not context sensitive. A. i is true, ii is false B. i is true and ii is true C. i is false, ii is false D. i is false and ii is true E. None of the above
E
Which of the following statement(s) is/are correct? A. L= {a^n b^n a^n | n = 1, 2, 3...} is recursively enumerable B. Recursive languages are closed under union C. Every recursive language is closed under union D. None of these E. A,B, and C
E