Final Exam Discrete 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following statement(s) is/are correct? - L = {anbnan | n = 1,2,3 ...} is recursive enumerable - Recursive languages are closed under union - Every recursive is closed under union - None of these - (a), (b), and (c)

(a), (b), and (c)

Which is NOT the correct statement(s)? (i) Every context sensitive language is recursive. (ii) There is a recursive language that is not context sensitive. - (i) is true, (ii) is false - (i) is true and (ii) is true - (i) is false, (ii) is false - (i) is false and (ii) is true - None of the above

(i) is true and (ii) is true

The Halting problem - Given an arbitrary program P, in some language L, and an input x to P,will P eventually stop when run with input x? can be defined as - 1 if ϕp(x) is defined Halt(P,x) = 0 if ϕp(x) is not defined - 1 if ϕp(x) is not defined Halt(P,x) = 0 if ϕp(x) is defined - terminates if ?p(x) is defined Halt(P,x) = runs forever if ?p(x) is not defined - None is in the correct form - Cannot be formulated using μ-recursive function.

1 if ϕp(x) is defined Halt(P,x) = 0 if ϕp(x) is not defined

Which of the following problems are decidable? 1) Does a given program ever produce an output? 2) If L is context-free language, then, is ~L also context free? 3) If L is regular language, then, is ~L also regular? 4) If L is recursive language, then, is ~L also recursive? - 1, 2, 3, 4 - 1, 2 - 2, 3, 4 - 3, 4 - None of the above

3, 4

?

?

??

??

????

????

Function x * y defined as x * 0 = 0 x * (y+1) = x*y + x Is an example of - A base function - A primitive recursive function - A u-recursive function - An undefined function - Not a function

A primitive recursive function

Recursive languages are - A proper superset of CFL - Always recognized by PDA - Are also called type 0 languages - Always recognized by FSA - None of the above

A proper superset of CFL

Which of the following is not primitive recursive but partially recursive? - Carnot function - Riemann function - Bounded function - Ackermann's function - None of the above

Ackermann's function

Which of the following statements is wrong? - Any regular language can be generated by context-free grammar - Some non-regular languages cannot be generated by any CFG - The intersection of a CFL and a regular set is a CFL - All non-regular languages can be generated by CFGs. - None of the above

All non-regular languages can be generated by CFGs.

CSGs are not closed under: - Init - Final - Mid - Quotient with regular sets - All of the above

All of the above

Suppose A B, where A and B denote two problems one of which is known to be (un)decidable . Which of the following statement is correct? - If A is undecidable, so is B - If B is undecidable, so is A - A is no harder to solve than B - All of the above - None of the above

All of the above

Assume statements S1 and S2 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 is true? - S1 is correct and S2 is not correct. - Both S1 and S2 are correct. - Both S1 and S2 are not correct. - S1 is not correct and S2 is correct. - None of the above.

Both S1 and S2 are correct.

Consider the following language L = {anbncndn | n >= 1}. L is: - CFL but not regular - CSL but not CFL - Regular - Type 0 language but not type 1 - None of the above

CSL but not CFL

Recursively enumerable languages are not closed under - Union - Homomorphism - Complementation - Concatenation - None of the above

Complementation

Which of the following is the most general phase structured grammar? - Regular - Context-sensitive - Context free - None of the above - None of the above (duplicated for some reason)

Context-sensitive

Set N (natural numbers) and R (real numbers) are respectively: - Both countably finite - Both countably infinite - Countably infinite and uncountably infinite - Both uncountably infinite - Have the same cardinality

Countably infinite and uncountably infinite

If every string of a language can be determined whether it is legal or illegal in finite time the language is called: - Decidable - Undecidable - Interpretive - Non Deterministic - None of the above

Decidable

Bounded minimization is a technique for - Proving whether a primitive recursive function is turning commutable or not - Proving whether a primitive recursive function is a max commutable or not - Generating primitive recursive functions - Generating partial recursive functions

Generating primitive recursive functions

Which of the following statements is false? - Halting problem of Turing machine is undecidable - Determining wheter a context-free grammer is ambiguous is undecidable - Given two regular grammar G1,G2, it is undecidable whether L(G1)= L(G2)

Given two regular grammar G1,G2, it is undecidable whether L(G1)= L(G2)

The following CFG is in: S→ aBB B→ bAA | b A→ a - Chomsky normal form but not strong Chomsky normal form - Weak Chomsky normal form but not Chomsky normal form - Strong Chomsky normal form - Greibach normal form - None of the above

Greibach normal form

Consider the following statements I. Recursive languages are closed under complementation II. Recursive enumerable languages are closed under union III. Recursive enumerable languages are closed under complementation Which of the above statement are TRUE? - I only - I and II - I and III - II and III

I and II

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? - I only - I and II - II and III - I and III - None of the above

I and II

L = Σ is undecidable if - L is contact free but not regular - L is regular - It does not matter the type of L - None of the above

