Question: Q 3 Recognizing decimal integers multiples of 3 1 Point Grading comment: Let string s in { 0 , . . . , 9 }

Q3 Recognizing decimal integers multiples of 3
1 Point
Grading comment:
Let string s in {0,...,9}*.Let n be a string s interpreted as a decimal integer .Draw a DFA that accepts s if and only if n is a multiple of 3 i.e.,3,6,9,12,15,... etc. Assume (the empty string) is not accepted.
Remember:
s is consumed by the DFA as a string. So if e.g., s=123, then 1 is input into the machine, followed by 2, followed by 3.
However, when interpreted as an integer, n=123=3.41, which is a multiple of 3. Therefore the string s=123 should be accepted.

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!