Question: Let Cn = { w in { 0 , 1 , 2 } w is a number in base 3 that is a multiple of
Let Cnw in w is a number in base that is a multiple of n
For example, C
but in C
since
in base is
in base
Give a DFA for C
Show that for all n
Cn
is regular by giving a DFA for it
Hints:
As in Exercise you must specify the DFA as a tuple that depends on n
You need only remember the current value of the number modulo n
Reading a
changes the current value from K
to K
If K
is some integer and k
is its value modulo n
then K
is congruent to k
modulo n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
