### Abstract

We study sequence nearest neighbors (SNN). Let D be a database of n sequences; we would like to preprocess D so that given any on-line query sequence Q we can quickly find a sequence S in D for which d(S, Q) ≤ d(S, T) for any other sequence T in D. Here d(S, Q) denotes the distance between sequences S and Q, defined to be the minimum number of edit operations needed to transform one to another (all edit operations will be reversible so that d(S, T) = d(T, S) for any two sequences T and S). These operations correspond to the notion of similarity between sequences that we wish to capture in a given application. Natural edit operations include character edits (inserts, replacements, deletes etc), block edits (moves, copies, deletes, reversals) and block numerical transformations (scaling by an additive or a multiplicative constant). The SNN problem arises in many applications. We present the first known efficient algorithm for "approximate" nearest neighbor search for sequences with preprocessing time and space polynomial in size of D and query time near-linear in size of Q. We assume the distance d(S, T) between two sequences S and T is the minimum number of character edits and block operations needed to transform one to the other. The approximation factor we achieve is O(log ℓ(log* ℓ)^{2}), where ℓ is the size of the longest sequence in D. In addition, we also give an algorithm for exactly computing the distance between two sequences when edit operations of the type character replacements and block reversals are allowed. The time and space requirements of the algorithm is near linear; previously known approaches take at least quadratic time.

Original language | English (US) |
---|---|

Title of host publication | Proceedings of the 32nd Annual ACM Symposium on Theory of Computing, STOC 2000 |

Pages | 416-424 |

Number of pages | 9 |

DOIs | |

State | Published - Dec 1 2000 |

Event | 32nd Annual ACM Symposium on Theory of Computing, STOC 2000 - Portland, OR, United States Duration: May 21 2000 → May 23 2000 |

### Publication series

Name | Proceedings of the Annual ACM Symposium on Theory of Computing |
---|---|

ISSN (Print) | 0737-8017 |

### Conference

Conference | 32nd Annual ACM Symposium on Theory of Computing, STOC 2000 |
---|---|

Country | United States |

City | Portland, OR |

Period | 5/21/00 → 5/23/00 |

### ASJC Scopus subject areas

- Software

## Fingerprint Dive into the research topics of 'Approximate nearest neighbors and sequence comparison with block operations'. Together they form a unique fingerprint.

## Cite this

*Proceedings of the 32nd Annual ACM Symposium on Theory of Computing, STOC 2000*(pp. 416-424). (Proceedings of the Annual ACM Symposium on Theory of Computing). https://doi.org/10.1145/335305.335353