Problem 44497. It's Happy! It's Fun! It's Happy Fun Hyperball!
Solution Stats
Problem Comments
-
4 Comments
Hello, James & all. What a happy Problem! There are a few details I am not getting and would appreciate clarifications on:
***Summation of enumerated cases*** In the example there are fourteen occurrences of "±". Wouldn't that provide a total of 28 distinct points in space (instead of 24)? That is, 2 for each of the first four bullets, and 4 for each of the last five bullets? ***Enumeration of cases*** Following the pattern in the example, I would have expected one additional bullet comprising (±1,0,0,±1). That would suggest happy_fun_hyperball(2)=32. ***Points "on" surface*** If points are to be "on" the surface, then can (±1,±1,0,0) qualify for r=2? Given this has the third and fourth variables set to zero, then shouldn't (±1,±1,0,0) also be "on" the circle of r=2 in the x–y plane? Yet (1,1) is a distance of √2 from the origin. So then could happy_fun_hyperball(2)=8?
Thanks, David
The 24 solutions for r=2 are actually [-2 0 0 0;-1 -1 -1 -1;-1 -1 -1 1;-1 -1 1 -1;-1 -1 1 1;-1 1 -1 -1;-1 1 -1 1;-1 1 1 -1;-1 1 1 1;0 -2 0 0;0 0 -2 0;0 0 0 -2;0 0 0 2;0 0 2 0;0 2 0 0;1 -1 -1 -1;1 -1 -1 1;1 -1 1 -1;1 -1 1 1;1 1 -1 -1;1 1 -1 1;1 1 1 -1;1 1 1 1;2 0 0 0].
Aahaa... Thank-you for the explanation, Tim. Actually it was quite simple when looking at the correct numbers. So we could also summarise it as four similar patterns (±2,0,0,0), (0,±2,0,0), (0,0,±2,0) and (0,0,0,±2) accounting for 4×2=8 points, and one more pattern (±1,±1,±1,±1) accounting for 1×2⁴=16 points. Thus a grand total of 24 points. —DIV
I originally had the points for w^2+x^2+y^2+z^2=r, as opposed to r^2. Sorry for the confusion, David...and thanks for taking care of the clarification, Tim!
They're fixed now, and the problem statement has been changed a bit to hopefully clear things up.
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
1515 Solvers
-
Vectorize the digits of an Integer
305 Solvers
-
Solve Quadratic : No * - or key functions permitted
32 Solvers
-
Check if number exists in vector
9282 Solvers
-
Balanced Ternary Numbers: Easy as |, |-, |o
26 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!