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

Sample Questions AUTOMATA

The document consists of a series of short and long questions related to automata theory, formal languages, and grammars. It covers topics such as finite automata, pushdown automata, Turing machines, regular expressions, and various types of grammars. The questions require explanations, examples, and derivations related to these concepts.

Uploaded by

sahidnmd1
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)
59 views4 pages

Sample Questions AUTOMATA

The document consists of a series of short and long questions related to automata theory, formal languages, and grammars. It covers topics such as finite automata, pushdown automata, Turing machines, regular expressions, and various types of grammars. The questions require explanations, examples, and derivations related to these concepts.

Uploaded by

sahidnmd1
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

Short Questions

1. What is the primary purpose of automata theory?


2. A finite automaton is formally described as a 5-tuple (Q, Σ, δ, q0, F). State the names of these parameters.
What is the relationship between the first three parameters?
3. Write down the regular expression of all strings of 0’s and 1’s such that the start symbol and end symbol are
always same / different.
4. State whether the string 000101100111 is accepted by the machine
showed in Figure 1, or not. If not, then what is the final state?
5. Draw the transition table of the machine depicted in Figure 1.
6. What change do you suggest in the machine, showed in Figure 1, so
that it’ll accept only those strings, which end with 11?
7. What change do you suggest in the machine, showed in Figure 1, so
that it’ll accept only those strings, which contains at-least two 1’s?
8. Consider a grammar G with the production rules 𝑆 → 𝐴𝑏; 𝐴 → 𝑎𝐴𝑏; 𝐴 → 𝜆; Describe the language generated
by this grammar.
9. Consider a grammar G with the production rules 𝑆 → 𝑎𝑆𝑏; 𝑆 → 𝜆; Describe the language generated by this
grammar.
10. State why epsilon transitions are required?
11. State three differences between a DFA and an NFA.
12. While defining a Push Down Automata, what is the relationship between ‘Σ: The Set of Input Symbols’ and
‘Γ: The set of Stack Symbols’?
13. The formal definition of a Push Down Automata uses a 7-tuple (Q, Σ, Г, δ, q0, z0, F), where δ: Q x (Σ U {ε}) x Г –
> finite subsets of Q x Г* - explain.
14. Give an example each of (i) A ‘Null Production’ and (ii) A ‘Unit Production’.
15. When a grammar is said to be ambiguous? Give an example.
16. State the rules those are allowed when a grammar is in Chomsky Normal Form.
17. State the rules those are allowed when a grammar is in Griebach Normal Form.
18. Which closure properties are valid for CFL, but not for RL? Which closure properties are valid for RL, but not
for CFL?
19. List the types of automatons and its acceptable languages and Grammers.
20. Define Left and Right Linear Grammar.
21. State the formal definition of a Push Down Automata (PDA).
22. Explain what do you mean by ‘Storage in State’ in context to extensions of Turing Machine?
23. Formally define a Turing Machine (TM).
24. Turing recognizable languages are closed under union and complementation – Explain.
25. Compare between: NPDA vs DPDA; Undecidable vs Decidable Problems; CFG vs RG; CFL vs RL vs CSL

Long Questions

1. Convert the given grammar into a GNF compliant grammar: S→SS | (S) | a
2. Convert the given grammar into a CNF compliant grammar: S → aA | a; A → aBB | ε; B → Aa | b;
3. Consider a grammar with the rules: 𝑆 → 𝑎𝑆𝑎 | 𝑏𝑆𝑏 | 𝑎 | 𝑏 . Draw a derivation tree for the string
‘𝑎𝑎𝑏𝑏𝑏𝑎𝑏𝑎𝑏𝑏𝑏𝑎𝑎’
4. Consider a grammar with the rules: 𝑆 → 𝑎𝑆𝑏 | 𝑆𝑆 |𝜆. Draw the leftmost derivation tree for the string
‘𝑎𝑎𝑏𝑎𝑎𝑏𝑏𝑎𝑏𝑏’
5. Consider a grammar with the following rules: 𝑆 → 𝑎𝑆𝑏 | 𝑏𝑆𝑎 | 𝜆. Draw a derivation tree for the string
‘𝑎𝑏𝑎𝑎𝑏𝑎𝑎𝑏𝑏𝑎𝑏𝑏𝑎𝑏’
6. Consider a grammar with the rules: 𝑆 → 𝐴𝐵; 𝐴 → 𝑎𝐴 | 𝜆; 𝐵 → 𝑏𝑏𝐵 | 𝜆. Draw the leftmost derivation tree for
the string ‘𝑎𝑎𝑎𝑏𝑏𝑏𝑏𝑏𝑏’
7. The transition table of a DFA is shown in Figure 2. Compute step by step, the
acceptance (or rejection) of the string 01001011.
8. The transition table of a DFA is shown in Figure 2. Compute step by step, the
acceptance (or rejection) of the string 01001001.
9. Design a DFA that accepts all strings of 0’s and 1’s, that either begins or ends (or
both) with 01.
10. Design a DFA that accepts all strings of 0’s and 1’s, that either begins or ends (or
both) with 00.

