Alex writes down a string with four digits. (Since this is a string, not a number, it can start with a 0. For example, Alex could write 0472) Alex then feeds this string into a special counting machine, which counts the number of times the digits 0,1,2, and 3 appear in Alex's string, and then prints out the result.

For example, suppose Alex wrote 2322. The machine counts the number of times 0 appears (which is 0 times), the number of times 1 appears (which is also 0 times), the number of times 2 appears (which is 3 times), and the number of times 3 appears (which is 1 time). So the machine prints out "".

As another example, if Alex writes the string 0702 then the machine prints out "2010".

Alex wants to see if there are any four-digit strings that they can write down, so that the string the machine prints out is the same as the string that they fed into the machine. We'll call this an automatic string.

(a) Prove that an automatic string cannot contain a digit that is 5 or greater.

(b) Prove that an automatic string cannot contain a 4

(c) Prove that an automatic string cannot contain a 3

(d) Find all automatic strings.

Guest Dec 16, 2019