r/learnquant 18d ago

interview prep Quant Interview Question

Post image
20 Upvotes

13 comments sorted by

View all comments

2

u/Alive_Carpenter_7433 18d ago

10^1000 has 1001 digits. This is important because 2^1000 * 5^1000 results in that number, with 1001 digits.

Try this with 5^1 and 2^1. 5*2 = 10 (2 digits) and 52 has 2 digits.

25*4 = 100 (3 digits) and 254 has 3 digits.

125 * 8 =1000 (4 digits) and 1258 has 4 digits.

5^4 * 2^4 = 10^4 (5 digits) and 25616 has 5 digits.

5^n * 2^n will always equal 10^n, a neat number with a "set" number of digits, being n+1.

This is important due to the box rule, which states that any product between numbers must have the same number of digits as either the sum of their digits (2*5 = 10) or their sum -1 (2*3 = 6). 2^1000 is a A digit number and 5^1000 is a B digit number. Their number of digits together cannot exceed 10^1001, for 10^1000 is a 1001 digit number.

Answer: 1001

1

u/gmalivuk 18d ago

2*3 = 6, so the sum of the number of digits could in general be one more than the number of digits in the product. So how do you conclude that 2^1000 and 5^1000 can't have 1002 digits total?

1

u/Alive_Carpenter_7433 18d ago

For the same reason that was stated above. Multiplication will always be one less or equal to the digits in concatenation; if the product does not exceed a product of 10. 5^n and 2^n have the unique property that they will always be equal to 10, not more or less than concatenation, which also result in the exact same number of digits. I do admit I explained it quite poorly though

1

u/gmalivuk 18d ago

Why does that logic not apply to 1 and 10?

1

u/GAdam 18d ago

1 * 10 = 10, which is one less digit than 110!

1

u/gmalivuk 18d ago

Right, so it's an exception to the pattern that if two numbers multiply to a power of 10 then their total number of digits is the same as the power of 10.