July 2018 little math problem
|
07-26-2018, 03:43 PM
Post: #12
|
|||
|
|||
RE: July 2018 little math problem
(07-26-2018 12:36 PM)pier4r Wrote: I do believe there is a strong pattern. Mine is pretty weak but I didn't yet see it, maybe because I did not strictly check the posted code. We can start with \(e\in\{1\ldots9\}\). And then let \(c\) and \(g\) be different digits with \(c<g\). This gives us \(9\times\binom{8}{2}=252\) possibilities. But since \(s=a+b+c=c+d+e=e+f+g=g+h+i\) and \(a+b+c+d+e+f+g+h+i=\sum_{k=1}^{9}k=45\) we know that their sum is \(4s=45+c+e+g\) which must be divisible by 4. This reduces the possibilities further down to 60. We can now calculate \(d=s-c-e\) and \(f=s-e-g\) and check that both are digits. And of course each element of \(\{c,d,e,f,g\}\) must be unique. With this we're down at 12 possibilities: Code: Spoiler alert! Now it's easy to find \(a\) and \(b\) so that \(a+b+c=s\) and similarly find \(h\) and \(i\) so that \(g+h+i=s\). Code: Spoiler alert! Checking only 252 instead of 9! = 362,880 possibilities speeds us up by the factor 1,440. Even checking that 45+c+e+g is divisible by 4 is rather simple. Thus here's a program for the HP-42S that lists possible tuples "c:d:e:f:g". You have to weed some of them out though. But that's still easier than doing the whole calculation manually. Code: Spoiler alert! Make sure to have the display mode set to ALL. This will lead to a list like this: 6:2:9:0:8 → discard since f=0 is not valid 5:3:9:-1:9 → discard since f=-1 is not valid 4:3:9:1:6 → this is a valid solution ... Cheers Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)