Abstract
The prefix distance between two words x and y is defined as the number of symbols in x and y that do not belong to their longest common prefix. The relative prefix distance from a language \(L_1\) to a language \(L_2\), if finite, is the smallest integer k such that for every word in \(L_1\), there is a word in \(L_2\) with prefix distance at most k. We study the prefix distance between regular, visibly pushdown, deterministic context-free, and context-free languages. We show how to compute the distance between regular languages and determine whether the distance is bounded. For deterministic context-free languages and visibly pushdown languages, we show that the relative prefix distance to and from regular languages is decidable.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Alur, R., Madhusudan, P.: Adding nesting structure to words. J. ACM 56(3) (2009)
Béal, M.P., Carton, O., Prieur, C., Sakarovitch, J.: Squaring transducers: an efficient procedure for deciding functionality and sequentiality. Theor. Comput. Sci. 292(1), 45–63 (2003)
Benedikt, M., Puppis, G., Riveros, C.: Bounded repairability of word languages. J. Comput. Syst. Sci. 79(8), 1302–1321 (2013)
Benedikt, M., Puppis, G., Riveros, C.: The per-character cost of repairing word languages. Theor. Comput. Sci. 539, 38–67 (2014)
Bruschi, D., Pighizzini, G.: String distances and intrusion detection: bridging the gap between formal languages and computer security. RAIRO Inform. Théor. et Appl. 40, 303–313 (2006)
Calude, C.S., Salomaa, K., Yu, S.: Additive distances and quasi-distances between words. J. Univ. Comput. Sci. 8(2), 141–152 (2002)
Chatterjee, K., Henzinger, T.A., Ibsen-Jensen, R., Otop, J.: Edit distance for pushdown automata. In: Halldórsson, M.M., Iwama, K., Kobayashi, N., Speckmann, B. (eds.) ICALP 2015. LNCS, vol. 9135, pp. 121–133. Springer, Heidelberg (2015). doi:10.1007/978-3-662-47666-6_10
Choffrut, C., Pighizzini, G.: Distances between languages and reflexivity of relations. Theor. Comput. Sci. 286(1), 117–138 (2002)
Deza, M.M., Deza, E.: Encyclopedia of Distances. Springer, Heidelberg (2009)
Han, Y.-S., Ko, S.-K.: Edit-distance between visibly pushdown languages. In: Steffen, B., Baier, C., Brand, M., Eder, J., Hinchey, M., Margaria, T. (eds.) SOFSEM 2017. LNCS, vol. 10139, pp. 387–401. Springer, Cham (2017). doi:10.1007/978-3-319-51963-0_30
Han, Y.S., Ko, S.K., Salomaa, K.: The edit-distance between a regular language and a context-free language. Int. J. Found. Comput. Sci. 24(07), 1067–1082 (2013)
Kutrib, M., Meckel, K., Wendlandt, M.: Parameterized prefix distance between regular languages. In: Geffert, V., Preneel, B., Rovan, B., Štuller, J., Tjoa, A.M. (eds.) SOFSEM 2014. LNCS, vol. 8327, pp. 419–430. Springer, Cham (2014). doi:10.1007/978-3-319-04298-5_37
Mohri, M.: Edit-distance of weighted automata: general definitions and algorithms. Int. J. Found. Comput. Sci. 14(6), 957–982 (2003)
Ng, T.: Prefix distance between regular languages. In: Han, Y.-S., Salomaa, K. (eds.) CIAA 2016. LNCS, vol. 9705, pp. 224–235. Springer, Cham (2016). doi:10.1007/978-3-319-40946-7_19
Ng, T., Rappaport, D., Salomaa, K.: Descriptional complexity of error detection. In: Adamatzky, A. (ed.) Emergent Computation: A Festschrift for Selim G. Akl. ECC, vol. 24, pp. 101–119. Springer, Cham (2017). doi:10.1007/978-3-319-46376-6_6
Ng, T., Rappaport, D., Salomaa, K.: State complexity of prefix distance. Theor. Comput. Sci. 679, 107–117 (2017)
Pighizzini, G.: How hard is computing the edit distance? Inf. Comput. 165(1), 1–13 (2001)
Shallit, J.: A Second Course in Formal Languages and Automata Theory. Cambridge University Press, Cambridge (2009)
Skala, M.: Counting distance permutations. J. Discrete Algorithms 7(1), 49–61 (2009)
Yu, S.: Regular languages. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 41–110. Springer, Heidelberg (1997). doi:10.1007/978-3-642-59136-5_2
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Ng, T., Rappaport, D., Salomaa, K. (2017). Relative Prefix Distance Between Languages. In: Charlier, É., Leroy, J., Rigo, M. (eds) Developments in Language Theory. DLT 2017. Lecture Notes in Computer Science(), vol 10396. Springer, Cham. https://doi.org/10.1007/978-3-319-62809-7_21
Download citation
DOI: https://doi.org/10.1007/978-3-319-62809-7_21
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-62808-0
Online ISBN: 978-3-319-62809-7
eBook Packages: Computer ScienceComputer Science (R0)