aark (07/16/82)
Why is using a computer to solve the ABCDE problem better than using pencil, paper, and human reasoning? Because it has serendipitous results far beyond simply finding the answer to the problem. The question was, "What five-digit number ABCDE, when multiplied by 4, gives the number EDCBA, with the digits in reverse order?" The answer is 21978. I admit, this problem is easy to do without a computer, simply by reasoning. The computer technique of trying all five-digit numbers until the answer is found seems at first glance crude, cop-outish, and brute-force-ish in comparison. But! Let's ask a few more questions, starting from the stated problem. 1. "How many five-digit numbers ABCDE, when multiplied by any other digit F, yield the answer EDCBA?" Obviously, when F is 1, any five-digit palindromic number works. Let us eliminate these trivial solutions and ask, "How many five-digit numbers ABCDE, when multiplied by any digit F from 2 to 9, yield the answer EDCBA?" If one had to rely on one's human abilities alone, many of us would say, "That's too difficult" and drop the line of inquiry. But a simple addition to the computer program allowed me to instantly discover that the pair (21978, 4) is the ONLY pair that satisfies the stated conditions. Intuition gives no hint that this is so. 2. Unique things intrigue me, which prompted me to ask the next question: "For any positive integer n>=2, how many n-digit numbers ABC..., when multiplied by any digit F from 2 to 9, yield the answer ...CBA (same digits in reverse order)?" Once again, a simple addition to the exhaustive-search computer program allowed me to experiment. It turns out as follows: For n=2, no pair satisfies the conditions. For n=3, no pair satisfies the conditions. For n=4, the unique solution is (2178, 4). For n=5, the unique solution is (21978, 4). For n=6, the unique solution is (219978, 4). Aha! A pattern is beginning to form. Could it be true that the number 219...978, with any number of 9's, when multiplied by 4, yields the reverse-order digits 879...912? A quick check using the calculator program on the computer proved the conjecture was true for 2199978, 21999978, and 219999978. This motivated me to finally take pencil and paper and prove that the conjecture is true for any number of 9's. (Prove it yourself; it's easy enough.) 3. The last conjecture, which is suspect is true but haven't tackled yet, is: "For any positive integer n>=2, the pair (219...978, 4) is the ONLY pair of numbers (the first having n digits and the second being >= 2 and <= 9) which, when multiplied together, yields the first number with its digits reversed." Any of you pencil-pushers care to take that one on? The point of all this is that without that powerful problem- solving tool, the computer, I (and I would venture to say, most of the rest of you) would never have gone on to discover the more general truth that 219...978 times 4 equals 879...912 for any number of 9's. Using the computer has sparked my imagination and given serendipitous results. Of course, this result is not very useful; my life has not been radically changed by it; it will not solve the problems of the world. However, it's the principle that's important. Those narrow-minded superior types who eschew "brute-force" computer solutions and denigrate those who use the computer in this way will, I assert, never discover the things that we enlightened computer users do. Remember, no one was able to prove the Four Color Map theorem until they brought in a computer to aid human intuition and do the dirty work in a manner similar to that described above. Alan Kaminsky ... ihps3!ihuxv!aark P.S. Those who feel compelled to continue this discussion, let's move it to the net.followup newsgroup, please. I'll be happy to go on arguing, but let's leave net.math uncluttered.
rjs (07/17/82)
Another interesting use of computers to find patterns is to start with the observation that to solve 16/64, just cancel the 6's and obtain 1/4. The question then becomes "What other numbers have this property?". I did some experimenting along this line last year with a computer and discovered a number of interesting (but usless for everyday living) patterns. The only one I remember off hand is that 16666...6/6666...64 = 1/4 (same number of 6's top & bottom). p.s. There are 4 sets of 2-digit numerators and denominators which exhibit this cancelation property and are non-trivial (i.e. 11/66). All of them extend to n-digit numbers in a manner similar to 16/64. Robert Snyder (harpo!floyd!rjs)
thomas (07/17/82)
Last night as I lay in bed trying to go to sleep, I was thinking about the ABCDE x 4 puzzle and came up with the following observations: ...9*9... x n = ...9*.... (1 <= n <= 9) In other words, a number with a string of 9's in the middle will still have a string of 9's in the middle after multiplication by any digit. If the carry into the string of 9's from the right is n-1, then all the 9's will remain, otherwise the rightmost 9 will be lost. 219*78 x 4 is the only answer? If A...B x n = B...A (2 <= n <= 9) then - A x n (plus possible carry in) = B (no carry out) - B x n = A (plus possible carry out) - If n is even then so is A. This immediately eliminates n=6 or 8. n = 9: A = 1 -> B = 9, with no carry from the second to the left place. There are two ways this can happen: 1. A...B is a string of 1's. This obviously doesn't solve the problem. 2. The second digit is a 0. This leads to a solution: 1 0 8 9 x 9 ------- 9 8 0 1 This solution may be extended by inserting 9's in the middle 1 0 9 9 9 8 9 x 9 ------------- 9 8 9 9 9 0 1 There may be others, I didn't pursue that line too closely. n = 7: A = 1 -> B = 7,8,9; 7*7 = 9, 7*9 = 3, neither = 1. n = 5: A = 1 -> B = 5,6,7,8,9; Obviously 5*something != 1. n = 4: Leads to the previous solution. n = 3: A = 1 -> B = 3,4,5; 3*3 = 9, 3*5 = 5, neither 1. A = 2 -> B = 6,7,8; 3*6 = 8, 3*8 = 4, neither 2. A = 3 -> B = 9; 3*9 = 7 != 3. n = 2: A = 2 -> B = 4,5; 2*4 = 8, 2*5 = 0, neither 2. A = 4 -> B = 8,9; 2*8 = 6, 2*9 = 8, neither 4. QED (Sort of) Note also that any solution may be appended to itself to give a new solution! 21782178 x 4 = 87128712. Unanswered questions: Are there any other solutions for n=9? [ Again, I claim not. ] Are there any solutions for n=4 with the digit 0 included? [ No, a little pencil/paper calculation will show that there is no way to introduce a 0] If repeated digits are not allowed, the two solutions above are clearly the only possible solutions, and if 0 is also not allowed, then the solution for n=4 is the only solution. Note that this is a question which is ONLY answerable by applying some reasoning power. This is true in general of (non-trivial) mathematical questions. A computer brute-force solution may indeed be useful for pointing out a direction of investigation, or for suggesting patterns, but can never directly answer a uniqueness question like this one. =Spencer Thomas (harpo!utah-cs!thomas, thomas@utah-20)
djj (07/18/82)
Thanks to Spencer Thomas for his fine analysis of the ABCDE problem!!!!!! This is just the sort of analysis that I flamed (slightly) about previously. I think this illustrates the type of answer I would personally like to see for any problems posted to this newsgroup. Dave Johnson BTL - PY