What language is generated by each of the BNF grammars below
<p>What language is generated by each of the BNF grammars below (assuming s is the start symbol):</p>

<pre><code>&lt;s&gt; -&gt; &lt;x&gt; | &lt;y&gt;
&lt;x&gt; -&gt; 0 &lt;x&gt; 1 | &lt;x1&gt;
&lt;x1&gt; -&gt; 0 &lt;x1&gt; | 0
&lt;y&gt; -&gt; 0 &lt;y&gt; 1 1 | &lt;y1&gt;
&lt;y1&gt; -&gt; &lt;y1&gt; 1 | 1
</code></pre>

<p>i understand what it does: 0^n 1^n</p>

<p>but i previously asked for help online (elsewhere) and someone gave me an answer:</p>

<pre><code>For &lt;x&gt;: 0^n 1^m where n &gt; m and m &gt;= 0
For &lt;y&gt;: 0^n 1^m where m &gt; 2n and m &gt;=0
</code></pre>

<p>I can't quite follow it, where do the inequalities come from? </p>

<p>Why is n greater than m? Why is m greater than 2n?</p>

<p>I'm guessing the 2n is from the two 1s from y, but how does one figure out if n is greater or less than m? and vice versa? I'm completely oblivious. </p>