Solutions To Set 6
Solutions To Set 6
SOLUTIONS
1. Consider this R.E. = (0 + 1)* (00 + 11)
What will be the number of states in minimal DFA and NFA?
Explanation:
2. Number of states in minimal DFA to accept the language (a + aaa)* over Ʃ = {a, b} ?
(a) 1 (b) 2
(c) 3 (d) None
Explanation:
(a + aaa)* ≡ a*
1
S1: There doesn’t exist FA for every CFL.
S2: Let Ʃ = {a, b} and L = {an w an | n ≥ 1, w ∈ Ʃ*}. Then L is context free but not regular.
Explanation:
S1: Consider L1 = {anbn | n ≥ 1}, is a CFL but not Regular.
S2: We can consider the language as set of strings starting and ending with a, since w is known to
be in Ʃ*, considering everything after first a and before last a as w.
So, it is regular.
Explanation:
S1 → F
S2 → T
r1 represents strings of length atmost 100.
5. r1 = (01 + 1)* (ԑ + 0)
r2 = (0 + ԑ) (10 + 1)*
2
Solution: Option (a)
Explanation:
Both are regular expression represents strings with no consecutive zeroes.
6. What will be number of states in DFA to represent the regular expression r1 = (01 + 1)* (ԑ +
0)?
(a) 2 (b) 3
(c) 4 (d) 5
Explanation:
Let us consider the DFA for the language that accepts all the strings with consecutive 0’s.
Explanation:
S1: NTM ≡ DTM
S2: 𝐿̅ is Recursive.
L is ?
3
Solution: Option (a)
Explanation:
We just need 13 states to remainders (0, 1, . . . 12). We start by state with 0 remainder and as we
visit new character, we change state to next remainder.
Explanation:
Not possible to check for w as stack will be empty after checking for a and b.
10. Which of the following is true for i/p alphabet Ʃ and tape alphabet Γ of a standard TM?
Explanation:
Γ always contains members of Ʃ and special Block symbol also, which is not in Ʃ.
(a) Decidable
(b) Turing-recognizable but may not be decidable
(c) May not be Turing recognizable
(d) None of above
Explanation:
We can build a TM for union but decidability may not always be guaranteed.
4
12.
Consider u = abbaba
v = bab
w = aabb
Explanation:
The grammar generates all palindromes with alphabet {a,b}
5
Explanation:
⊛ (b) is not because aab is rejected.
Explanation:
(a) is CSL.
(b) & (c) are accepted by DPDA.
17. Which of the following statements about regular languages is Not true?
Consider L = 0*1*, which is regular, L1 = {0n1n, n>1} is a subset of L but not regular.
S → aSAb | ԑ
A → bA | ԑ
Grammar generates:
6
Solution: Option (b)
Explanation:
Verify using aab. It is getting rejected.
S → bS | aA | ԑ
A → aS | bA
Explanation:
M – N equivalent classes are actually the number of states in FA.
i. (00)* (ԑ + 0)
ii. (00)*
iii. 0*
iv. 0(00)*
7
Explanation:
(a) all binary strings with unequal number of 0’s and 1’s
(c) all binary strings with exactly 1 more 0’s than the number of 1’s
or one more than number of 0’s
Explanation:
init (L) = (0+1)*