Beruflich Dokumente
Kultur Dokumente
2. Which of the following statement is NOT true about TG? Select correct option:
a. There is exactly one path for certain string c. There may exist no path for certain string
b. There may exist more than one paths for d. There may be no final state
certain string
3. Languages generated by kleene star are always ________
a. Finite c. Sometimes finite & sometimes infinite
b. Infinite d. None of the these
4. The language of all words (made up of a’s and b’s) with at least two a’s cannot be described by the regular
expression.
a. a(a+b)a(a+b)(a+b)ab c. baba(a+b)
b. (a+b)aba(a+b) d. none of these
5. Numbers of states require accepting string ends with 10.
a. 3 c. 1
b. 2 d. can’t be represented.
6.
7.
a. The PDA have one accept and one reject state c. The PDA have two accept and two reject state
b. The PDA have one accept and two reject state d. There is no reject state in the PDA.
9. ------------------- is obviously infinite language.
a. EQUAL-EQUAL c. PALINDROME
b. EVEN-EVEN d. FACTORIAL
10. "CFG" stands for _________
12. The symbols that can’t be replaced by anything are called -----------------
a. Productions c. Non-terminals
b. Terminals d. All of above
a. Productions c. Non-terminals
b. Terminals d. None of given
17. To describe the complement of a language, it is very important to describe the ----------- of that language
over which the language is defined.
a. Alphabet c. String
b. Regular Expression d. Word
a. (aa+aa+(ab+ab)(aa+ab)(ab+ba)) c. (aa+bb+(ab+ba)(aa+bb)(ab+ba))
b. (aa+bb+(ab+ba)(aa+bb)(ab+ba)) d. None of these
19. Who did not invent the Turing machine?
a. L1 + L2 c. L1
b. L1L2 d. All of above
1. Write down the NFA expression of the following PDA . (10)
Here, states ‘Q3’ give only 1 and 0 outputs respectively, so we retain states
‘Q0’, ‘Q1’ , ‘Q2’and ‘Q4’. But states ‘Q3’ produce different outputs (1 and 0). So, we divide
Q3 into Q30 Q31
b) (10)
Running the string abbabbba over the below machine, the corresponding output string will be
11011010, which can be determined by the following table as well
Solution:
It is to be noted that the states are labeled along with the characters to be printed. Running the string
abbabbba over the above machine, the corresponding output string will be 01111010, which can be
determined by the following table as well
It may be noted that the length of output string is l more than that of input string as the initial state prints out the
extra character 1, before the input string is read.
3.
a) To convert the following union of two NFA (10)
Question No Answer
1 d
2 b
3 a
4 a
5 b
6 a
7 c
8 a
9 a
10 b
11 c
12 d
13 d
14 a
15 c
16 b
17 c
18 b
19 a
20 c