317 views
3 3 votes

Let $\mathrm{p}, \mathrm{q}$, and r be three regular expressions over the alphabet $\Sigma=\{a, b\}$.

  • $p=a(a+b)^* b$
     
  • $q=(a+b)^* a b(a+b)^*$
     
  • $r=a a^* b b^*$

Which of the following represents the correct relationship between the languages $L(p), L(q)$, and $L(r)$ generated by these regular expressions?

  1. $L(r) \subseteq L(p)$ and $L(p) \subseteq L(q)$
     
  2. $L(p) \subseteq L(r)$ and $L(r) \subseteq L(q)$
     
  3. $L(q) \subseteq L(p)$ and $L(p) \subseteq L(r)$
     
  4. $L(r) \subseteq L(q)$ and $L(q) \subseteq L(p)$

1 Answer

1 1 vote
Basic conclusion with string  like q can generate aba but p can't and p can generate abab but r can't  so p is subset of q and r is subset of p
OR

simply try to iterate the lang then u'll find ans A.
Answer:
Position:
Show:

Related questions

3 3 votes
2 2 answers
290
290 views
GO Classes asked Oct 23, 2025
290 views
Consider the following three regular expressions over the alphabet $\Sigma=\{0,1\}$ :$p=\left(1^* 01^* 0\right)^* 1^*$ $q=\left(0^* 10^* 1\right)^* 0^*$ $r=((0+1)(0+1))^*...
3 3 votes
1 1 answer
389
389 views
GO Classes asked Oct 23, 2025
389 views
Let $\Sigma=\{0,1\}$. For any string $w=w_1 w_2 \ldots w_k \in \Sigma^*$, let $\operatorname{val}(w)$ denote the integer value of $w$ interpreted as a binary number, and ...
1 1 vote
1 1 answer
301
301 views
GO Classes asked Oct 23, 2025
301 views
Consider the following two sets of Turing Machine (TM) encodings:$S_{\text {halt }}=\{\langle M\rangle \mid M$ is a TM that halts on the empty string input, $\epsilon\}$ ...
1 1 vote
1 1 answer
288
288 views
GO Classes asked Oct 23, 2025
288 views
Consider the following languages associated with Turing Machines (TMs). $\langle M\rangle$ denotes the encoding of a TM $M$.$L_1=\{\langle M\rangle \mid$$M$ 's descriptio...