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

15 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 L1 and L2 is the smallest edit-distance between string wi ∈ Li, 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

All Science Journal Classification (ASJC) codes

  • Computer Science (miscellaneous)

Fingerprint Dive into the research topics of 'The edit-distance between a regular language and a context-free language'. Together they form a unique fingerprint.

Cite this