Cargando…
String correction using the Damerau-Levenshtein distance
BACKGROUND: In the string correction problem, we are to transform one string into another using a set of prescribed edit operations. In string correction using the Damerau-Levenshtein (DL) distance, the permissible edit operations are: substitution, insertion, deletion and transposition. Several alg...
Autores principales: | , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
BioMed Central
2019
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6551241/ https://www.ncbi.nlm.nih.gov/pubmed/31167641 http://dx.doi.org/10.1186/s12859-019-2819-0 |
_version_ | 1783424362440818688 |
---|---|
author | Zhao, Chunchun Sahni, Sartaj |
author_facet | Zhao, Chunchun Sahni, Sartaj |
author_sort | Zhao, Chunchun |
collection | PubMed |
description | BACKGROUND: In the string correction problem, we are to transform one string into another using a set of prescribed edit operations. In string correction using the Damerau-Levenshtein (DL) distance, the permissible edit operations are: substitution, insertion, deletion and transposition. Several algorithms for string correction using the DL distance have been proposed. The fastest and most space efficient of these algorithms is due to Lowrance and Wagner. It computes the DL distance between strings of length m and n, respectively, in O(mn) time and O(mn) space. In this paper, we focus on the development of algorithms whose asymptotic space complexity is less and whose actual runtime and energy consumption are less than those of the algorithm of Lowrance and Wagner. RESULTS: We develop space- and cache-efficient algorithms to compute the Damerau-Levenshtein (DL) distance between two strings as well as to find a sequence of edit operations of length equal to the DL distance. Our algorithms require O(s min{m,n}+m+n) space, where s is the size of the alphabet and m and n are, respectively, the lengths of the two strings. Previously known algorithms require O(mn) space. The space- and cache-efficient algorithms of this paper are demonstrated, experimentally, to be superior to earlier algorithms for the DL distance problem on time, space, and enery metrics using three different computational platforms. CONCLUSION: Our benchmarking shows that, our algorithms are able to handle much larger sequences than earlier algorithms due to the reduction in space requirements. On a single core, we are able to compute the DL distance and an optimal edit sequence faster than known algorithms by as much as 73.1% and 63.5%, respectively. Further, we reduce energy consumption by as much as 68.5%. Multicore versions of our algorithms achieve a speedup of 23.2 on 24 cores. |
format | Online Article Text |
id | pubmed-6551241 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2019 |
publisher | BioMed Central |
record_format | MEDLINE/PubMed |
spelling | pubmed-65512412019-06-07 String correction using the Damerau-Levenshtein distance Zhao, Chunchun Sahni, Sartaj BMC Bioinformatics Research BACKGROUND: In the string correction problem, we are to transform one string into another using a set of prescribed edit operations. In string correction using the Damerau-Levenshtein (DL) distance, the permissible edit operations are: substitution, insertion, deletion and transposition. Several algorithms for string correction using the DL distance have been proposed. The fastest and most space efficient of these algorithms is due to Lowrance and Wagner. It computes the DL distance between strings of length m and n, respectively, in O(mn) time and O(mn) space. In this paper, we focus on the development of algorithms whose asymptotic space complexity is less and whose actual runtime and energy consumption are less than those of the algorithm of Lowrance and Wagner. RESULTS: We develop space- and cache-efficient algorithms to compute the Damerau-Levenshtein (DL) distance between two strings as well as to find a sequence of edit operations of length equal to the DL distance. Our algorithms require O(s min{m,n}+m+n) space, where s is the size of the alphabet and m and n are, respectively, the lengths of the two strings. Previously known algorithms require O(mn) space. The space- and cache-efficient algorithms of this paper are demonstrated, experimentally, to be superior to earlier algorithms for the DL distance problem on time, space, and enery metrics using three different computational platforms. CONCLUSION: Our benchmarking shows that, our algorithms are able to handle much larger sequences than earlier algorithms due to the reduction in space requirements. On a single core, we are able to compute the DL distance and an optimal edit sequence faster than known algorithms by as much as 73.1% and 63.5%, respectively. Further, we reduce energy consumption by as much as 68.5%. Multicore versions of our algorithms achieve a speedup of 23.2 on 24 cores. BioMed Central 2019-06-06 /pmc/articles/PMC6551241/ /pubmed/31167641 http://dx.doi.org/10.1186/s12859-019-2819-0 Text en © The Author(s) 2019 Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver(http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated. |
spellingShingle | Research Zhao, Chunchun Sahni, Sartaj String correction using the Damerau-Levenshtein distance |
title | String correction using the Damerau-Levenshtein distance |
title_full | String correction using the Damerau-Levenshtein distance |
title_fullStr | String correction using the Damerau-Levenshtein distance |
title_full_unstemmed | String correction using the Damerau-Levenshtein distance |
title_short | String correction using the Damerau-Levenshtein distance |
title_sort | string correction using the damerau-levenshtein distance |
topic | Research |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6551241/ https://www.ncbi.nlm.nih.gov/pubmed/31167641 http://dx.doi.org/10.1186/s12859-019-2819-0 |
work_keys_str_mv | AT zhaochunchun stringcorrectionusingthedameraulevenshteindistance AT sahnisartaj stringcorrectionusingthedameraulevenshteindistance |