COT 4420 Questions and Correct Answers | Latest
Update
Enhanced Pumping Lemms
Ans: Let L be a language accepted by a n FA with N states. Then for all
words w in L that have N or more letters there are strings x, y,z, where y
is not null and where length (xy) <= N uch that w = xyz and all the strings
in the form of xy^nz for n >= 0 are in L
DOUBLE WORD
Assignment Expert
Ans: String a^nba^nb
Guru01 - Stuvia
Give an example of a regular language R and a non-regular language N
such that R + N is regular
Ans: R = (a + b) *, N = any non-regular language
2026
Give an example of a regular language R and a non-regular language N
such that R + N is nonregular
©
Ans: R = any finite language N = any nonregular language
Procedure to convert to prime
Ans: 1. Add plus to start states
2. Make all non-final final
3. Make all final non final'
4. Unfinal all (+-) ie make just - state
CFG for EVEN palindrome
Ans: S--> aSa
S-->bSb
, 2 for specific request mail
S--> Λ
CFG for ab*
Ans: S-->Sb | a
CFG for ab
Ans: S-->XY
X-->aX | λ
Y-->aY | λ
Assignment Expert
(baa + abb)*
Guru01 - Stuvia
Ans: S-->SS |baa | abb| λ
CFG for all words in which b is never tripled
2026
Ans: S-->aS | bX | λ
X-->aS | bY | λ
©
Y-->aS | λ
All words that have exactly two or three b's
Ans: S-->aS | bY
X-->aX | bY | λ
Y-->aY| bZ | λ
Z-->aZ | λ
All words that do not have the substring ab
Ans: S-->bS |aX | λ