401 views

1 Answer

Best answer
0 votes
0 votes
Correct answer would be C, L is Deterministic Context Free Language.

Aplhabet set : {a, b, c} for all L, L1 & L2.

L1 : set of all the strings that have some number of a’s followed by ANY number of b’s followed by exactly the same number of c’s as the number of a’s.

For example: ac, abc, abbc, aacc, aabcc all these strings are in L1.

L2 : set of all the strings that have any number of a’s followed by exactly the same number of c’s, but NO b’s in between a’s & c’s. For Example: ac, aacc, aaaccc, aaaacccc all these strings belongs to L2.

Since L = L1 - L2 , L is the the set of all strings that consists of any number of a’s followed by ATLEAST one b, followed by exactly the same number of c’s as the number of a’s.

i.e. L = {a^n b^m c^n | m>0, n>=0} For example: abc, abbc, abbbc, abbbbc, aabcc aabbcc all these strings belongs to L.

L is not a regular language since we can not keep count & compare powers using regular language.(Pumping Lemma can be used to show that L is not regular)

Now why L is DCFL?

L is DCFL because there is a deterministic pushdown automata exists that accepts L.

Acceptance by empty stack:

On reading an ‘a’ push that into stack, on reading a ‘b’ do not alter stack, on reading a ‘c’ pop an ‘a’ from the stack, at last if number of a’s will be equal to number of b’s in the string, the stack will become empty & thus the string will be in L otherwise it won’t.

Thus L is a DCFL.

Related questions

0 votes
0 votes
1 answer
1
Suvam Chatterjee asked Sep 26, 2015
356 views
 the formula is n^(n*m+1)*2^n ,where n=no of states and m= no of input symbols. right?? 
0 votes
0 votes
0 answers
3
Syed Abdul Basit asked Jun 15, 2017
198 views
Booth's algorithm to find the value of 2 x -2
2 votes
2 votes
0 answers
4
LavTheRawkstar asked Jul 23, 2016
475 views
I have solved using only nand gate onlyCan anyone deisgn the circuit using only and only NOR gates??