Which of the following definitions below generate the same language as $L$, where $L=\{x^ny^n \text{ such that } n\geq 1 \}$?
$E \rightarrow xEy\mid xy$
$x y \mid (x^+xyy^+$)
$x^+y^+$
I only
I and II
II and III
II only
@vaibhav101 Just to add something to your logic, L is Context Free but not regular.
Correct Option: A
In the other two you can have any number of $x$ and $y$. There is no such restriction over the number of both being equal.
given language L is CFL , so we can not write a regular expression for this. but in option ii,iii it is written in regular expression so it is clearlly false. so option a is true
64.3k questions
77.9k answers
244k comments
80.0k users