University of Zagreb. Faculty of Science. Department of Mathematics.
Abstract
U ovom radu smo proučili šest algoritama za rješavanje problema najbližeg para u R2. Pokazali smo kako se problem može riješiti determinističkim algoritmom složenosti O(nlogn), a nedeterminističkim algoritmima složenost možemo spustiti do O(n). Ipak, testiranjem smo utvrdili da je na praktičnim veličinama ulaznih podataka od egzaktnih algoritama najefikasniji onaj koji je predstavljen u odjeljku 3.1 pod imenom Divide_and_Conquer, čija složenost je O(nlog2n). Na kraju smo predstavili i jedan parametrizirani heuristički algoritam složenosti O(lognn) koji pronalazi približno rješenje, čija točnost se može povećati nauštrb vremena izvođenja.In this paper we have examined six different algorithms for solving the closest pair of points problem in R2. We have shown that the problem can be solved with deterministic algorithms in O(nlogn) time and in O(n) time with non-deterministic algorithms. However, testing these algorithms has revealed that, for practical input sizes, the most efficient exact algorithm is the one we have labelled Divide_and_Conquer which was presented in section 3.1 and which runs in O(nlog2n)time. In the final chapter we have presented a parameterised simulated annealing algorithm which finds an approximate solution in O(lognn) time, accuracy of which can be increased at the expense of speed