Question: a) Draw a finite state machine (FSM) for a string representing a single time of day. Your FSM should accept times such as 12:36 pm,

a) Draw a finite state machine (FSM) for a string representing a single time of day. Your FSM should accept times such as 12:36 pm, 1:59 am, 4:00 pm, 2:45 am. Note that there are no leading zeros. Also, "am" and "pm" are lowercase and hace no periods. A terminal error state is not neccesary. To make the task easier, you can make up any grouping you want. For example, you may wish to leat represent any digit, let represnt the digit 1, let represent and digit 0-2, and let represent a space. Time statements are formatted in many ways but we want your FSM to only accept the above time format -- not military time or any other time format.

b) Give a regular expression for your FSM.

a) Draw a finite state machine (FSM) for a string representing a

3. Draw a finite state machine (FSM) for a string representing a single time of day. Your FSM should accept times such as: 12:36 pm 1:59 am 4:00 pm 2:45 am Note that there are no leading zeros. Also, am and pm are lowercase and have no periods. A terminal error state is not necessary To make the task easier, you can make u grouping you want. For example, you may wish to let represent any digit, let represent the digit 1, let represent any digit 0 through 2, and let represent a space p any Time statements are formatted in many ways, but we want your FSM to only accept the above time format not military time or any other time format. PAUE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!