Solution to part 1:
They can have 10^9 clients. This works if, for example, the sum of all the digits mod 10 is zero for each code.
This is provably the maximum number of clients. Given any ten digit code, there are 90 codes that differ by exactly one digit. Let's call these 90 codes "adjacent" to the first chosen code. Of these adjacent codes, only 10 can be given to clients at most. Since every used code is adjacent to 90 unused codes, and every unused code is adjacent to at most 10 used codes, then the highest ratio of used to unused codes is 9:1. Therefore, the most clients they can have is 1/10 of all possible codes, or 10^9. |