There are
words of length
over the alphabet
. Prove that the following algorithm generates the sequence
of all these words such that any two consecutive words differ in exactly one digit.
(1)
(
zeros).
(2) Suppose
. Let
be the exponent of
in the representation of
as a product of primes, and let
. Replace the digit
in the word
by
. The obtained word is
.
words of length
over the alphabet
. Prove that the following algorithm generates the sequence
of all these words such that any two consecutive words differ in exactly one digit.(1)
(
zeros).(2) Suppose
. Let
be the exponent of
in the representation of
as a product of primes, and let
. Replace the digit
in the word
by
. The obtained word is
.
Školjka