iDeer7
iDeer7
  • 7
  • 81 931
《星晴》Cover - 周杰伦 | 和声是灵魂哇
《星晴》Cover - 周杰伦 | 和声是灵魂哇
Переглядів: 285

Відео

Heather (cover) - Conan Gray
Переглядів 4472 роки тому
Piano vocal harmony
Dream a Little Dream of Me (cover)
Переглядів 5252 роки тому
Ukulele vocal harmony
Recipe for Romance - Charley Harrison
Переглядів 2202 роки тому
Vassar Jazz Ensemble - Concert Spring 2022 Video filmed by Doudou Official concert is archived in Vassar College music department page - Concerts & Events
Daybreak - Ghibli-styled original piece orchestrated
Переглядів 1572 роки тому
I have been studying Joe Hisaishi's compositions for Studio Ghibli for a year now, and I will continue to do so with some computational methods in my final semester at college. After analyzing around 60 cues from 10 Ghibli films, I found some musical characteristics (archetypes) present in almost all of Hisaishi's Ghibli works, which, in my view, most saliently define his recognizable style. Th...
Closest Pair of Points (Divide and Conquer) Explained
Переглядів 80 тис.3 роки тому
This is a recorded presentation for a college course (CMPU241, Spring 2021). Algorithm explained: Closest Pair of Points (using the Divide and Conquer method) Time & Space complexity: O(nlgn)

КОМЕНТАРІ

  • @1516TanviDeshpande
    @1516TanviDeshpande 6 днів тому

    Ommggg amazing explaination

  • @Pure_117
    @Pure_117 12 днів тому

    4:40 bookmark

  • @MMM-hn8os
    @MMM-hn8os 22 дні тому

    好棒好棒🙃

  • @MilkywayWarrior1618
    @MilkywayWarrior1618 Місяць тому

    For anyone confused about the "for j=1 to j = 7" part, here is my take at explaining this: For every point p in S, we need only to check points q in distance dist(p, q) <= d. Recall that every pair of points in the left sector has distance at most d. Same thing for the right sector. (If it wasn't that way, we would have a smaller d.😏) Take a paper and draw a circle (a filled circle, not just circumference) of radius d and center point p. Try fitting as many points inside as you can, so that all points in the left half are at least d distance apart from each other. And in the right half, also they are d distance apart. You get a hexagon (6 vertices + 1 center = 7) i.imgur.com/FWN0Okm.png Thus we can iterate through S and check just the next 7 points.

    • @MilkywayWarrior1618
      @MilkywayWarrior1618 Місяць тому

      One more thing: About the points laying exactly in the line going through center. We don't know in which sector (left or right) they will be sentenced to.

  • @SewonKimMusic
    @SewonKimMusic Місяць тому

    this is amazing. Thank you so much for saving our souls in algorithm class.

  • @HaziqAzlanShah
    @HaziqAzlanShah Місяць тому

    hello, i wish you could do more explanation videos like this. I really appreciate your clear explanation!!!

  • @LalithaManasviniS.P
    @LalithaManasviniS.P Місяць тому

    Thank You ma'am.

  • @saketkumar4972
    @saketkumar4972 2 місяці тому

    how did she arrived at the 2nd strip

  • @dhyeyparekh4994
    @dhyeyparekh4994 2 місяці тому

    very very nice explanantion....

  • @nopesep9123
    @nopesep9123 4 місяці тому

    Incredible explanation, the best I have found, thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!

  • @ZihanLiu-vq2lt
    @ZihanLiu-vq2lt 4 місяці тому

    牛逼 上课没听懂在你这里听懂了

  • @MagicThanos7
    @MagicThanos7 4 місяці тому

    we definitely need more of these explanations from you

  • @alvjkd
    @alvjkd 5 місяців тому

    wow this was amazing. thank you so much for this!!

  • @ngchongpeng
    @ngchongpeng 5 місяців тому

    i have a question. does the question assume there are coincident points? if coincident points arent allowed, then when checking in the 2d * d rectangle, can we just check for the next 5 points instead of 7? since coincident points will not happen. thanks.

  • @balakr231
    @balakr231 5 місяців тому

    The only tutorial on the channel had to be the on the topic i was looking for.

  • @Japo0po0
    @Japo0po0 5 місяців тому

    Best explanation, bar none

  • @fouadbouarourou7885
    @fouadbouarourou7885 6 місяців тому

    OMG, that was the BEST explanation EVER! You're a lifesaver, thanks a TRILLION!

  • @soyei
    @soyei 6 місяців тому

    great explanation, thank you

  • @1arpaxad
    @1arpaxad 6 місяців тому

    I think it's enough to iterate j from 1 to 4 because in each side the maximum number of points is 4

  • @darshanbhaiya8711
    @darshanbhaiya8711 6 місяців тому

    Great Explanation but i have not understood clearly

  • @joelwillis2043
    @joelwillis2043 6 місяців тому

    now find the optimal solution for N-dimensional Euclidean space.

  • @onurbaran4016
    @onurbaran4016 7 місяців тому

    For split pairs why we iterating 1 to 7?

  • @samanasghari6213
    @samanasghari6213 8 місяців тому

    That was awesome Keep it going🎉🎉

  • @averagestanduser6967
    @averagestanduser6967 8 місяців тому

    W vid

  • @spiridiant
    @spiridiant 8 місяців тому

    感恩

  • @mohammadyahya78
    @mohammadyahya78 8 місяців тому

    amazing amazing amazing and the best explanation for this problem. Thank you

  • @鐘振元-i8o
    @鐘振元-i8o 10 місяців тому

    講的很好!😊

  • @ghostwar9103
    @ghostwar9103 10 місяців тому

    how did you find delta in 6,8 do you brute force the left and the right with out divide it ?

  • @azmainfaiak8111
    @azmainfaiak8111 10 місяців тому

    3:55 7 points explanation

  • @waynej_xyz
    @waynej_xyz 11 місяців тому

    so great , that was i am loving version.

  • @Chellali.A
    @Chellali.A 11 місяців тому

    Thank you so much , I wanted to bring to your attention a concern I have regarding the time complexity of the closestPair function in this algorithm. Specifically, when calling the function for all elements of Y in the following lines: dl = closestPair(X[1 .. mid], Y); dr = closestPair(X[mid+1 ... n], Y); I believe this approach increases the time complexity. The search for the strip is performed in Y, which has a length of N. Consequently, the work done by subproblems becomes O(N), where N is the number of all the points of the problem. This happens because Y is not getting smaller through the dividing process. I propose a modification where the work by subproblems is O(L), where L is the length of the subproblem. To achieve this, the Y in the call to closestPair(X, Y) should contain the same elements as X, with X being the array that undergoes division. Thank you for considering this suggestion.

  • @storiesshubham4145
    @storiesshubham4145 11 місяців тому

    Great explanation mam.

  • @MoreCRNonYT
    @MoreCRNonYT Рік тому

    Thank you! :D

  • @JoeBaloney
    @JoeBaloney Рік тому

    5:57 Why for j=1 to 7? what's the 7 about?

  • @Cha1rman_Me0w
    @Cha1rman_Me0w Рік тому

    woah wasn't expecting to find this after reviewing dynamic programming

  • @CalculusSlayer
    @CalculusSlayer Рік тому

    Pls accept my LinkedIn request 🥺

  • @ammaralmarzooq5764
    @ammaralmarzooq5764 Рік тому

    الله يدخلش الجنة يارب

  • @tanvirtanvir6435
    @tanvirtanvir6435 Рік тому

    3:35 2-delta distance 4:08 2d*d O(1) for each point

  • @jonathanguzman8584
    @jonathanguzman8584 Рік тому

    God Bless you, you are great

  • @varaprasad10
    @varaprasad10 Рік тому

    thank you

  • @yaotingchen
    @yaotingchen Рік тому

    This video does not contain enough detail to understand. This one is better ua-cam.com/video/kCLGVat2SHk/v-deo.html&ab_channel=AlgorithmsbySharmaThankachan

  • @guolongli5524
    @guolongli5524 Рік тому

    Thank you! Great explanation!

  • @Adityarm.08
    @Adityarm.08 Рік тому

    8:00 Y sorted points also need to be halved before recursion to ensure optimal complexity, right? This can be done via (id) based filtering of Y into Y_left & Y_right based on a HashSet representation of what goes into X_left & X_right. Am I missing something? Great explanation otherwise :)

  • @Zaznobable
    @Zaznobable Рік тому

    thanks a lot for your explanation

  • @VikashKumar-tr9cq
    @VikashKumar-tr9cq Рік тому

    Code in c++ : #include <iostream> #include<bits/stdc++.h> using namespace std; bool compare(pair<int,int>a , pair<int,int>b) { return a.second<b.second; } long dis(pair<int,int>& a , pair<int,int>& b) { long d = (long)(a.first-b.first)*(a.first-b.first)+(long)(a.second-b.second)*(a.second-b.second) ; return d ; } long fun(vector<pair<int,int>>&x , int s ,int e ) { if(s>=e)return LONG_MAX; if(e-s+1==2) { long d = dis(x[e],x[s] ) ; return d ; } int mid = (s+e)/2 ; long l = fun(x, s, mid) ; long r = fun(x,mid+1 , e ) ; long d = min(l,r) ; vector<pair<int,int>> arr ; for(int i =s ; i<=e ; i++) { if(x[i].first>= x[mid].first-d and x[i].first<=x[mid].first+d) arr.push_back(x[i]); } sort(arr.begin(),arr.end(),compare) ; for(int i = 0 ; i<arr.size() ; i++) { pair<int,int> t =arr[i] ; int z=6 ; for(int j=i+1; j<arr.size() and z>0 ; j++) { long dd = dis(t,arr[j]); d =min(d, dd ) ; z-- ; } } return d ; } long closestPair(pair<int, int>* points, int n) { //Write your code here vector<pair<int,int>> x ; for (int i = 0; i < n; i++) { x.push_back(points[i]); } sort(x.begin() , x.end()) ; long ans = fun(x ,0 ,n-1 ) ; return ans ; } int main() { int n; cin >> n; pair<int,int>* arr = new pair<int,int>[n]; for(int i = 0; i < n; ++i) { cin >> arr[i].first >> arr[i].second; } cout << closestPair(arr, n); delete[] arr; }

  • @wizrom3046
    @wizrom3046 Рік тому

    Who told you the brute force solution was n squared? Once a test has been performed, it can be tagged as done. Then that pair test does not need to be done again. Consider 4 points; 1,2 3,4 1 needs to test 2,3,4 2 only needs to test 3,4 (because 1,2 test is already done)) 3 only needs to test 4 That is only 6 tests need to be performed, not 16 (n squared) Formula is probably factorial n... Please get gour facts right!

    • @iDeer70
      @iDeer70 Рік тому

      Consider 5 points, 100 points, 10000 points, and let me know if you still think the formula is factorial n (hint: sum of arithmetic sequence). Then please get your fact right about Big O Notation! Keep in mind that constants are dropped when calculating time complexity.

    • @marceloenciso6665
      @marceloenciso6665 Рік тому

      In that case the running time would be something like n(n-1) + (n-1)(n-2) + ... + (n-k+1)(n-k) = (n^2-n) + (n^2-3n+2) + (n^2+(1-2k)n+(k^2-k)) = kn^2 + a. Where a is the sum of other lower power terms. Since big O notation drops those lower terms and constants we get that big o notation is n^2.

    • @wizrom3046
      @wizrom3046 Рік тому

      @@marceloenciso6665 agreed, sorry its not factorial, the formula for total number of tests is; (n squared -n) /2 So the total number of tests will always be less than HALF of n squared Anyway this divide and conquer method it still a poor way of solving the problem. Doing all those square roots is a real mess. This is how I would do it for least amount of CPU cycles; 1. Brute force all points but only testing points AFTER the point. (N squared -n) /2 tests; 1a. Get the x dist and y dist (very fast, just 2 subtractions needed) 1b. keep the larger of the two, very fast (we will call this the simple distance) 1c. Put the simple distance in a list, ordered by size (very fast) TRICK; The actual distance can never be more than the simple distance *1.41 so only need to test those list entries that are LESS then the smallest entry *1.41 Now we are only needeing to do the mults and sq roots on a tiny percentage of the point pairs; 2. Process down the ranked list; 2a. Do the pythag mult mult sq root etc to get real dist 2b. If less than prev best, save that as best 2c. If the list entry is >top entry *1.41 then job is done! Ive been coding high perf algorithms for 30 years and mostly had to do it on low perf 8bit systems with no math processor etc. The algorithm I outlined above is just my first attempt but would be far quicker than the divide and conquer system provided that n is not excessively large.

    • @wizrom3046
      @wizrom3046 Рік тому

      Ok, i just wrote some quick c code to test my algorithm. n = 100 points, randomly distributed x and y values using; random(1024) Brute force ranked point distances by my "simple distance" ie the largest of x1-x2 or y1-y2 (4950 tests) Then ONLY needed to do the pythag mult sqroot etc on ANY points where; simple dist <= best simple dist* 1.42 Wow! In most cases it only needs to do ONE pythag calc! The average is about 2 pythags, and the worst I saw was 9 pythags and 7 to 9 pythags was rare, only a few percent of runs. Check it in your compiler if you like.

    • @dontplsgx7934
      @dontplsgx7934 Рік тому

      @@wizrom3046 You should really learn about big O notation before saying anything. (n squared - n) / 2 -> (n^2) /2 - n/2 -> n^2*1/2 - n*1/2 When we calculate big O notation, we only care about the *dominant terms* and we do not care about the coefficients. Thus we take the n squared as our final big O (in this case n^2 is the dominant term and you can eliminate all the other parts in the big O notation).

  • @peterthegreat8464
    @peterthegreat8464 Рік тому

    Beautiful algorithm explained by a beautiful voice

  • @hopecalypse
    @hopecalypse Рік тому

    Hello. I doubt you're watching the comments on this video of yours still, but I really need to point that you have a beautiful voice. This song reminds me of some really pleasant and far-away memories. As many of them are slowly fading away, the calming sound of this cover is helping me, a lot. 0:58 to 1:23 makes me cry almost everytime. Thank you for making this video, Have a long life.

    • @iDeer70
      @iDeer70 Рік тому

      Thank you for these kind words! It warms my heart to know that my singing could be healing to someone. Hope you have a long and happy life <3

  • @albertswiecicki395
    @albertswiecicki395 Рік тому

    Quality content, I was looking for. Thank you!

  • @CalculusSlayer
    @CalculusSlayer Рік тому

    Such a beautiful baddie..🥹🥹🥹 Ur so talented Ling