Automata And Set Theory-Theory of Automata-Assignment, Exercises of Theory of Automata

This is assignment for Theory of Automata course. It was given at AMET University by Dr. Inayat Hussain. It includes: Automata, Set, Theory, Relations, Languages, Alphabet, Context, Free, Grammar, DFA, Regular, Expression, Deterministic, Finite

Typology: Exercises

2011/2012

Uploaded on 07/19/2012

anikae
anikae 🇮🇳

4

(2)

48 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT No. 1
(Units: 14)
Note: All questions are compulsory. All questions carry equal marks.
Q. 1 (a) Explain the following terms:
i) Automata
ii) Set theory
(b) For the following relations between sets A and B mention if they are one to one and/or onto:
A = {a, b, c} B = {1, 2, 3}
i) {(a, 1), (b, 1), (c, 1)}
ii) {(a, 2), (b, 2), (c, 2)}
iii) {(a, 1), (a, 2), (b, 2), (c, 3)}
iv) {(a, 2), (b, 1), (c, 2)}
Q. 2 (a) Consider the language S*, where S= {aa b}. How many words does this language have of
length 4? Of length 5? What can be said in general?
(b) Construct a regular expression defining each of the following languages over the alphabet
= {a b}:
i) All words in which a appears tripled, if at all. This means that every clump of a’s
contains 3 or 6 or 9 or 12… a’s.
ii) All strings that have exactly one double letter in them.
iii) All words that contain exactly two b’s or exactly three b’s, not more.
Q. 3 (a) What is the relationship between regular languages and context free grammars? Discuss
them? Construct a language that can be generated by CFG.
(b) Consider the Context Free Grammar
S a X X a x | b X | Λ Y b b b
(a +b) * b b b (a + b) *
Q. 4 (a) Construct an example DFA? Write down the steps to convert FA into DFA.
(b) Construct DFA for the following regular expression: (a / b) * a b *.
Q. 5 Define and explain the following terms.
(a) Context Free Grammar
(b) Regular Expression
(c) Context Free Language
(d) Deterministic Finite Automata
docsity.com

Partial preview of the text

Download Automata And Set Theory-Theory of Automata-Assignment and more Exercises Theory of Automata in PDF only on Docsity!

ASSIGNMENT No. 1

(Units: 1–4)

Note: All questions are compulsory. All questions carry equal marks.

Q. 1 (a) Explain the following terms: i) Automata ii) Set theory (b) For the following relations between sets A and B mention if they are one to one and/or onto: A = {a, b, c} B = {1, 2, 3} i) {(a, 1), (b, 1), (c, 1)} ii) {(a, 2), (b, 2), (c, 2)} iii) {(a, 1), (a, 2), (b, 2), (c, 3)} iv) {(a, 2), (b, 1), (c, 2)}

Q. 2 (a) Consider the language S*, where S= {aa b}. How many words does this language have of length 4? Of length 5? What can be said in general? (b) Construct a regular expression defining each of the following languages over the alphabet ∑ = {a b}: i) All words in which a appears tripled, if at all. This means that every clump of a’s contains 3 or 6 or 9 or 12… a’s. ii) All strings that have exactly one double letter in them. iii) All words that contain exactly two b’s or exactly three b’s, not more.

Q. 3 (a) What is the relationship between regular languages and context free grammars? Discuss them? Construct a language that can be generated by CFG. (b) Consider the Context Free Grammar S  a X X  a x | b X | Λ Y  b b b (a +b) * b b b (a + b) *

Q. 4 (a) Construct an example DFA? Write down the steps to convert FA into DFA. (b) Construct DFA for the following regular expression: (a / b) * a b *.

Q. 5 Define and explain the following terms. (a) Context Free Grammar (b) Regular Expression (c) Context Free Language (d) Deterministic Finite Automata

docsity.com