Paralysis Analysis - Part 2
The solution to the problem is this: Word #1: PARALYSIS Word #2: ANALYSIS Best Split: PARALY * SIS (587893 * 141 = 82892913 with delta 228 (0.0000387826%) compared to ANALYSIS (82893141))) First, it is impossible to find a way to split PARALYSIS in such a way that the multiplication of its two parts would arrive exactly at ANALYSIS. But it is possible to get very close, with a discrepancy of only 0.0000387826%. The idea of how to solve this problem lies on few insights: 1) Brute-force is doable. Remember that we cannot have repeated digits, and we only have digits from 1-9 in the mix. Because of that we'll have a lower bound of 9!. In reality though, the loop might be stretched to 9^9, which is still doable (387,420,489). 2) The split of the words into two incurs into a simple binary and linear separation of the word PARALYSIS, which will only affect the constant of the algorithm by a factor of Len(PARALYSIS)-1 (or a factor of 8x), which even when multiplied by the worst-ca...