Alright, I made a plot, and it turned out pretty cool. I had to limit it to something that could be shared, and where you could actually see the detail on a 1080p monitor, so I only did 0-2,000.
Every point represents a combination of apple and banana values where it's possible to choose the right pineapple value where you get close to 4. Specifically, where your difference from 4 is less than one part per million. For some combinations, you can pick either a large (in the 1000s) pineapple value, or a small (in the 100s) value. Separating these plots out, apparently you never get a good solution with a small pineapple value when the apple and banana values are too close.
Wish that's super cool, is definitely got a pattern going on. Looks almost like a fractal or interference. Also cool how you can see the linear area where there's no possible solution for pineapple.
Yeah, I kind of thought it was just going to look like static, but I was curious, and it was actually pretty interesting.
I was skeptical at first, because you can get patterns like that in cases like taking a picture of a computer screen, when the pixel grids don't line up, but I checked it at 0-200, when the data points are much larger than the monitor pixels, and the patterns are still there.
So I plotted the large pineapple solutions in 3d, and all of the points are almost perfectly in a plane, there's not much to see there. There's some asymptotic behavior here that means that at this scale, the large pineapple solution will always be close to 4*(apple+banana).
The small pineapple solutions were a little more interesting. They are in two separate planes on either side of the divide in the middle. You can see them here. I also raised the error tolerance to add more scatter points, and you can see that there are similar patterns here, the solutions are just sparser.
Edit: Here is the two solution sets together, for comparison.
I was gonna plot the (real) solution set to the original when I had some time, assuming the macOS Grapher utility can even compute it. Will try sage or something if that doesn’t work.
I was looking at the work @Pezevenk was doing with lower and upper bounds, and thought that could be used to make the 3d plot more meaningful. His inequalities say that we can iterate the lower and upper bounds with
U_(n+1)=4-1/(1+2*U_n)
L_(n+1)=4-1/(1+2*L_n)-1/L_n
which gives 3.6003 < c/(a+b) < 3.8861
Plotting this value instead of the actual pineapple value effectively exaggerates the deviations from a perfect plane. Now the points are on some kind of a curved 2d surface.
I thought it was interesting that the values only covered about a tenth of the allowed range. The real solution from google is very close to halfway between the bounds, so I would guess that someone could find tighter bounds (no idea how).
I'm not sure what to do with the small pineapple group, since the bounds don't apply to them. Although I suspect that this group might just be some of the same solutions with their variables swapped around.
I also added color to the 2d plots to show which combinations were closer to being solutions than others. I tried plotting the error as the Z-axis, and it just comes out as a cloud of gas. The only time I could see any noticeable pattern was the 2d patterns that you see when looking along the Z-axis
I really couldn't say. You'd probably need someone at least a little familiar with the analytical way of solving it. I looked at the explanation, and I have no idea how that stuff works.
I'm using python, but I'm trying to figure out what to actually put on the plot. I was thinking apple value as one axis, banana value as the other, then plotting a scatter of the 1000 or so best combinations that allow you to pick a good pineapple.
Maybe just plot the near misses? Anything within +/- 1 of the goal. Just do a 3d plot with xyz being the variables. Don't know if a scatter plot would be more visible, or a line plot.
Can you do a plot of the first like 20,000 integers?
Alright, I made a plot, and it turned out pretty cool. I had to limit it to something that could be shared, and where you could actually see the detail on a 1080p monitor, so I only did 0-2,000.
Here's the graphs
Every point represents a combination of apple and banana values where it's possible to choose the right pineapple value where you get close to 4. Specifically, where your difference from 4 is less than one part per million. For some combinations, you can pick either a large (in the 1000s) pineapple value, or a small (in the 100s) value. Separating these plots out, apparently you never get a good solution with a small pineapple value when the apple and banana values are too close.
Wish that's super cool, is definitely got a pattern going on. Looks almost like a fractal or interference. Also cool how you can see the linear area where there's no possible solution for pineapple.
Yeah, I kind of thought it was just going to look like static, but I was curious, and it was actually pretty interesting.
I was skeptical at first, because you can get patterns like that in cases like taking a picture of a computer screen, when the pixel grids don't line up, but I checked it at 0-200, when the data points are much larger than the monitor pixels, and the patterns are still there.
Is there a way for you to do a 3d plot? That might show the trends a bit more clearly
So I plotted the large pineapple solutions in 3d, and all of the points are almost perfectly in a plane, there's not much to see there. There's some asymptotic behavior here that means that at this scale, the large pineapple solution will always be close to 4*(apple+banana).
The small pineapple solutions were a little more interesting. They are in two separate planes on either side of the divide in the middle. You can see them here. I also raised the error tolerance to add more scatter points, and you can see that there are similar patterns here, the solutions are just sparser.
Edit: Here is the two solution sets together, for comparison.
Now I'm interested in what's causing those patterns, neat how is the same on both planes
Diofruitine, lmao gottem
I was gonna plot the (real) solution set to the original when I had some time, assuming the macOS Grapher utility can even compute it. Will try sage or something if that doesn’t work.
I’ll ping ya if it’s not a reply to your post
I'd be interested to see it.
I was looking at the work @Pezevenk was doing with lower and upper bounds, and thought that could be used to make the 3d plot more meaningful. His inequalities say that we can iterate the lower and upper bounds with
U_(n+1)=4-1/(1+2*U_n)
L_(n+1)=4-1/(1+2*L_n)-1/L_n
which gives 3.6003 < c/(a+b) < 3.8861
Plotting this value instead of the actual pineapple value effectively exaggerates the deviations from a perfect plane. Now the points are on some kind of a curved 2d surface.
I thought it was interesting that the values only covered about a tenth of the allowed range. The real solution from google is very close to halfway between the bounds, so I would guess that someone could find tighter bounds (no idea how).
I'm not sure what to do with the small pineapple group, since the bounds don't apply to them. Although I suspect that this group might just be some of the same solutions with their variables swapped around.
I also added color to the 2d plots to show which combinations were closer to being solutions than others. I tried plotting the error as the Z-axis, and it just comes out as a cloud of gas. The only time I could see any noticeable pattern was the 2d patterns that you see when looking along the Z-axis
Plots
What causes those wave patterns? I took some calculus freshman year, so this is entirely out of my wheelhouse
I really couldn't say. You'd probably need someone at least a little familiar with the analytical way of solving it. I looked at the explanation, and I have no idea how that stuff works.
Until then, pretty shapes!
This is dope. Perhaps I will try to figure out better bounds.
I'll have to think about how you could show that. Did you have anything in mind?
Are you using Python? I think numpy has a plot function. Been forever since I've used it.
Unless you meant how to plot the equasion...I guess thats not really possible because it's limited by the constant.
I'm using python, but I'm trying to figure out what to actually put on the plot. I was thinking apple value as one axis, banana value as the other, then plotting a scatter of the 1000 or so best combinations that allow you to pick a good pineapple.
Maybe just plot the near misses? Anything within +/- 1 of the goal. Just do a 3d plot with xyz being the variables. Don't know if a scatter plot would be more visible, or a line plot.