1,860 views
1 1 vote
Is the following Language, L = {xxxx | x ∈ {0, 1}*} CSL or not? I saw a explanation say that it’s REC, but it didn’t say anything about it not being CSL and I used to think strings like {xx | x ∈ {0, 1}*} are CSL where the same strings keep repeating [like x here].

 

So is it CSL and please do also tell is there a rule to figure that out?

2 Answers

Best answer
4 4 votes

Let $\Sigma$ be any input alphabet.

$L = \{ wwww | w \in \Sigma^* \}$ is CSL, But not CFL.

$L$ can be accepted by a $LBA$.

$LBA$ is a Turing Machine that uses only the (constant multiple of) tape space occupied by the input.

In simple words, $\color{red}{\text{$LBA$ is an Algorithm with $O(|w|)$ space complexity.}}$

Now, How much space do you need to recognize $x = wwww$ type of string??

Definitely, $O(|x|)$ space is all you need to recognize $x.$

So, $L$ is CSL. 

https://www.csa.iisc.ac.in/~deepakd/atc-2016/Seminar-LBA.pdf 

• selected by
–1 –1 vote
To summarize, the language L = {xxxx | x ∈ {0, 1}*} is not a context-sensitive language (CSL).

To determine whether a language is context-sensitive, you can try to come up with a linear-bounded automaton (LBA) that recognizes it, or you can try to prove that no such automaton exists. One way to do this is to use the pumping lemma for context-sensitive languages, which states that if a language is context-sensitive, then there exists a constant k such that any string in the language of length at least k can be pumped, or broken down into three substrings xyz such that xy^iz is also in the language for all positive integers i. If you can prove that a language does not satisfy the pumping lemma for context-sensitive languages, then you can conclude that it is not context-sensitive.

Another way to determine whether a language is context-sensitive is to try to come up with a context-sensitive grammar (CSG) that generates it. A CSG is a type of formal grammar that consists of a finite set of terminal symbols, a finite set of nonterminal symbols, a start symbol, and a set of productions. Each production has the form A -> B, where A is a nonterminal symbol and B is a string of terminal and nonterminal symbols. If you can come up with a CSG that generates a language, then you can conclude that the language is context-sensitive.
• edited by
Position:
Show:

Related questions

0 0 votes
1 1 answer
2.1k
2.1k views
Xylene asked Jun 15, 2017
2,092 views
Can anyone give me an example of a language which is not a CSL but can be accepted using a Halting TM?
4 4 votes
0 0 answers
3.5k
3.5k views
yg92 asked Feb 8, 2017
3,539 views
Regular languages are not closed under Subset - Example anbn is subset of a*b* which is non-regular.DCFL/CFL languages are not closed under Subset - Example anbncn is su...
0 0 votes
0 0 answers
571
571 views
h4kr asked Dec 23, 2022
571 views
Is {$a^nb^nc^n$ | $n>=0$} CSL? After comparing both a and b, stack would be empty. So it can’t be CFL. So it is CSL or recursive. And does this language require more than...
0 0 votes
2 answers 2 answers
927
927 views
soujanyareddy13 asked May 12, 2021
927 views
Consider the following language families:$L_1 \equiv$ The context-free languages$L_2 \equiv$ The context-sensitive languages$L_3 \equiv$ The recursively enumerable langua...