Aspire Faculty ID #18656 · Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II) · Just now
UGC NET Computer Science Dec 2022 Shift II (Paper II)

Which of the following is (are) correct about the regular expression?

a a* b b* c c* d d*

  1. The language for the given expression is:

$L={a^n b^n c^m d^m \mid n\ge 1,\ m\ge 1}\cup{a^n b^m c^m d^n \mid n\ge 1,\ m\ge 1}$

  1. The Context Free Language for the given expression is:

$S\to AB\mid C$

$A\to aAb\mid ab$

$B\to cBd\mid cd$

$C\to aCd\mid aDd$

$D\to bDc\mid bc$

  1. The language generated by this expression is equal number of $a$'s, followed by equal number of $b$'s, followed by equal number of $c$'s and followed by equal number of $d$'s.

Choose the correct answer from the options given below:

Solution

The given regular expression is $aa^*bb^*cc^dd^$, where:

  • $a^*$ denotes zero or more occurrences of $a$
  • $b^*$ denotes zero or more occurrences of $b$
  • $c^*$ denotes zero or more occurrences of $c$
  • $d^*$ denotes zero or more occurrences of $d$
  1. The language generated by the regular expression

$L={a^n b^n c^m d^m \mid n \ge 1, m \ge 1}\cup{a^n b^m c^m d^n \mid n \ge 1, m \ge 1}$

consists of strings where $a$'s are followed by $b$'s, which are followed by $c$'s, and then $d$'s.

Each of these letters $a, b, c, d$ can occur one or more times in any order. For example, $abcd$, $aabcdd$, etc. So the language $L$ can generate regular expressions $aa^*bb^*cc^dd^$.

  1. The Context Free Language for the given expression is:

$S \to AB \mid C$

$A \to aAb \mid ab$

$B \to cBd \mid cd$

$C \to aCd \mid aDd$

$D \to bDc \mid bc$

This is true.

For example:

$S \to AB \mid C$

$S \to abcd$

  1. The language generated by this expression is equal number of $a$'s, followed by equal number of $b$'s, followed by equal number of $c$'s and followed by equal number of $d$'s.

This statement is false.

The regular expression $aa^*bb^*cc^dd^$ generates strings where each letter $a, b, c, d$ can occur one or more times, but there is no constraint that the number of occurrences of each letter must be equal.

For example, the regular expression can generate strings like $abcd$, $abccdd$, $aaaabbbccddd$, etc., where the number of occurrences of each letter is not necessarily equal.

So option C is the correct answer.

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

Nearest first
1
Given an expression $(A+B*D)/(E-F)+G$ The prefix notation is $+/+A*DB-EFG$ The prefix expression is the reverse of …
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
2
Circuit satisfiability problem: Given a Boolean combinatorial circuit composed of AND, OR, and NOT gates, is it satisfi…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
3
Mr. X designed open source software which must comply with some criteria. Choose the false statement in respect of the …
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
4
Software project manager is responsible for the following tasks: A. Project Planning B. Project status tracking C. Reso…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
5
How do you create agile processes to manage unpredictability? Requirements gathering must be conducted very carefully…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
6
In the design protocol of the critical section problem, each process must ask permission to enter the critical section …
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
7
Which of the following statements are true? Shortest remaining time first scheduling may cause starvation Preemptiv…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
8
Identify the correct operation that produces the below-given output based on two relations R1 and R2.R1 NameClass&…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
9
Which of the following database model, we have a parent-child relationship? hierarchical databases network database…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
10
What are the drawbacks of using file systems to store data? Data inconsistency Difficulty in accessing data Data …
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)

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

Ascending by ID
1
Consider two hosts P and Q are connected through a router R. The maximum transfer unit $MTU$ value of the link between …
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
2
Which of the following statements are correct? The first three-address instruction in the intermediate code is a lead…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
3
Which of the following are correct on regular expressions? a. $\varphi + L = L + \varphi = L$ b. $\epsilon L = L\epsilo…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
4
The Solution to Silly Window Syndrome problem is/are: I. Nagle's Algorithm II. Clark's Algorithm III. Jacobson's Algori…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
5
Which AI System mimics the evolutionary process to generate increasingly better solutions to a problem? I. Self organiz…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
6
Consider the following Learning algorithms.I. Logistic regression. II. Back propagation. III. Linear regression. IV. Fo…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
7
Which Boolean operation on two variables can be represented by a single perception layer? I. X1 AND X2 II. X1 OR X2 III…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
8
Match the List-I and List-II List-IList-II  a. Planar GraphI. Probabilistic Model  b. Bipartit…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
9
Match List-I and List-II List-IList-II  a. Direct AddressingI. MVI A, FFH  b. Indirect address…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
10
Match the List-I and List-II List-I List-II a. If the implementation of generated or derived classes dif…
Topic: UGC NET Computer Science Dec 2022 Shift II (Paper II)
Ask Your Question or Put Your Review.

loading...