I was certainly confused with that seven points for-loop comparison in the previous video. This video made me realize of how cool this algorithm is. It is fairly interesting to see how the paradigm Divide and Conquer can drive to such algorithms.
So the magic of all of this is in 1) using the delta derived from the distance between 2 points in Q or R to feed into the 3rd subroutine 2) recognizing the Pythagorean distance based on delta 3) respecting the split pair definition and 4) enumerating through the remaining possible pairings for a given point
@@nahjeesowah6022 aren't all euclidean distances in essence pythagorean distances? euclidean distances are just distances between two points calculated from pythagoras' theorem so I don't see why this point is brought up
It’s the set of points from y = infinity to y= -infinity And between x bar + d and x bar - d. So yea it’s a vertical strip, but he didn’t draw the vertical lines
Taking the base cases into consideration, we can have a max of 3 points on the left and a max of 3 points on the right, so the worst-case scenario for the ClosestSplitPair() function is to loop over 3X3=9 times to find the closest-split pair, which is a different number from the 8-square method. Where is the missing point? (no pun intended)
This thinking inspires me a lot.
The algorithm is beautiful and the instructor is very good. Very clear explanation
I was certainly confused with that seven points for-loop comparison in the previous video. This video made me realize of how cool this algorithm is. It is fairly interesting to see how the paradigm Divide and Conquer can drive to such algorithms.
This is insane!
So the magic of all of this is in 1) using the delta derived from the distance between 2 points in Q or R to feed into the 3rd subroutine 2) recognizing the Pythagorean distance based on delta 3) respecting the split pair definition and 4) enumerating through the remaining possible pairings for a given point
euclidean distance !=pythagorean distance
@@nahjeesowah6022 aren't all euclidean distances in essence pythagorean distances? euclidean distances are just distances between two points calculated from pythagoras' theorem so I don't see why this point is brought up
Thank you so much for the great great explanation. I would have dropped my algorithm class otherwise...
Can we use max 4 instead of 7? But that is if j iterates from after x bar.
But yup I understand that it’ll still be O(n) even if it’s 4
I'm sorry, isn't the graph you drew called horizontal strip instead of vertical strip?
if you mean at 6:50, then I agree.
It’s the set of points from
y = infinity to y= -infinity
And between x bar + d and x bar - d. So yea it’s a vertical strip, but he didn’t draw the vertical lines
Taking the base cases into consideration, we can have a max of 3 points on the left and a max of 3 points on the right, so the worst-case scenario for the ClosestSplitPair() function is to loop over 3X3=9 times to find the closest-split pair, which is a different number from the 8-square method. Where is the missing point? (no pun intended)
now the real question is why 8 boxes, with this definition it could be variety of constants