920 views

1 Answer

Best answer
1 1 vote
I guess answer is b)3.

bab can't be formed from the given regular expression.

Starting from min length =0 which contains {€} which belongs to the given regular expression.

stings of Length = 1 are {a,b} & can be generated.

Strings of Length = 2 are {aa,ab,ba,bb} & can also be generated by the given expression

Strings of Length= 3 are {aaa,aab,aba,abb,baa,bab,bba,bbb}. Among these bab cannot be generated by the given regular expression.

So length of the shortest string that doesn't generate the given regular expression is 3.
• selected by
Position:
Show:

Related questions

1 1 vote
1 1 answer
88
88 views
GO Classes asked Oct 1
88 views
Consider the following regular expressions over the alphabet$\Sigma=\{a,b\}$.$R_1=a(a\cup b)^*$$R_2=b(a\cup b)^*$If $L(R)$ denotes the language associated with regular ex...
3 3 votes
2 2 answers
301
301 views
GO Classes asked Oct 23, 2025
301 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
324
324 views
GO Classes asked Oct 23, 2025
324 views
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 fol...