The edit-distance between a regular language and a context-free language

Yo-Sub Han, Sang Ki Ko, Kai Salomaa

Research output: Contribution to journalArticle

13 Citations (Scopus)

Abstract

The edit-distance between two strings is the smallest number of operations required to transform one string into the other. The distance between languages L 1 and L 2 is the smallest edit-distance between string w i ∈ L i , i = 1, 2. We consider the problem of computing the edit-distance of a given regular language and a given context-free language. First, we present an algorithm that finds for the languages an optimal alignment, that is, a sequence of edit operations that transforms a string in one language to a string in the other. The length of the optimal alignment, in the worst case, is exponential in the size of the given grammar and finite automaton. Then, we investigate the problem of computing only the edit-distance of the languages without explicitly producing an optimal alignment. We design a polynomial time algorithm that calculates the edit-distance based on unary homomorphisms.

Original languageEnglish
Pages (from-to)1067-1082
Number of pages16
JournalInternational Journal of Foundations of Computer Science
Volume24
Issue number7
DOIs
Publication statusPublished - 2013 Nov 1

Fingerprint

Context free languages
Formal languages
Finite automata
Polynomials

All Science Journal Classification (ASJC) codes

  • Computer Science (miscellaneous)

Cite this

@article{cd231b16f3b94d4591a0f78b37c4e2f3,
title = "The edit-distance between a regular language and a context-free language",
abstract = "The edit-distance between two strings is the smallest number of operations required to transform one string into the other. The distance between languages L 1 and L 2 is the smallest edit-distance between string w i ∈ L i , i = 1, 2. We consider the problem of computing the edit-distance of a given regular language and a given context-free language. First, we present an algorithm that finds for the languages an optimal alignment, that is, a sequence of edit operations that transforms a string in one language to a string in the other. The length of the optimal alignment, in the worst case, is exponential in the size of the given grammar and finite automaton. Then, we investigate the problem of computing only the edit-distance of the languages without explicitly producing an optimal alignment. We design a polynomial time algorithm that calculates the edit-distance based on unary homomorphisms.",
author = "Yo-Sub Han and Ko, {Sang Ki} and Kai Salomaa",
year = "2013",
month = "11",
day = "1",
doi = "10.1142/S0129054113400315",
language = "English",
volume = "24",
pages = "1067--1082",
journal = "International Journal of Foundations of Computer Science",
issn = "0129-0541",
publisher = "World Scientific Publishing Co. Pte Ltd",
number = "7",

}

The edit-distance between a regular language and a context-free language. / Han, Yo-Sub; Ko, Sang Ki; Salomaa, Kai.

In: International Journal of Foundations of Computer Science, Vol. 24, No. 7, 01.11.2013, p. 1067-1082.

Research output: Contribution to journalArticle

TY - JOUR

T1 - The edit-distance between a regular language and a context-free language

AU - Han, Yo-Sub

AU - Ko, Sang Ki

AU - Salomaa, Kai

PY - 2013/11/1

Y1 - 2013/11/1

N2 - The edit-distance between two strings is the smallest number of operations required to transform one string into the other. The distance between languages L 1 and L 2 is the smallest edit-distance between string w i ∈ L i , i = 1, 2. We consider the problem of computing the edit-distance of a given regular language and a given context-free language. First, we present an algorithm that finds for the languages an optimal alignment, that is, a sequence of edit operations that transforms a string in one language to a string in the other. The length of the optimal alignment, in the worst case, is exponential in the size of the given grammar and finite automaton. Then, we investigate the problem of computing only the edit-distance of the languages without explicitly producing an optimal alignment. We design a polynomial time algorithm that calculates the edit-distance based on unary homomorphisms.

AB - The edit-distance between two strings is the smallest number of operations required to transform one string into the other. The distance between languages L 1 and L 2 is the smallest edit-distance between string w i ∈ L i , i = 1, 2. We consider the problem of computing the edit-distance of a given regular language and a given context-free language. First, we present an algorithm that finds for the languages an optimal alignment, that is, a sequence of edit operations that transforms a string in one language to a string in the other. The length of the optimal alignment, in the worst case, is exponential in the size of the given grammar and finite automaton. Then, we investigate the problem of computing only the edit-distance of the languages without explicitly producing an optimal alignment. We design a polynomial time algorithm that calculates the edit-distance based on unary homomorphisms.

UR - http://www.scopus.com/inward/record.url?scp=84897653290&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84897653290&partnerID=8YFLogxK

U2 - 10.1142/S0129054113400315

DO - 10.1142/S0129054113400315

M3 - Article

AN - SCOPUS:84897653290

VL - 24

SP - 1067

EP - 1082

JO - International Journal of Foundations of Computer Science

JF - International Journal of Foundations of Computer Science

SN - 0129-0541

IS - 7

ER -