1.30 Let Cn = { x | x is a binary number that is a multiple of n}. Show that for each n ≥ 1, the language Cn is regular.
Several people did not realize that problem 1.30 requires the representation of a number n in binary. Thus, for example, C7 would include strings such as the following:
A machine for Cn can be constructed as follows:
Let M = (Q, Σ, δ, qs, F) be defined as follows:
The proof of this construction is by induction on the length of the string. One can assume the following facts about modular arithmetic: