Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let Cn = { w in { 0 , 1 , 2 } w is a number in base 3 that is a multiple of

Let Cn={w in {0,1,2}w is a number in base 3 that is a multiple of n}
. For example, 2210C2
but 2210 in C3
, since 2210
in base 3 is 75
in base 10.
Give a DFA for C2
.
Show that for all n
, Cn
is regular by giving a DFA for it.
Hints:
As in Exercise 2, you must specify the DFA as a 5-tuple that depends on n
.
You need only remember the current value of the number modulo n
.
Reading a 1
changes the current value from K
to 3K+1
.
If K
is some integer and k
is its value modulo n
, then 3K+1
is congruent to 3k+1
modulo n

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

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

Describe three advantages of LR parsers.

Answered: 1 week ago

Question

Explain the causes of indiscipline.

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago