3 5 On log n Algorithm for Closest Pair II Advanced Optional 19 min

Sdílet
Vložit
  • čas přidán 26. 01. 2017

Komentáře • 15

  • @jianxiang
    @jianxiang Před 6 lety +6

    This thinking inspires me a lot.

  • @DaniloSouzaMoraes
    @DaniloSouzaMoraes Před 5 lety +2

    The algorithm is beautiful and the instructor is very good. Very clear explanation

  • @code-with-carlos
    @code-with-carlos Před 4 lety +1

    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.

  • @nimishshah3971
    @nimishshah3971 Před 5 lety +3

    This is insane!

  • @__redacted__
    @__redacted__ Před 4 lety +2

    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
      @nahjeesowah6022 Před 2 lety

      euclidean distance !=pythagorean distance

    • @hidude1354
      @hidude1354 Před 2 lety

      @@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

  • @jiaruowang9492
    @jiaruowang9492 Před 4 lety

    Thank you so much for the great great explanation. I would have dropped my algorithm class otherwise...

  • @jonathanlee8162
    @jonathanlee8162 Před 2 lety +1

    Can we use max 4 instead of 7? But that is if j iterates from after x bar.

    • @jonathanlee8162
      @jonathanlee8162 Před 2 lety

      But yup I understand that it’ll still be O(n) even if it’s 4

  • @soon931111
    @soon931111 Před 3 lety +1

    I'm sorry, isn't the graph you drew called horizontal strip instead of vertical strip?

    • @mcpickle91
      @mcpickle91 Před 3 lety

      if you mean at 6:50, then I agree.

    • @jonathanlee8162
      @jonathanlee8162 Před 2 lety

      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

  • @JoeBaloney
    @JoeBaloney Před 9 měsíci

    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)

  • @nahjeesowah6022
    @nahjeesowah6022 Před 2 lety

    now the real question is why 8 boxes, with this definition it could be variety of constants