Showing posts from May, 2014

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

Paralysis Analysis - Part 1

According to Wikipedia, Analysis Paralysis is “a n anti-pattern, the state of over-analyzing (or over-thinking) a situation so that a decision or action is never taken, in effect paralyzing the outcome ”. Now today’s problem analyses the inverse of that expression: Paralysis Analysis. The problem was given by a Computer Science professor at University of Illinois at Urbana-Champaign : is there a way to assign unique digits (but no zeros allowed) to each letter in the expression Paralysis Analysis in such a way that you could split the word Paralysis into two parts whose product would then be the word Analysis? For example, we could have the following assignment: P=1 A=2 R=3 L=4 Y=5 S=6 I=7 N=8 In which case the word Paralysis would then be the number 123245676 and the word Analysis would be the number 28245676. One way that we could try to split Paralysis in such a case would be the following: PAR*ALYSIS Which would be equivalent to: 123*245676=30218148 But tha