Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions