Ace Book
[closed]

in Theory of Computation closed by
546 views
0 votes
0 votes
The complement of the language L containing an equal number of a's , b's and c's is

a)regular

b)context free

c)context sensitive but not context free

d)recursive and not a CFL
in Theory of Computation closed by
546 views

4 Comments

@Mk Utkarsh

Yes right.. But how can we have a PDA for this? :/ Please show

0
0

@Mk Utkarsh

sir in the language all three are equal....in its complement either two of them can be equal

isin't it?

for ex: if aabbcc belong to L

then abbcc belongs to complement of L?

please clarify!

0
0

himgta yes all strings where (number of a's ≠ number of b's) OR (number of c's ≠ number of b's) OR (number of a's ≠ number of c's) is true. 

on seeing first symbol push 2 symbols for that symbol and pop just one on seeing other 2 symbols

for ex : aabbc
 

aabbc , stack:
aabbc , stack: aa
aabbc, stack : aaaa
aabbc, stack : aaa
aabbc, stack : aa
aabbc, stack : a

if stack is empty after parsing the string then string is not in language.

if stack becomes empty while parsing the string then the next symbol seen will be pushed two times and other 2 symbols will pop.
 

0
0

Related questions