Find a Regular Expression for the following (a) Language = {0, 1}. All strings t
ID: 3535221 • Letter: F
Question
Find a Regular Expression for the following
(a) Language = {0, 1}. All strings that contain an odd number of 0’s.
(b) Language = {a, b}. All strings that contain exactly two b’s or exactly three b’s, not more.
(c) The set of FORTRAN integer variables which can be one to six symbols (including A to Z
and 0 to 9) in length and must start with I, J, K, L, M, or N.
(d) All strings over {0,1,2,3,4,5,6,7,8,9} such that the final digit has appeared before.
(e) The set of all signed or unsigned integers and real numbers in decimal notation. No leading
zeros should be generated and real numbers must have at least one digit on both sides of the
decimal point. For instance, 3, +3, -3, +0, 0.328, 1009.46, +100.80, and -100.3 are in the
language, but 123., .25, +, -, 003 are not.
Explanation / Answer
(a) 1*(01*01*)*01*
(b) a*ba*ba* + a*ba*ba*ba*
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.