L is contact free but not regular

Which of the following problem is undecidable? - Membership problem for CFL - Membership problem for regular sets - Membership problem for CSL - Membership problem for type 0 languages - None of the above

Membership problem for type 0 languages

A total recursive function is a = Partial recursive function - Primitive recursive function - Both a and b - None of these

None of these

If there exists a TM which when applied to any problem in the class, terminates, if correct answer is yes and may or may not terminate otherwise is called - Stable - Unsolvable - Partially solvable - Unstable

Partially solvable

Which of the following denotes Chomskian hierarchy? - REG → CFL → CSL → type0 - CFL → REG → type0 → CSL - CSL → type0 → REG → CFL - CSL → CFL → REG → type 0

REG → CFL → CSL → type0

Which of the following is a complement of a? - Recursive language is recursive - Recursively enumerable language is recursively enumerable - Recursive language is either recursive or recursive enumerable - None of the above

Recursive language is either recursive or recursive enumerable

Consider a language L for which there exists a Turing machine, T, that accepts every word in L and either rejects or loops for every word that is not in L. The language is - NP hard - NP complete - Recursive - Recursively enumerable - None of the above

Recursively enumerable

If there exists a language L, for which there exists a TM, T, that accepts every world in L, and either rejects or loops for every word that is not in L, L is called - Recursive - Recursively enumerable - NP-Hard - None of these

Recursively enumerable

Suppose S != {} then the following are equivalent except: - S is re - S is the range of a primitive rec. Function - S is the same class of languages as TOTAL - S is the domain of a partial rec. Function - S is the range/domain of a partial rec Function whose domain is the same as its range and which acts as an identity when it converges

S is the same class of languages as TOTAL

Hilbert's Tenth asking for an algorithm to find the integral roots of polynomials with integral coefficients, is - Decidable - Undecidable - Semi-Decidable - Not a computation problem - Does not exist

Semi-Decidable

The following languages are undecidable except: - For Type 0, emptiness and even the membership problems. - Membership in L1/L2, L1 and L2 CFLs - L regular, for CFL (CSL), L - ~L CFL, for CFL, L? - They are all undecidable

They are all undecidable

The statement, "A TM can't solve halting problem" is - True - False - Still an open question - All of these

True

The following CFG is in: S→ AB B→ CD | AD | b D→ AD | d A→ a C→ a - Chomsky normal form but not strong Chomsky normal form - Weak Chomsky normal form but not Chomsky normal form - Strong Chomsky normal form - Greibach normal form - None of the above

Weak Chomsky normal form but not Chomsky normal form

Which of the following problems is solvable? - Writing a universal Turing machine - Determining of an arbitrary Turing machine is a universal Turing machine -Determining of a universal Turing machine can be written for fewer than k instructions for some k - Determining of a universal Turing machine and some input will halt - None of the above

Writing a universal Turing machine

10. Consider the following CFG S→ aB | bA B→ aBB | bS | b A→ bAA | aS | a Consider the following derivation S→ aB → aaBB → aaBb → aabSb → aabbAb → aabbab - a leftmost derivation - a rightmost derivation - both leftmost and rightmost derivation - neither leftmost nor rightmost derivation - none of the above

a rightmost derivation

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 is: - is type 3 - is type 2 but not type 3 - is type 1 but not type 2 - is type 0 but not type 1 - None of the above

is type 1 but not type 2

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 → c is: - is type 3 - is type 2 but not type 3 - is type 1 but not type 2 - is type 0 but not type 1 - None of the above

is type 2 but not type 3

The running time T(n), where 'n' is input size of a recursive algorithm, is given as T(n) = c + T( n - 1), if n > 1 = d, if n <= 1 The order of the algorithm is: - n^2 - n - n^3 - n^n - log n

n

Which of the following CF languages is inherently ambiguous? - {anbncmdm | n, m >= 1} - {anbmcpdq | n=p or m=q, n,m,p,q >= 1} - {anbmcpdq | n >= m >= p >= q } - {anbmcpdq | n <= m <= p <= q } - All of the above

{anbmcpdq | n=p or m=q, n,m,p,q >= 1}

Next move function of a Turing machine M = {Q, Σ, Γ, δ, q0, B, F} is a mapping - δ : Q x Σ -> Q x Γ - δ : Q x Γ -> Q x Σ x {L, R} - δ : Q x Σ -> Q x Γ x {L,R} - δ : Q x Γ -> Q x Γ x {L,R}

δ : Q x Γ -> Q x Γ x {L,R}


Set pelajaran terkait

Chapter 1 Quiz Question Bank - CIST1601 - Information Security Fund

View Set

P3: Chapter 26 : Infectious Disease

View Set

NSCI 115 CH 24 "Environmental Policy, Law, and Planning"

View Set

Cognitive Psychology Chapter 5 Self-Test Quiz

View Set

California Hunter Safety - Unit 7 Quiz

View Set