Day 2 Problem B
Math mini-contest for D.Buzz for July 2021
The decimal number 16,954.248 converts to 1,244.650 in another number system. What is the base of the other number system?
The problem has originally been posted at @savvyplayer/julymathday2b.
Answer
≈ 24.9874
24.987 or 24.99 shall also be accepted as correct answers.
Background
To convert any decimal number to any other number system, we use the target number system's base as the divisor of the decimal number. The quotient will be used as the dividend of the succeeding division operation whose divisor remains as the same until the quotient reaches 0. The remainders comprise each of the digits of the target number system in reverse order.
For example, to convert 753 base 10 (which is the decimal number system) to base 8 (which is called the octal number system), we first divide 753 by 8, whose quotient is 94 remainder 1. We then divide 94 by 8, whose quotient is 11 remainder 6. We then divide 11 by 8, which gives 1 remainder 3. We divide 1 by 8, which gives 0 remainder 1. Using the remainders in reverse as the digits of the target octal number system, the result is 1,361 base 8.
However, this problem is slightly different, as we need to get the divisor of the decimal number used to get the resulting number in the target number system.
Solution
Our problem can be represented by 16,954.248 base 10 = 1,244.650 base n, where n is the base of the target number system.
Brute force
This solution is "trial and error" (or "guess and check"), starting from n = 11 and incrementing upwards by 1.
- If n = 11, 16954/11 = 1541 with a remainder 3. Since 3 is not the last digit of the number (which is 4) of the target number system, we immediately know that 11 is not the base of the target number system.
- If n = 12, 16954/12 = 1412 remainder 10. Since 10 is not equal to 4, we continue on.
- If n = 13, 16954/13 = 1304 rem 4. Since the remainder here is 4, we try to get the next remainder. 1304/13 = 100 remainder 4. Since the remainder is 4 again, we try to get the succeeding remainder. 100/13 = 7 remainder 9. Since the remainder of 9 here does not comprise the target number's third digit from the right before the point, we know that n is not 13.
- If n = 14, 16954/14 = 1211 without remainder.
- If n = 15, 16954/15 = 1130 r 4. 1130/15 = 75 r 5.
- If n = 16, 16954/16 = 1059 r 10.
- If n = 17, 16954/17 = 997 r 5.
- If n = 18, 16954/18 = 941 r 16.
- If n = 19, 16954/19 = 892 r 6.
- If n = 20, 16954/20 = 847 r 14.
- If n = 21, 16954/21 = 807 r 7.
- If n = 22, 16954/22 = 770 r 14.
- If n = 23, 16954/23 = 737 r 3.
- If n = 24, 16954/24 = 706 r 10.
- If n = 25, 16954/25 = 678 r 4. 678/25 = 27 r 3. 27/25 = 1 r 2. 1/25 = 0 r 1. The resulting number is 1234 (but the original problem has 1244.65 as the number in the target number system).
- If n = 26, 16954/26 = 652 r 2.
Since n having a value of 25 brings us so close (yet not exactly) to the number in the target number system, it is safe to assume that the base of the number system is not a whole number.
Algebraic
Because n serves as the target number system, it can be used to determine the base of the target number system to get the origin (decimal) number system. (Refer to the "Background" section above on this post.)
(1) * n³ + (2) * n² + (4) * n + (4) = 16954
n³ + 2n² + 4n - 16950 = 0
Note that this algebraic solution did not include the decimal value, because of two reasons listed below.
- Even very powerful calculators won't be able to solve for the value of n if we use the more precise equation of
(1) * n³ + (2) * n² + (4) * n + (4) + (6) / n + (5) / n² = 16954.248
(which includes the fractional part). - The error margin is so small (from rounding off the result) that it would not be worth the effort.
We now have a cubic equation in one variable. Solving for the value of n (which is another topic in Math), we get approximately 24.9874, which is our final answer.
Winner: none
1 HIVE has been transferred to the prize pool, which will be awarded to the participant with the highest number of correctly-answered problems after all the challenge problems in this Math mini-contest have been concluded.
Problems like these are much easier to answer (by guessing or analysis) than for its (detailed) solution to be shown.
Special winner: @lolxsbudoy
Although @lolxsbudoy did not get the exact answer which is relatively and absolutely very close to his answer of 25 which is approximately 0.05% away from the correct answer, I have awarded 1 HIVE to him for his effort as our special participant who answered the problem almost correctly. I would like to optionally invite him (again) to show his solution for the problem.
Award transaction at https://hiveblocks.com/tx/d82860df298819b4901f29e09ceacbd3e0627183.
Mentions: @jfang003, @holovision, @eturnerx (@eturnerx-dbuzz), @ahmadmanga (@ahmadmangazap), @appukuttan66, @paultactico2, @dkmathstats, and @minus-pi
Special mentions: @dbuzz, @chrisrice, @jancharlest, and @mehmetfix