0% found this document useful (0 votes)
100 views4 pages

Practice Question Set 3 PDF

1. This document discusses concepts related to automata theory and formal languages including finite automata, grammars, regular expressions, and properties of different language classes. Some key points covered include: 2. Question 2 provides a finite automaton and asks which grammar rules would generate the same language as the automaton. 3. Question 5 asks about properties of DFAs and NFAs related to the languages they accept versus the complement languages. It indicates that for DFAs the two languages would be the same, but for NFAs they may not be. 4. Question 6 explains that the reason an NFA's accepted language may not be the same as its complement's language is because of the presence

Uploaded by

Parth Ranjan Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views4 pages

Practice Question Set 3 PDF

1. This document discusses concepts related to automata theory and formal languages including finite automata, grammars, regular expressions, and properties of different language classes. Some key points covered include: 2. Question 2 provides a finite automaton and asks which grammar rules would generate the same language as the automaton. 3. Question 5 asks about properties of DFAs and NFAs related to the languages they accept versus the complement languages. It indicates that for DFAs the two languages would be the same, but for NFAs they may not be. 4. Question 6 explains that the reason an NFA's accepted language may not be the same as its complement's language is because of the presence

Uploaded by

Parth Ranjan Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

THEORY OF COMPUTATION

AUTOMATA SET – 2
1. Which of the following are not equivalent to expression (a + b + c)* ?

(a) (a* + b* + c*)* (b) ((ab)* + c*)*


(c) (a* b* c*)* (d) (a* b* + c*)*

2. M = (K, Ʃ, δ, S, F) be a FA.
K = {A, B} F = {B}
δ(A, a) = A δ(B, a) = B
δ(A, b) = B δ(B, b) = A

A Grammar (V, Ʃ, P, S) is used to generate language accepted by M.


Which set of rules will make L(G) = L(M)?

(a) {A → aB, A → bA, B → bA, B → aA, B → E}


(b) {A → aA, A → bB, B → aB, B → bB, B → E}
(c) {A → bB, A → aB, B → aA, B → bA, B → E}
(d) {A → aA, A → bA, B → aB, B → bA, B → E}

3. Consider these 2 statements:

S1: LR = L, if and only if L is the language of palindromes.


where LR is obtained by reversing all the strings of L.
S2: | L1∙ L2 | = | L1 | × | L2 |

Relation?

(a) Both are F (b) Both are T


(c) S1 → T, S2 → F (d) S1 → F, S2 → T

4. Consider NFA:

What will be δ* (q0, a) ?

1
(a) {q0, q1, q2} (b) {q1, q2}
(c) {q0, q1} (d) None

5. Consider an NFA and DFA:

L(M) = Language accepted by the machine M.


L(M) = Language accepted by the compliment of the machine M i.e. making final to non-final
and vice-versa.
L(M) = Complement of language accepted by machine.

Consider:
S1: For DFA, L(M) = L(M)
S2: For NFA, L(M) = L(M)

(a) Both are True (b) Both are False


(c) S1 → T, S2 → F (d) S1 → F, S2 → T

6. Based on the answer to the above question, if for any of the machines, statement is false, what
could be the reason?

(a) Presence of ԑ- Move


(b) Dead- State Rejection
(c) Choice of State i.e. Non- determinism
(d) All of the above i.e., a, b, c

7. Which one of the following doesn’t generate same language as rest?

(i) (a+b)*a(a+b)*a(a+b)*
(ii) b * a b * a (a + b)*
(iii) (a + b)* a b* a b*
(iv) b * a (a + b)* a b*

(a) Only (ii)

(b) Only (iii)

(c) Only (iv)

(d) All regular expressions generate same language

2
8.

L1 = {am bn | m+n = Even}


L2 = {am bn | m-n = 4}

(a) L1 is Regular, L2 is Not Regular


(b) Both are Regular
(c) Both are Non- Regular
(d) L2 is Regular, L1 is Not Regular

9. Let r be any Regular Expression:


S1 → r + ϕ = r = ϕ + r
S2 → r + ԑ = r = ԑ + r

(a) Both are true (b) Both are False


(c) S1 → T, S2 → F (d) S1 → F, S2 → T

10.

L1= Set of all strings having equal number of 00 and 11.


L2= Set of all strings having equal number of 01 and 10.

(a) Both are Regular (b) Both are Context-Free


(c) L1 is regular, L2 is Context Free (d) L1 is CF, L2 is Regular

11. Suppose a Language L is accepted by Linear Bounded Automata A. Then,

(a) A always halts on all i/p’s as L is decidable.


(b) L maybe undecidable as A need not halt on all i/p
(c) L need not be Context-Sensitive Language
(d) None of the above

12. Suppose there exist a NPDA of Language L. Then

(a) There always exist a DPDA for L


(b) There doesn’t exist a DPDA for L
(c) There may or may not exist a DPDA for L
(d) None

3
13. L ⊆ Ʃ* is said to be co-finite iff their complement is finite. What can you say?

(a) All co-finite languages are regular


(b) There exist a co-finite language which is not context free
(c) There exist a co-finite language which is not decidable
(d) None of above

14. Suppose L is a context-Free Language. Then L

(a) is necessarily context-free


(b) is necessarily non-context free
(c) is necessarily context-sensitive
(d) is necessarily Recursive

15. Let G be grammar in CNF. Let w1, w2 ∈ L(G) such that |w1| < |w2|

(a) Any derivation of w1 has exactly same number of steps as any derivation of w2
(b) Some derivation of w2 may be shorter than of steps as any derivation of w1
(c) All derivations ofw1 will be shorter than any derivation of w2
(d) None

You might also like