Toa 14

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

UNIVERSITY OF THE PUNJAB

Fifth Semester 2014 Roll NO. _________________


Examination: B.S. 4 Years Programme

PAPER: Theory of Automata (IT) TIME ALLOWED: 2 hrs. & 30 mins.

Course Code: IT-301 MAX. MARKS: 50

Attempt This Paper on Separate Answer Sheet provided.


SUBJECTIVE TYPE

Question #2: Answer the following short questions. (5x4 marks)

a) Define Ambiguity. Give an example of Ambiguous grammar and prove it.

b) Make clear difference between Determinism and Non-Determinism using suitable examples.

c) Make clear the difference between CFG, Regular Grammar and CNF.

d) Explain the difference between the terms Context Free and Context Sensitive.

e) Give two the smallest possible sets whose Kleene’s Closure will be same and prove it.

Question #3: Answer the following questions briefly: (5x6 marks)

a) Give the Turing Machine accepting the language PALINDROME over ∑ = {a, b, c}.

OR

Construct Post Machine for the language an cn bn; n ≥ 0.

b) Convert the following CFG into CNF:

S⟶a|XbX|aYXaYc

X⟶Y|aX

B⟶b|X|Ʌ (Note: Ʌ represents the Null String here.)

c) Give an FA for the language EVEN-EVEN over ∑ = {m, n}.

d) Give an FA with OUTPUT (MOORE Machine) which can Increment one in any inputted binary string. For example; if

0000 is inputted it will output 0001 and when inputted 0011 output is 0100. HINT (it will add 1 in inputted binary

string).

e) Give the Context Free grammar for the Language EQUAL over ∑ = {b, a}.

f) Construct a PDA for the Language an bm where {m, n} ≥ 0 and m > n always.

You might also like