Abstract:Given two polygonal curves, there are many ways to define a notion of similarity between them. One popular measure is the Fréchet distance which has many desirable properties but is notoriously expensive to calculate, especially for non-trivial metrics. In 1994, Eiter and Mannila introduced the discrete Fréchet distance which is much easier to implement and approximates the continuous Fréchet distance with a quadratic runtime overhead. However, this algorithm relies on recursions and is not well suited for modern hardware. To that end, we introduce the Fast Fréchet Distance algorithm, a recursion-free algorithm that calculates the discrete Fréchet distance with a linear memory overhead and that can utilize modern hardware more effectively. We showcase an implementation with only four lines of code and present benchmarks of our algorithm running fast on modern CPUs and GPGPUs.
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to improve the efficiency of discrete Fréchet distance calculation, especially for the optimization of modern hardware. Specifically, the paper introduces the Fast Fréchet Distance algorithm, which is a non - recursive algorithm. It can efficiently calculate the discrete Fréchet distance while maintaining linear memory overhead and can fully utilize the powerful performance of modern CPUs and GPGPUs.
### Background of the Paper
The Fréchet distance is a metric method for measuring the similarity between two polygonal curves, proposed by Maurice Fréchet in 1906. Although it has many excellent properties, it is very expensive to calculate, especially in non - trivial metric spaces. To simplify the calculation, Eiter and Mannila introduced the discrete Fréchet distance in 1994, which is an approximation of the continuous Fréchet distance and has a quadratic time complexity. However, the algorithm of Eiter and Mannila depends on recursion, which makes it perform poorly on modern hardware and is prone to problems such as stack overflow.
### Contributions of the Paper
1. **Non - recursive Algorithm**: The paper proposes a non - recursive algorithm. Through iteration and branch prediction optimization, it avoids recursive calls in traditional algorithms, thereby improving the computational efficiency.
2. **Linear Memory Overhead**: The new algorithm reduces the memory requirement from quadratic to linear, significantly reducing the memory usage.
3. **Optimization for Modern Hardware**: The algorithm can fully utilize the parallel processing capabilities of modern CPUs and GPGPUs and accelerate the calculation through SIMD and SIMT technologies.
4. **Simple Implementation**: The core part of the algorithm can be implemented with only four lines of code, which is convenient for integration and extension.
### Experimental Results
The paper shows the performance advantages of the new algorithm on different hardware through experiments. The experimental results show that, compared with the traditional recursive algorithm, the new algorithm shows a significant performance improvement when processing large - scale data, especially when using the SIMD instruction set on the CPU and the parallel computing capabilities on the GPGPU.
### Application Prospects
The Fast Fréchet Distance algorithm is not only of great significance in theory, but also has a wide range of application prospects in practical applications, such as in trajectory data analysis, biological sequence alignment, map matching and other fields. By improving the computational efficiency, this algorithm can help researchers process large - scale data more quickly, thereby promoting the research progress in related fields.
In conclusion, this paper solves the deficiencies of existing methods in computational efficiency and memory usage by proposing an efficient discrete Fréchet distance calculation algorithm, providing a new tool for curve similarity analysis in the modern hardware environment.