761 views
0 votes
0 votes

For each regular expression, give two strings that are in the corresponding language and two strings that are not.

1. (a + b)ab(a + b)

2. babab

3. a + (ab)

1 Answer

Best answer
1 votes
1 votes

1. (a + b)ab(a + b)

In the language : ab,aba,aaba,abab

Not in the lanugage : b,bb

2. babab

In the language : aa,aba

Not in the lanugage : a,b

3. a + (ab)

In the language : a,b

Not in the lanugage : All strings are in the language (Universal set)

selected by

Related questions

254
views
0 answers
0 votes
M_Umair_Khan42900 asked Dec 29, 2022
254 views
For each of the following language, if the language is regular, write down the corresponding regular expression. Else, prove that the language is not regular.a) ( ... 9) with characters in sorted orders.c) The set of all even binary numbers
2.4k
views
1 answers
1 votes
M_Umair_Khan42900 asked Dec 29, 2022
2,404 views
Write regular expression to denote a language La) String which begin or end with either 00 or 11.b) The set of all strings, when viewed as binary ... The set of all strings containing 00.d) String not containing the substring 110.
21.7k
views
2 answers
3 votes
im.raj asked Jun 16, 2016
21,689 views
A. [(00(0+1)* 11] + [11( 0 + 1)* 00]B. [(00+11) (0+1)+] + [( 0 + 1)+ (00+11)].C. [(00+11) (0+1)*] + [( 0 + 1)* (00+11)]D. (00+11) (0+1)* (00+11).