English (unofficial) translations of posts at kexue.fm
Source

[Q&A] How Many Digits?

Translated by DeepSeek V4 Pro. Translations can be inaccurate, please refer to the original post for important stuff.

After solving the previous problem "How many 5s?", Zirui mentioned seeing a similar problem. Of course, this problem is a bit harder than the previous one:

A number’s digits sum to 900. After multiplying the number by 2, the sum of its digits is still 900. Given that this number is composed only of the digits 3, 4, 5, and 6, how many digits are in the product of the maximum and minimum numbers that satisfy these conditions?

To answer this question, we only need to know the number of digits in the maximum and minimum numbers respectively. This is because the maximum number must be in the form 6...3, and the minimum number can only be in the form 3...6. The sum of their number of digits will be the required number of digits for the product.

How do we compare the size of two numbers? Obviously, when numbers have different numbers of digits, the one with more digits is larger; if they have the same number of digits, they are compared digit by digit from the highest to the lowest place. Therefore, we should consider the maximum and minimum number of digits.

Let this number have a 3s, b 4s, c 5s, and d 6s. From the given conditions, we have: 3a + 4b + 5c + 6d = 900 \tag{1} 6a + 8b + c + 3d = 900 \tag{2} And let s = a + b + c + d, where s is the total number of digits. We need to find the maximum and minimum values of s. Here, since there are two equations, only two of the variables a, b, c, d are independent, and due to the constraints of the problem itself, they must be positive integers. Thus, this problem is a simple linear programming and number theory problem.

(1) \times 2 - (2) yields: c + d = 100 From this, it follows that c and d are not independent, and thus a and b are not independent either.

(1) + (2) yields: 3a + 4b + 2c + 3d = 600 Which gives: s = 200 + \frac{c - b}{3}

From the above reasoning, c and b are independent. Therefore, to find the maximum s, let us tentatively set b=1 and c=97; substituting these, we find that a reasonable solution a=131 exists. Thus, the answer is found: the maximum s is 232.

Similarly, to find the minimum s, let us tentatively set c=1, which means d=99. Substituting into 3a + 4b + 2c + 3d = 600, we get: 3a + 4b = 301 Taking the largest b, when a=3, we get b=73; substituting back into s = 200 + \frac{c - b}{3}, we obtain the integer s=176.

We have reason to believe that the minimum s is 176. Of course, if you are still unsure, you can tentatively set c=2 and see what result you get. There is no need to test c=3, 4, etc., because generally speaking, an increase in c leads to a decrease in b, which in turn makes c-b larger.

Therefore, we know the final answer is: 232 + 176 = 408! The number of digits originally requested by the problem!

When reposting, please include the address of this article: https://kexue.fm/archives/1922

For more detailed information on reposting, please refer to: Scientific Space FAQ