Question: p 2 CS 3 1 4 Spring 2 0 1 8 Final Exam Name _ _ _ _ _ _ _ _ _ _ _

p2 CS 314 Spring 2018 Final Exam Name _____________________
I. Suppose unsigned real numbers in some language must have exactly one decimal
point, and the decimal point must be immediately preceded and followed by one or
more digits. E.g.,.7 and 5. are not legal unsigned real numbers, nor is 3 but 0.1 is.
Write a regular expression for these unsigned real numbers. You may use the letter
d to stand for the digits 0 through 9.
II. Consider the following Finite State Automaton (FSA)
A. Is this a deterministic or a non-deterministic FSA? Why?
B. Write a regular expression that specifies the same language that this FSA
accepts.
C. For each of the following strings, if it is accepted by the FSA above circle Yes
and give a sequence of states that proves it is accepted. If not, circle No.
i. a Yes: states ________________________ No
ii. a b c Yes: states ________________________ No
iii. a b a c Yes: states ________________________ No
iv. a b b c Yes: states ________________________ No
v. a b a b a b c Yes: states ________________________ No

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!