An Efficient Algorithm to Solve the Nearest Neighbor Searching Problem
Shieh Yi Kung, Lee R.C.T. · Frontiers in artificial intelligence and applications · 2015
In this research, we propose the nearest neighbor searching problem and we give an algorithm to solve the problem. Roughly speaking, the nearest neighbor searching problem is defined as follows: Give a text string T=t1t2…tnand a pattern string P=p1p2…pm, find all substrings in T whose edit distances with respect to P are the smallest among all substrings of T. Our algorithm is based upon two concepts: (1) There is a special property of dynamic programming matrix which is used to solve the approximate string matching problem. We call this property the small change property. (2) Values on the D matrix can be computed along the diagonals. Our experimental results showed that our algorithm is quite efficient.