ToC Test Questions
ToC Test Questions
zeros} is *
2 points
(A) (1 + 010)*
(B) (01 + 10)*
(C) (1 + 010)* (0 + λ)
(D) (1 + 01)* (0 + λ)
TOC Test 1
* Required
Email address *
(1) L1 ⊆ L2 ⊆ L3 ⊆ L4
(2) (2) L2 ⊆ L1 ⊆ L3 ⊆ L4
(3) L1 ⊆ L2 ⊆ L4 ⊆ L3
(4) (4) L2 ⊆ L1 ⊆ L4 ⊆ L3
6. let r = a(a + b)*, s = aa*b and t = a*b be three regular expressions.Consider the
following:(i) L(s) ⊆ L(r) and L(s) ⊆ L(t)(ii) L(r) ⊆ L(s) and L(s) ⊆ L(t)Choose the
correct answer from the code given below:Code: *
2 points
7. Consider the language L given byL = {2nk ∣ k>0, and n is non-negative integer
number}The minimum number of states of finite automaton which accepts the
language L is *
2 points
(1) n
(2) n+1
(3) n(n+1)/2
(4) 2n
8. Consider the following two languages:L1 = {x ∣ for some y with ∣y∣ = 2∣x∣,xy ∈ L
and L is regular language}L2 = {x ∣ for some y such that ∣x∣ = ∣y∣, xy ∈ L and L is
regular language}Which one of the following is correct? *
2 points
(1) 0*1+0*1*
(2) 0*1*0+1*
(3) 0*1*0*1+
(4) 0+1*0*1*
11. Pumping lemma for regular language is generally used for proving: *
2 points
13. Which of the following are not regular?(A) Strings of even number of a’s.(B)
Strings of a’s, whose length is a prime number.(C) Set of all palindromes made up
of a’s and b’s.(D) Strings of a’s whose length is a perfect square. *
2 points
14. Consider the languages L1 = ϕ, and L2 = {1}. Which one of the following
representsL1* U L2* L1* ? *
2 points
(1) {ε}
(2) {ε,1}
(3) ϕ
(4) 1*
15.The number of strings of length 4 that are generated by the regular expression
(0+1+|2+3+)*, where | is an alternation character and {+, *} are quantification
characters, is: *
2 points
(A) 08
(B) 09
(C) 10
(D) 12
16. Given the following two languages:L1 = {uwwRn | u, v, w ϵ {a, b}+}L2 = {uwwRn
| u, v, w ϵ {a, b}+, |u| ≥ |v|}Which of the following is correct ? *
2 points
17. The number of strings of length 4 that are generated by the regular expression
(0|∈) 1+2* (3|∈), where | is an alternation character, {+, *} are quantification
characters, and ∈ is the null string, is: *
2 points
(A) 08
(B) 10
(C) 11
(D) 12
18. Minimal deterministic finite automaton for the language L={ 0n | n≥0, n≠4 } will
have: *
2 points
L1 = {a^nb^n|n≥0, n≠100}
L2 = {w ϵ {a,b,c}*| na(w) = nb(w) = nc(w)}
21. The regular expression corresponding to the language L where L = { x ∈{0, 1}* |
x ends with 1 and does not contain substring 00 } is : *
2 points
(A) (1 + 010)*
(B) (01 + 10)*
(C) (1 + 010)* (0 + λ)
(D) (1 + 01)* (0 + λ)
A.any grammar
B.only context-free grammar
C.Both (a) and (b)
D.only regular grammar
Submit
Page 1 of 1
This content is neither created nor endorsed by Google. Report Abuse - Terms of
Service - Privacy Policy
Forms