Question: Let string in { 0 , . . . , 9 } s in { 0 , . . . , 9 } . Let

Let string
in
{
0
,
...
,
9
}
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
3, i.e.,
3
,
6
,
9
,
12
,
15
,
...
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.,
=
123
s=123, then
1
1 is input into the machine, followed by
2
2, followed by
3
3.
However, when interpreted as an integer,
=
123
=
3
41
n=123=341, which is a multiple of 3. Therefore the string
=
123
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!