Deprecated: Implicit conversion from float-string "1553927849.897" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1553927849.897" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1553927849.897" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1553927849.897" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1553927849.897" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
Theory of Computation: Computation and Regular Expressions - Find a regular expression for the following scenarios
edited by
1,323 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

759
views
1 answers
0 votes
M_Umair_Khan42900 asked Dec 29, 2022
759 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)...
5.4k
views
2 answers
0 votes
Don't you worry asked Jun 1, 2016
5,390 views
(a) All strings that do not end with aa.(b) All strings that contain an even number of b’s.(c) All strings which do not contain the substring ba.
1.2k
views
1 answers
4 votes
Garrett McClure asked Oct 9, 2017
1,236 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...