Aspire Faculty ID #18723 · Topic: UGC NET Computer Science Sep 2022 (Paper II) · Just now
UGC NET Computer Science Sep 2022 (Paper II)

Consider the production rules of grammer $G$:

$S\to AbB$

$A\to aAb\mid \lambda$

$B\to bB\mid \lambda$

Which of the following language $L$ is generated by grammer $G$?

Solution

Given,

$S\to AbB$

$A\to aAb\mid \lambda$

So, $A$ generates equal number of $a$ and $b$.

$A\Rightarrow a^n b^n$

Also,

$B\to bB\mid \lambda$

So, $B$ generates any number of $b$.

$B\Rightarrow b^k$

Now,

$S\Rightarrow AbB$

$S\Rightarrow a^n b^n b b^k$

$S\Rightarrow a^n b^{n+k+1}$

So, number of $b$ is always greater than number of $a$.

Therefore,

$L=\{a^n b^m:n\ge 0,m>n\}$

Previous 10 Questions — UGC NET Computer Science Sep 2022 (Paper II)

Nearest first
1
The reduced grammar equivalent to the grammar, whose production rules are given below, is$S\to AB\mid CA$$B\to BC\mid A…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
2
The logic expression $(\overline{P}\land Q)\lor(P\land \overline{Q})\lor(P\land Q)$ is equivalent to
Topic: UGC NET Computer Science Sep 2022 (Paper II)
3
Maximize $z=5x_1+12x_2+4x_3$Subject to $x_1+2x_2+x_3=10$$2x_1-x_2+3x_3=8$$x_1,x_2,x_3\ge 0$its dual problem isMinimize …
Topic: UGC NET Computer Science Sep 2022 (Paper II)
4
In a cache memory, if address has $9$ bits in Tag field and $12$ bits in index field, the size of main memory and cache…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
5
The total storage capacity of a floppy disk having $80$ tracks and storing $128$ bytes / sector is $163,840$ bytes. How…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
6
Consider a logic gate circuit, with 8 input lines $(D_0,D_1,\ldots,D_7)$ and 3 output lines $(A_0,A_1,A_2)$ specified b…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
7
The number of gate inputs, required to realize expression $ABC+A\overline{B}CD+E\overline{F}+AD$ is
Topic: UGC NET Computer Science Sep 2022 (Paper II)
8
The representation of $4$ bit code $1101$ into $7$ bit, even parity Hamming code is
Topic: UGC NET Computer Science Sep 2022 (Paper II)
9
For multiprocessor system, interconnection network - cross bar switch is an example of
Topic: UGC NET Computer Science Sep 2022 (Paper II)
10
Consider a memory system having address spaced at a distance of $m$, $T=$ Bank cycle time and $n$ number of banks, then…
Topic: UGC NET Computer Science Sep 2022 (Paper II)

Next 10 Questions — UGC NET Computer Science Sep 2022 (Paper II)

Ascending by ID
Ask Your Question or Put Your Review.

loading...