R05 Set No. 2
R05 Set No. 2
R05
Set No. 2
III B.Tech I Semester Examinations,MAY 2011 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks
1. (a) Explain the terms: Chomsky normal form and Greibach Normal form (b) Convert to Chomsky normal form the following grammar: G = (N, T, P, S) where N = {S, A, B} T = {a, b} P = {S aB S bA A aS A b A A Aa BaBB B b} [8+8] 2. (a) Design a DFA for the language L = {ban /n 0}. (b) Design DFA over {a,b} to accept strings which does not contains two consecutive bs. [8+8] 3. (a) Describe Chomsky hierarchy of languages. (b) Explain post Correspondence Problem. [8+8]
4. (a) Dene a Turing machine mathematically. Dene the term move in a TM. (b) Design a TM that recognizes the set {02n 1n |n = 0 }. [16]
5. (a) S aS |bS| a |b Generate the regular expression for the above CFG Give automata for the above grammar and write what is the language accepted by the above automata? Is both the derived automata and the given CFG generates same language. (b) S aSbS |bSaS| What is the language generated by the above grammar? [28]
6. Is Ardens lemma is applicable to an NFA consisting with -moves? If not? Then why? Explain. [16] 7. (a) Design a Moore Machine to determine the residue mod 4 for each binary string treated as integer.
R05
Set No. 2
(b) Design a Mealy machine that uses its state to remember the last symbol read and emits output y whenever current input matches to previous one, and emits n otherwise. [8+8] 8. Find the PDA that accepts the following language L = {x {a, b} : |x|a = 2|x|b } via empty stack. Also nd the PDA via nal state. [16]
R05
Set No. 4
III B.Tech I Semester Examinations,MAY 2011 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks
1. (a) Describe Chomsky hierarchy of languages. (b) Explain post Correspondence Problem. [8+8]
2. (a) Design a Moore Machine to determine the residue mod 4 for each binary string treated as integer. (b) Design a Mealy machine that uses its state to remember the last symbol read and emits output y whenever current input matches to previous one, and emits n otherwise. [8+8] 3. (a) S aS |bS| a |b Generate the regular expression for the above CFG Give automata for the above grammar and write what is the language accepted by the above automata? Is both the derived automata and the given CFG generates same language. (b) S aSbS |bSaS| What is the language generated by the above grammar? [28]
4. (a) Dene a Turing machine mathematically. Dene the term move in a TM. (b) Design a TM that recognizes the set {02n 1n |n = 0 }. [16]
5. Find the PDA that accepts the following language L = {x {a, b} : |x|a = 2|x|b } via empty stack. Also nd the PDA via nal state. [16] 6. (a) Design a DFA for the language L = {ban /n 0}. (b) Design DFA over {a,b} to accept strings which does not contains two consecutive bs. [8+8] 7. Is Ardens lemma is applicable to an NFA consisting with -moves? If not? Then why? Explain. [16] 8. (a) Explain the terms: Chomsky normal form and Greibach Normal form (b) Convert to Chomsky normal form the following grammar: G = (N, T, P, S) where N = {S, A, B} T = {a, b} P = {S aB 3
R05
Set No. 4
[8+8]
R05
Set No. 1
III B.Tech I Semester Examinations,MAY 2011 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks
1. (a) S aS |bS| a |b Generate the regular expression for the above CFG Give automata for the above grammar and write what is the language accepted by the above automata? Is both the derived automata and the given CFG generates same language. (b) S aSbS |bSaS| What is the language generated by the above grammar? [28]
2. Is Ardens lemma is applicable to an NFA consisting with -moves? If not? Then why? Explain. [16] 3. (a) Explain the terms: Chomsky normal form and Greibach Normal form (b) Convert to Chomsky normal form the following grammar: G = (N, T, P, S) where N = {S, A, B} T = {a, b} P = {S aB S bA A aS A b A A Aa BaBB B b} [8+8] 4. (a) Design a Moore Machine to determine the residue mod 4 for each binary string treated as integer. (b) Design a Mealy machine that uses its state to remember the last symbol read and emits output y whenever current input matches to previous one, and emits n otherwise. [8+8] 5. (a) Describe Chomsky hierarchy of languages. (b) Explain post Correspondence Problem. [8+8]
6. Find the PDA that accepts the following language L = {x {a, b} : |x|a = 2|x|b } via empty stack. Also nd the PDA via nal state. [16] 7. (a) Dene a Turing machine mathematically. Dene the term move in a TM. 5
R05
Set No. 1
[16]
(b) Design a TM that recognizes the set {02n 1n |n = 0 }. 8. (a) Design a DFA for the language L = {ban /n 0}.
(b) Design DFA over {a,b} to accept strings which does not contains two consecutive bs. [8+8]
R05
Set No. 3
III B.Tech I Semester Examinations,MAY 2011 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks
1. (a) Dene a Turing machine mathematically. Dene the term move in a TM. (b) Design a TM that recognizes the set {02n 1n |n = 0 }. 2. (a) Describe Chomsky hierarchy of languages. (b) Explain post Correspondence Problem. [8+8] [16]
3. (a) S aS |bS| a |b Generate the regular expression for the above CFG Give automata for the above grammar and write what is the language accepted by the above automata? Is both the derived automata and the given CFG generates same language. (b) S aSbS |bSaS| What is the language generated by the above grammar? 4. (a) Explain the terms: Chomsky normal form and Greibach Normal form (b) Convert to Chomsky normal form the following grammar: G = (N, T, P, S) where N = {S, A, B} T = {a, b} P = {S aB S bA A aS A b A A Aa BaBB B b} [8+8] 5. Find the PDA that accepts the following language L = {x {a, b} : |x|a = 2|x|b } via empty stack. Also nd the PDA via nal state. [16] 6. (a) Design a DFA for the language L = {ban /n 0}. (b) Design DFA over {a,b} to accept strings which does not contains two consecutive bs. [8+8] 7. Is Ardens lemma is applicable to an NFA consisting with -moves? If not? Then why? Explain. [16] 7 [28]
R05
Set No. 3
8. (a) Design a Moore Machine to determine the residue mod 4 for each binary string treated as integer. (b) Design a Mealy machine that uses its state to remember the last symbol read and emits output y whenever current input matches to previous one, and emits n otherwise. [8+8]