Find the Minimum Dot Product in a Set of 2D Vectors

Suppose you have n(n<=50000)

2D vectors pi=(xi,yi)

, for each 1<=i<=n

find 1<=j<=n

what minimize dot(pi,pj)

, where dot(pi,pj)=xi*xj+yi*yj

;

Is there any solution that can get the correct answer efficiently? UPD:|xi,yi|<=100

+3


source to share





All Articles