Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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*

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote