Closest pair of points
Vložit
- čas přidán 27. 07. 2024
- To access the translated content:
1. The translated content of this course is available in regional languages. For details please visit nptel.ac.in/translation
The video course content can be accessed in the form of regional language text transcripts, books which can be accessed under downloads of each course, subtitles in the video and Video Text Track below the video.
Your feedback is highly appreciated. Kindly fill this form forms.gle/XFZhSnHsCLML2LXA6
2. Regional language subtitles available for this course
To watch the subtitles in regional languages:
1. Click on the lecture under Course Details.
2. Play the video.
3. Now click on the Settings icon and a list of features will display
4. From that select the option Subtitles/CC.
5. Now select the Language from the available languages to read the subtitle in the regional language.
Cant believe how a seemingly harmless question has such a complicated solution.
I have searched almost 5 books and may be 10 to 15 online resources to understand that concept of "one point at max in a square". Thank you, sir for explanation.
Amazing explanation....explained something none of the other sources I went through did
i had to watch this multiple time to understand it was worthy thank you!!!!!
Really good explanation
Lucid. Thank you so much :)
Why do we need to compare within 15 squares? Shouldn't it be 11 instead? There is no point comparing with squares which are 2 squares above the point. Can you please explain?
you are right
actually it should be only 7 points. if we are taking about 2d
after dividing in to halfs ,we take the points at distance d and sort them according to y?But why according to y only and not according to x?if i sort by x again and i can give same argument that only at max 15 points will be accessed.Please clear this query.@13:25 ,the first line,why is has to be sorted by y?Will sot by x give wrong results?
very good explanation!
Amazing explanation 💖💖
15 is too optimistic. We can have a better lower bound of 7.
Very good!
there is no need to check against 15 others, only 7 points of the other side is enough
if it is 3d dimensinal , we need to check 15 ?
Yes that's good, small refinement in the problem.
@@TRPixel look at the distance formula it is for 2 d not 3d
Are you sure?
Nice
if some point falls on the split line, you will get wrong (you can't just split x by half-half, some of the point are on split line)
Can you please help me to write c++ source codes for different programs
Thanks
Nice explanation! How to modify this algorithm when the x and y coordinates are not guaranteed to be distinct?
make them distinct first :)
I don't still understand "one point at max in a square". Does anyone has a better explaination?
I've had way too much free time during this quarantine. Here's the explanation of what you wanted with proof.
Once you've found out the LD(minimum distance on the left side of the separator line L) and RD(...........right side of..........), you'd find delta which is the minimum of the aforementioned distances(DELTA=min(LD,RD)). Now, its time for finding the distance b/w the points lying on the EITHER SIDE of the line L. So you'd now construct the strip (of length 2*Delta) across L and search for the points lying within the strip and distanced < DELTA.
We will now build a square(assume its either on the left or right side of the line L just for simplicity) with side=DELTA and see how many points fit in it conforming to our requirement that minD
@@studyonline3236 Are you sure all the 8 points in the two squares need to be calculated? I read somewhere you actually only need check 3 points, as long as the points are y coordinates non-decreasing ordered .
@@iJamesGuo can you share the source link?
Btw there isn't much computational time difference between them as long as the computations are done in linear fashion.
O(8n) ~=O(3n)~=O(n)
@@studyonline3236 Yes, I know it's linear. Just for the life of me can't figure why we only need to check 3. Your explanation helps, but I am still unclear of the magic number 3.
Imagine having to solve this in an interview in nlogn
😂😂 exit
anyone can share the code of this problem
in c++
hi
Yeah this tutorial is copied from tim
Nah, you couldn't be more wrong..
Can you provide the channel name
we say to it ratalogist it means to memorize something but in practical quality is zero please don't waste time in such video