The Gateway to Computer Science Excellence
+3 votes
Is the language $L=\left \{ (0^{n}1^{n})^{*} |n\geq 0 \right \}$ is DCFL ?
in Theory of Computation by Boss (12.3k points)
retagged by | 403 views
as i know that DCFL is not closed under kleen closure but here Language is given so we cant use closure property ...
closure property works for genral term , but for perticular language dont use it.

1 Answer

+6 votes
Best answer

Let the language be $L1= \left \{ 0^{N}1^{N} | N\geq 0 \right \}$

For this language, we can design a context free grammar as

$A\rightarrow \epsilon /0A1$

Now, according to the question, $L= L1$*

We can write grammar for this as 

$S\rightarrow \epsilon /AS$

$A\rightarrow \epsilon /0A1$

This grammar generates $\epsilon , A,AA,AAA,AAAA,AAAAA,.................................$

Now, Is this language DCFL or NCFL ? 

We can try to make a DPDA for it. If it exists,,then this language is DCFL.

This language L is DCFL and as well as NCFL.

by Veteran (50.7k points)
selected by
But the grammar which u have written is not linear and we know that every dcfg need to be a linear grammar that is having only one variable in the production.

But u r doing S --> AS which is not allowed in linear grammar.

Also u cannot write a grammar for the above language that is linear.

So the language should be ncfl only not dcfl
grammar of DCFL is TYPE 2 grammar. then it must be linear?
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,645 questions
56,565 answers
101,697 users