|
-
Mar 4th, 2007, 06:04 PM
#28
Re: a^2+b^2+c^2=45 when a+b+c=11
 Originally Posted by VBAhack
Funny, I just did the same thing with 10 variables and got a few more gray hairs waiting for it to complete - I stopped it after 15 minutes (no patience).
15 minutes?
I have just spend the last hour or so recoding the recursive subroutine I mentioned, optimizing the code to avoid unnecessary calculations. Given 10 variables with sum 114 and sum of squares 1826, I have these results:
0 < a < b < c... 492 solutions in 0.16 seconds
0 < a ≤ b ≤ c... 12672 solutions in 4.8 seconds
0 ≤ a ≤ b ≤ c... 17459 solutions in 8.1 seconds
Obviously, there are a great many permutations of those solutions when the restriction of a ≤ b ≤ c is removed. This, however, is entirely independent of the number of unique solutions. Whether or not this restriction actually applies is a moot point. Any solution in which b < a is a permutation of some solution in which a < b.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|