edited by
1,258 views
7 votes
7 votes

Find regular expressions for:

  1. All binary strings with exactly two $1’s$

  2. The set $\{a^nb^m :n\geq3, m$ is even$\}$

  3. All binary strings with a double symbol (contains $00$ or $11$) somewhere.

  4. The language on $\Sigma=\{a,b\}, L=\{w:n_a(w) \mod 3=0\}$

edited by

3 Answers

Best answer
8 votes
8 votes

$1.L_{1}=0^{*}10^{*}10^{*}$


$2.L_{2}=aaaa^{*}\left ( bb \right )^{*}$


$3.L_{3}=\left ( 0+1 \right )^{*}00\left ( 0+1 \right )^{*}+\left ( 0+1 \right )^{*}11\left ( 0+1 \right )^{*}$


$4.L_{4}=b^{*}(ab^{*}ab^{*}ab^{*})^{*}$

edited by

Related questions

0 votes
0 votes
1 answer
1
M_Umair_Khan42900 asked Dec 29, 2022
745 views
Show that the following pairs of regular expressions define the same language over the alphabet I = [a, b].s(a) p(pp)*( A + p)q + q and p*q(b) A +0(0+1)* + (0+1)* 00(0+1)...
0 votes
0 votes
2 answers
3
4 votes
4 votes
1 answer
4
Garrett McClure asked Oct 9, 2017
1,223 views
The tail of a language is the set of all suffixes of its strings, that is tail(L) = {y : xy ∈ L for some x ∈ Σ ∗ }.How do I show that the family of regular languag...