[algogeeks] Re: Find closest point

2011-05-24 Thread bittu
Hi don ..We can Approach Like this this..See we  can assume earth as a
Sphere  there n points lies on that sphere so if any points lie on
that it must satisfy equation of sphere. okk.. then find the distance
of all the points from the center of sphere  find the distance of
location form center . the find minimum of all the distance with
location ...see its mathematically approach..m hope we can solve these
equation  can get desired answer...i appreciate  if u can throw some
example ..that can make more clear

PS: i am talking about relative minimum distance as i have calculated
wrt center of sphere .

i assume there is bug in my approach, will appreciate  your
suggestion ??


Thanks
Shashank

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Find closest point

2011-05-24 Thread sravanreddy001
Two Step Process:
1) Finding the distance to every point for the requestion point
2) Finding the min among those.
 
(n+n) -- O(n).
I think it cannot be this simple.. more inputs please...

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Find closest point

2011-05-24 Thread anshu mishra
@sravanreddy001
u r not at plain surface its sphere :P :D. u have to go by angle
-- 
Anshuman Mishra
IIIT Allahabad
-

anshumishra6...@gmail.com
rit2007...@iiita.ac.in

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Find closest point

2011-05-24 Thread sravanreddy001
I think that calculating the three Dimentional distance should be fine 
right?
The distance between two points on the sphere will be proportional to the 
chord connecting them.
Which is nothing but the three dimentional distance. and then going with the 
2nd step of finding the min, value among the available.
 
for all points on the Sphere.. assuming the sphere to be clean.(no hills, no 
valleys)
the following conditions will hold for all points B,C w.r.t A.
 
IF (distance_by_walk(A,B)  distance_by_walk(A,C)) 
THEN direct_3D_distance(A,B)  direct_3D_distance(A,C)
 
Let me know If I'm missing somthing..

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Find closest point

2011-05-24 Thread anshu mishra
@sravanreddy001


no u will go from point A to point B by walking on the surface not by making
the tunnel in the earth.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Find closest point

2011-05-24 Thread bhavana
yeah...sravan is absolutely rite. Assuming makin a tunnel wont affect affect
d result as far as finding relative closeness is needed.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Find closest point

2011-05-24 Thread Piyush Sinha
Mind it...its given the database stores latitude and longitudes...We
need to devise a formula that calculates distances between two points
based on latitudes and longitudes of two points..HOW CAN U FIND CHORD
LENGTHS BASED ON LATITUDES AND LONGITUDES

On 5/24/11, bhavana bhavana@gmail.com wrote:
 yeah...sravan is absolutely rite. Assuming makin a tunnel wont affect affect
 d result as far as finding relative closeness is needed.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Piyush Sinha*
*IIIT, Allahabad*
*+91-8792136657*
*+91-7483122727*
*https://www.facebook.com/profile.php?id=10655377926 *

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Find closest point

2011-05-24 Thread anshu mishra
@piyush
suppose A is latitude
nd  B is longitude,  R is raduis of earth

z = Rsin(A);
r' = Rcos(A);  radius of circle at z height;

x = r'cos(B);
y = r'sin(B);

(x,y,z) is coordinate of point assuming (0,0,0) is the center of earth;

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Find closest point

2011-05-24 Thread sravanreddy001
@anshu.. I wanted to say to that.. even though I couldn't think of the 
trignometic stuff.. 
thanks.. :)
 
--Sravan.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Find closest point

2011-05-24 Thread Don
I'm more interested in finding a good data structure to store the
points so that it is quick to narrow down the search to the points
which are fairly close. Think of a database with millions of points,
and there is not time to compute a distance to each one.

Don

On May 24, 8:15 am, sravanreddy001 sravanreddy...@gmail.com wrote:
 @anshu.. I wanted to say to that.. even though I couldn't think of the
 trignometic stuff..
 thanks.. :)

 --Sravan.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.