edited by
1,381 views
0 votes
0 votes

Let $r=a(a+b)^*, \: s=aa^*b$ and $t=a^*b$ be three regular expressions.

Consider the following :

  1. $L(s) \subseteq L(r )\text{ and } L(s) \subseteq L(t)$
  2. $L(r ) \subseteq L(s) \text{ and } L(s) \subseteq L(t)$

Choose the correct answer from the code given below :

  1. Only i is correct
  2. Only ii is correct
  3. Both i and ii are correct
  4. Neither i nor ii is correct
edited by

3 Answers

1 votes
1 votes

Given that,

S = a.a*.b and T = a*b

T = a*b = (∈ + a) (a*.b)

Compare S and T, you will get it as L(S) ⊆ L(T).

 

R = a (a+b)* ==> every string which have prefix by a,

Note that you can't compare T with R, why because, T may contain the strings which have not starts with a

∴ R ⊈ T and T ⊈ R

 

Coming to S, it is also contains the strings which are starts with a.

S = a. (a*b) where R = a. (a+b)* = a. (a*. b*)*

Compare S and T, you will get it as L(S) ⊆ L(R).

0 votes
0 votes
the correct anser is "L(s) is $ proper subset$  of L(r)" and  L(s) is  $proper subset$ of L(t) "

hence the answer is 2

edit: iam elaborating the answer and you people can take what is in it for you.

1. when we say "A ⊆ B" then we means set A can have some( may be 0 ) or all the elements of set B

2. when we say  "A proper subset of B" then this means that set A can have some not all the elements of A

3. language by L(r) is = all the strings that starts with " a " = {a, ab, aa, abb, aba, aab, aaa, ... }

4. language by L(s) = aa*b = a+ b = string with atleast one "a" followed by exactly one "b" = {ab, aab, aaab,.....}

5. language by L(t) = a*b = any number of "a " followed by exactly one "b" = {b, ab, aab, aaab,....}

6. clearly form 3 and 4 it can be said that  L(s) is proper subset of L(r) ( since elements are given so the  we can tell exactly whether they are  proper subset or not)

7.from 4 and 5 it can be exactly said that L(s) is proper subset of L(t) ( the elements are given so it can be said about it)

8. if its assumed that here the   " ⊆ " means same as " proper subset"  then the answer is 1, and if not the answer is 2. i will go with 2 since they are proper subset
edited by
Answer:

Related questions

1 votes
1 votes
0 answers
3
0 votes
0 votes
2 answers
4
Arjun asked Jan 2, 2019
4,400 views
Consider the graph shown below:Use Kruskal’s algorithm to find the minimum spanning tree of the graph. The weight of this minimum spanning tree is$17$$14$$16$$13$