11. A grammar has the productions: G : S → aS1b | λ; S1 → bSa. Find the language generated by this grammar.
12. Create an NFA for accepting decimal numbers characterised by:
a. It should accept an optional +, - sign in the beginning
b. Followed by a string of digits
c. Then a decimal point
d. Followed by another string of digits
e. Either of the two above mentioned strings may be empty but not both.
13. Convert the NFA given in Figure 3, to the equivalent DFA using subset construction method.

14. Consider the Grammar X → X+X | X*X | X| a.


Draw two different leftmost derivation trees of the string
a*a+a*a
a+a*a
15. Design a FA from given regular expression 10 + (0 + 11)0* 1
16. Construct the FA for regular expression 0*1 + 10
17. Construct a minimum state automaton equivalent to the transition diagram given in the figure below:

18. Eliminate left recursion from the following grammar: A → ABd / Aa / a; B → Be / b


19. Eliminate left recursion from the following grammar: S → A; A → Ad / Ae
/ aB / ac; B → bBc / f
20. Prove that L={anbn: n>=0} is not regular applying pumping lemma.
21. Design a PDA to accept strings of the form 0n12n, n≥0. Show the transition
rules of this machine. Clearly show the steps by the above PDA to accept
the string 011.
22. Consider the transition diagram of a PDA given in Figure 5. Draw the
corresponding transition table. Convert this grammar to the equivalent
PDA and write down the transition rules.
Figure 5
23. Draw the transition table of the Turing Machine whose
transition diagram is shown in Figure 4.

24. This machine is used for computing integer subtraction. Show the
computation of 3 – 1, step by step.

Figure: 5

25.
a. Describe the Chomsky hierarchy of languages.
b. Prove that the set of Context Free languages are closed under
i. Union
ii. Concatenation, and
iii. Kleene closure
26.
a. Define a context sensitive grammar
b. Design a context sensitive grammar to accept any strings of the form 𝑎𝑛 𝑏 𝑛 𝑐 𝑛
c. Use the grammar designed above to generate the string 𝑎2 𝑏 2 𝑐 2
27.
a. Define Diagonalization Language
b. Prove that Diagonalization Language is not a Recursively Enumerable Language.
28. Draw the transition table of a Turing Machine with ‘Storage in State’ extension that will recognize strings of the
form (01* + 10*). Compute the steps to accept (or reject) the string 100.
29. Consider the context-free grammar: 𝑆 → 𝑎𝑆𝑎 | 𝑏𝑆𝑏 |𝑐
a. Convert this grammar to the equivalent GNF compliant grammar
b. Draw the parse tree for generating the string 𝑎𝑏𝑎𝑎𝑐𝑎𝑎𝑏𝑎
c. Convert this grammar to the equivalent PDA and write down the transition rules
Consider the context-free grammar: 𝑆 → 𝑎𝑆𝑎 | 𝑏𝑆𝑏 |𝑐
d. Convert this grammar to the equivalent GNF compliant grammar
e. Draw the parse tree for generating the string 𝑎𝑏𝑎𝑎𝑐𝑎𝑎𝑏𝑎
f. Convert this grammar to the equivalent PDA and write down the transition rules
26. Prove that the set of Recursively Enumerable language is closed under compliment operation.
27. Prove that if 𝐿 is a Recursively Enumerable language and 𝐿̅ is also a Recursively Enumerable language, then 𝐿
is a Recursive language.
28.
a. Define the coding scheme of a Turing Machine
b. Compute the code of the machine M = ({q0, q1, q2}, {0, 1}, {0, 1, B}, 𝛿, q0, {q2}, {L, R}) where the
transitions rules are
i. 𝛿(𝑞0, 0) = (𝑞1, 0, 𝑅)
ii. 𝛿(𝑞1, 1) = (𝑞0, 1, 𝑅)
iii. 𝛿(𝑞0, 𝐵) = (𝑞2, 𝐵, 𝑅)
iv. 𝛿(𝑞1, 𝐵) = (𝑞2, 𝐵, 𝑅)
29. Prove that the set of Context Free languages is not closed under intersection and complementation.
30. Explain NPDA and DPDA with transition function.
31. Are expressive powers of NPDA and DPDA same? Explain with proper example.
32. Prove that the set of regular languages is closed under union and intersection.
33. Describe types of Turing machine.
34. Write importance of Oracle Turing machine.
35. Turing recognizable languages are closed under union and complementation. Explain.

You might also like