Tut-2 Questions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CS F351 Theory of Computation

Tutorial-2

Problem 1 Design a DFA for the language, over Σ = {a, b}, such that all strings in the language

contain even number of a's and each a is followed by at least one b.

Problem 2 Construct NFA for the following languages:

(a) L1 = {x ∈ {0, 1}∗ | x contains the equal number of occurrences of 01 and 10 . }

(b) (∗) L2 = {x ∈ {0, 1}∗ | x contains two 0s separated by a substring whose length is a multiple of 3}.

Problem 3 Consider the language A = {w ∈ {0, 1}∗ | w starts with 0 but does not end with 00}
over alphabet Σ = {0, 1}. Design an NFA M such that L(M ) = A.

Problem 4 Let A be a language over alphabet Σ = {0, 1} such that w ∈ L if and only if the second
symbol of w is 0 and the second last symbol is 1. Design an NFA M such that L(M ) = A.

You might also like