The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+3 votes
393 views
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 | 393 views
0
as i know that DCFL is not closed under kleen closure but here Language is given so we cant use closure property ...
0
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.5k points)
selected by
+1
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
0
grammar of DCFL is TYPE 2 grammar. then it must be linear?

Related questions

+2 votes
2 answers
4
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,339 questions
55,765 answers
192,354 comments
90,815 users