Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Bc190402217

AHMAD ALI

Answer 1:

Old states New states after reading

0 1 2

P1-=(A,Y) (B,Y)= P2 (C,Y) = P2 (C,Z) = P2

P2-=(B,Y) (B,Y) = P2 (B,Y) = P2 (B,Z) = P2

P3-=(C,Y) (C,Y) = P2 (C,Y) = P2 (C,Z) = P2

P4-=(C,Z) (Z,Y) = P2 (C,Y) = P2 (C,Z) = P2

P5+-=(B,Z) (B,Y) = P2 (B,Y) = P2 (B,Z) = P2

-----------------------------------------------------------------------------------------------------------------

Solution 2:
a) Prove by Myhill Nerode theorem that the following language is regular or non-regular.
Consider the language L of strings, defined over ∑ = {m, n}, ending in n.

b) Let M= {efe, feeffefee. eeefffee, fefefe, eeeefff,} and N= {fee, eef, fff}.

Find the pref (N in M).

Pref(N in M)= { feeffe, eeeff, eeee}

c) Consider some languages are defined by the following regular expressions. You are
required to show whether the languages are empty or non-empty.

i) (x*y + yx*)
Not empty
ii) (a+b)*a*+a(a+b)*b*
empty

You might also like