Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ ¹ ² ³ °
 

You are not logged in. #1 20090808 21:11:34
Sum of fractions which equals 1Hi all folks, #2 20090808 23:29:06
Re: Sum of fractions which equals 1Hi shiwaji, a question for you, can you prove this is the only solution? Last edited by bobbym (20090809 08:45:25) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #3 20090810 15:40:55
Re: Sum of fractions which equals 1hello bobbym, #4 20090810 15:57:19
Re: Sum of fractions which equals 1Hi shiwaji; In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #5 20090811 01:50:34
Re: Sum of fractions which equals 1Hi Bobby, "The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."  Ted Nelson #6 20090811 06:01:22
Re: Sum of fractions which equals 1Hi phrontister; Code:FOR A=1 TO 9 FOR B=1 TO 9 FOR C=1 TO 9 FOR D=1 TO 9 FOR E=1 TO 9 FOR F=1 TO 9 FOR G=1 TO 9 FOR H=1 TO 9 FOR I=1 TO 9 IF A/(10*B+C) + D/(10*E+F) + G/(10*H+I) =1 THEN Print[A,B,C,D,E,F,G,H,I] NEXT I NEXT H NEXT G NEXT F NEXT E NEXT D NEXT C NEXT B NEXT A As an exercise for you, what can you do to speed it up. Last edited by bobbym (20090814 20:33:23) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #7 20090811 07:51:56
Re: Sum of fractions which equals 1
bobbym,
It seems that BC would take 2 numbers from a set of 9 digits. #8 20090811 07:59:56
Re: Sum of fractions which equals 1Hi integer; Code:Also IF A/(10*B+C) + D/(10*E+F) + G/(10*H+I) =1 THEN Print[A,B,C,D,E,F,G,H,I] is the worst way to test for success. Last edited by bobbym (20090815 11:18:03) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #9 20090811 08:22:27
Re: Sum of fractions which equals 1Integer also notes that since the left hand side's terms are all the same structure, the number of permutations can lose another factor of 6. Why did the vector cross the road? It wanted to be normal. #10 20090811 09:10:42
Re: Sum of fractions which equals 1Easier now with hindsight to prune out permutations, since there is only one answer. Doing it beforehand could prune out the solution. Thats why I went with the permutations of 9. Last edited by bobbym (20090811 15:10:31) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #11 20090811 19:52:47
Re: Sum of fractions which equals 1I was curious to find out how an experienced BASIC programmer would tackle this in BASIC, and as I use LibertyBASIC I posted a question on their forum this afternoon. Janet responded (verrrrry quickly!) with this code, which in 86 seconds finds that there is only one solution (the one quoted by Bobby...plus its 5 positional permutations): I haven't tried to understand the code yet, but I'll post it now anyway. Last edited by phrontister (20090811 22:48:32) "The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."  Ted Nelson #12 20090811 21:34:23
Re: Sum of fractions which equals 1Just wondering, are there number theory problems for which there is a proof that a solution cannot be reached without brute force? #13 20090811 23:52:40
Re: Sum of fractions which equals 1Hi phrontister;
My beef with her code is this line! Last edited by bobbym (20090812 00:02:20) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #14 20090811 23:57:19
Re: Sum of fractions which equals 1Hi identity; In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #15 20090812 00:29:40
Re: Sum of fractions which equals 1Hi Bobby,
What beef is that? Do you have a fix for it, or a better approach altogether? "The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."  Ted Nelson #16 20090812 00:34:13
Re: Sum of fractions which equals 1Hi phrontister; Last edited by bobbym (20090812 01:04:02) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #17 20090812 05:44:34
Re: Sum of fractions which equals 1
Yes  I think I can see that relying on results from fractions can, in some circumstances, produce errors.
Is this the sort of thing you mean, Bobby? It seems a bit wordy...you've probably got a better way of expressing that. Last edited by phrontister (20090812 05:45:41) "The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."  Ted Nelson #18 20090812 07:26:34
Re: Sum of fractions which equals 1Hi phrontister; Code:a=10 f=1/3 [loop] a=af if a=0 then print "done" : end print a goto [loop] Or try this x = 0 f=1/7 while x <> 500 x = x + f print x wend end For some fractions they terminate as expected and for some others they don't. Floating point arithmetic is not the same as how humans work with numbers. Where we see the number line as continuous, to the computer there are gaps like morse code. Some numbers cannot be represented in binary in a finite amount of digits. These were prepared quickly and may contain bugs but the principles are standard from numerical analysis. Last edited by bobbym (20090818 17:09:05) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #19 20090812 10:35:12
Re: Sum of fractions which equals 1Hi Bobby,
The principle of this workaround came to me in bed last night just before I went to sleep (my mind's most productive moments!), and I was going to post about it morning...but you've saved me the trouble. "The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."  Ted Nelson #20 20090812 16:41:45
Re: Sum of fractions which equals 1So could this problem be solved theoretically? #21 20090812 17:12:11
Re: Sum of fractions which equals 1Hi Identity;
Since you got me looking at Basic, I dug up an old, old copy of QBasic 7.1. It only has an old dos gui. but it's like 25 times faster than LBasic 4.02 on my machines. Last edited by bobbym (20090813 23:08:57) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #22 20090813 23:41:08
Re: Sum of fractions which equals 1Hi Bobby,
I tried those exercises and I see what you mean. 1/10 surprised me.
I tried that, but I got the same incorrect responses as before. Maybe I didn't code it correctly. I'll try again... As you suggested, I changed the offending line. I came up with: Same results as before, in the same time. "The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."  Ted Nelson #23 20090813 23:52:55
Re: Sum of fractions which equals 1Hi phrontister; In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #24 20090814 02:31:12
Re: Sum of fractions which equals 1I don't have "break". My OS is Windows XP. I tried CTRL + all the buttons on my keyboard, but nothing except F10 did anything (F10 paused it, but I couldn't gain any further control over the program from there). "The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."  Ted Nelson #25 20090814 17:20:49
Re: Sum of fractions which equals 1Its ctrl + pause/break : this key is above the arrow keys (at the top). It stops program execution in LBasic. Last edited by bobbym (20090814 17:21:41) In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. 