wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

TAFL Quiz-3 (Module-2)

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.

Let G be a CFG in Chomsky Normal form (CNF). In order To derive a string of terminals of length n , the number of productions to be used is:

a)

2n + 1

b)

2n - 1

c)

2n

d)

None of these

2.

Recursively enumerable languages are not closed under:

a)

Complementation

b)

Union

c)

Intersection

d)

none of these

3.

Which of the following statement is wrong?

a)

Every recursive language is recursively enumerable.

b)

A language is accepted by FA if and only if it is context free.

c)

Recursive languages are closed under intersection

d)

A language is accepted by FA if and only if it is right linear.

4.

Which of the following is true?

a)

The complement of a recursive language is recursive.

b)

The complement of a recursively enumerable language is recursively enumerable.

c)

The complement of a recursive language is either recursive or recursively enumerable.

d)

The complement of a context-free language is context-free.

5.

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 word that is not in L, is called:

a)

Recursive

b)

Recursively enumerable

c)

NP-HARD

d)

None of these

6.

Universal TM influenced the concept of:

a)

interpretative implementation of programming language.

b)

stored program computers.

c)

computability.

d)

all of these.

7.

Which of the following statements is/are true?

I. Recursive languages are closed under complementation.

II. Recursively enumerable languages are closed under union.

III. Recursively enumerable languages are closed under complementation.

a)

I only

b)

II only

c)

I and II

d)

None of these

8.

Type 0 Grammar is accepted by:

a)

PDA

b)

DFA

c)

LBA

d)

Turing Machine

9.

Which one of the following string(s) is accepted by the above TM?

a)

aabbb

b)

aabbaaaa

c)

abbb

d)

ab

10.

How many derivation trees will be possible for the string w = aabbab for the following CFG.

S ⟶ aB | bA

A ⟶ a | aS | bAA

B ⟶ b | bS | aBB

a)

2

b)

3

c)

4

d)

5

11.

A turing machine that is able to simulate other turing machines:

a)

Nested Turing machines

b)

Universal Turing machine

c)

Counter machine

d)

None of the mentioned

12.

Which of the problems are unsolvable?

a)

Halting problem

b)

Boolean Satisfiability problem

c)

Both (a) and (b)

d)

None of the mentioned

13.

Which of the following a turing machine does not consist of?

a)

input tape

b)

head

c)

state register

d)

none of the mentioned

14.

The value of n if turing machine is defined using n-tuples:

a)

6

b)

7

c)

8

d)

5

15.

If d is not defined on the current state and the current tape symbol, then the machine ______

a)

does not halts

b)

halts

c)

goes into loop forever

d)

none of the mentioned

16.

Statement: Instantaneous descriptions can be designed for a Turing machine. State true or false:

a)

True

b)

False

17.

Which of the following are the models equivalent to Turing machine?

a)

Multi tape turing machine

b)

Multi track turing machine

c)

Turing machine with stay option

d)

All of the mentioned

18.

A language L is said to be ____________ if there is a turing machine M such that L(M)=L and M halts at every point.

a)

Turing acceptable

b)

decidable

c)

undecidable

d)

none of the mentioned

19.

The language accepted by a turing machine is called ____________

a)

Recursive Ennumerable

b)

Recursive

c)

Both (a) and (b)

d)

None of the mentioned

20.

Decidable can be taken as a synonym to:

a)

non recursive

b)

recognizable

c)

recursive

d)

none of the mentioned

21.

The problems which have no algorithm, regardless of whether or not they are accepted by a turing machine that fails to halts on some input are referred as:

a)

Decidable

b)

Undecidable

c)

Computable

d)

None of the mentioned

22.

An algorithm is called efficient if it runs in ____________ time on a serial computer.

a)

polynomial

b)

non polynomial

c)

logarithmic

d)

none of the mentioned

23.

Recursive languages are also known as:

a)

undecidable

b)

decidable

c)

sometimes decidable

d)

none of the mentioned

24.

Which of the following statements is/are FALSE?

1. For every non-deterministic Turing machine,

there exists an equivalent deterministic Turing machine.

2. Turing recognizable languages are closed under union

and complementation.

3. Turing decidable languages are closed under intersection

and complementation.

4. Turing recognizable languages are closed under union

and intersection.

a)

1 and 4 only

b)

2 only

c)

1 and 3 only

d)

3 and 4 only

25.

Let L1 be a recursive language. Let L2 and L3 be languages that are recursively enumerable but not recursive. Which of the following statements is not necessarily true?

(A) L2 – L1 is recursively enumerable.

(B) L1 – L3 is recursively enumerable

(C) L2 ∩ L1 is recursively enumerable

(D) L2 ∪ L1 is recursively enumerable

a)

A

b)

B

c)

C

d)

D

26.

Let L1 be a recursive language, and let L2 be a recursively enumerable but not a recursive language. Which one of the following is TRUE?

L1' --> Complement of L1

L2' --> Complement of L2

a)

L1' is recursive and L2' is recursively enumer­able

b)

L1' is recursive and L2' is not recursively enumerable

c)

L1' and L2' are recursively enumerable

d)

L1' is recursively enumerable and L2' is recursive

27.

Which among the following is the format of unit production?

a)

B->Aa

b)

A->b

c)

A->B

d)

None of the mentioned

28.

Given grammar:

S->aA

A->a

A->B

B-> A

B->bb

Which of the following is the production of B after simplification by removal of unit productions?

a)

A

b)

bb

c)

aA

d)

A| bb

29.

Given grammar G:

S-> ABA, A->aA|e, B-> bB|e

Eliminate e and unit productions. State the number of productions the starting variable holds?

a)

6

b)

7

c)

9

d)

8

30.

Given grammar G:

S-> A| B| C

A-> aAa| B

B-> bB|bb

C->aCaa|D

D->baD|abD|aa

Eliminate e and unit productions and state the number of variables left?

a)

4

b)

5

c)

8

d)

7