Cargando…

Computing the Shortest String and the Edit-Distance for Parsing Expression Languages

A distance between two languages is a useful tool to measure the language similarity, and is closely related to the intersection problem as well as the shortest string problem. A parsing expression grammar (PEG) is an unambiguous grammar such that the choice operator selects the first matching in PE...

Descripción completa

Detalles Bibliográficos
Autores principales: Cheon, Hyunjoon, Han, Yo-Sub
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7247870/
http://dx.doi.org/10.1007/978-3-030-48516-0_4
_version_ 1783538252824707072
author Cheon, Hyunjoon
Han, Yo-Sub
author_facet Cheon, Hyunjoon
Han, Yo-Sub
author_sort Cheon, Hyunjoon
collection PubMed
description A distance between two languages is a useful tool to measure the language similarity, and is closely related to the intersection problem as well as the shortest string problem. A parsing expression grammar (PEG) is an unambiguous grammar such that the choice operator selects the first matching in PEG while it can be ambiguous in a context-free grammar. PEGs are also closely related to top-down parsing languages. We consider two problems on parsing expression languages (PELs). One is the r-shortest string problem that decides whether or not a given PEL contains a string of length shorter than r. The other problem is the edit-distance problem of PELs with respect to other language families such as finite languages or regular languages. We show that the r-shortest string problem and the edit-distance problem with respect to finite languages are NEXPTIME-complete, and the edit-distance problem with respect to regular languages is undecidable. In addition, we prove that it is impossible to compute a length bound [Formula: see text] of a PEG G such that L(G) has a string w of length at most [Formula: see text].
format Online
Article
Text
id pubmed-7247870
institution National Center for Biotechnology Information
language English
publishDate 2020
record_format MEDLINE/PubMed
spelling pubmed-72478702020-05-26 Computing the Shortest String and the Edit-Distance for Parsing Expression Languages Cheon, Hyunjoon Han, Yo-Sub Developments in Language Theory Article A distance between two languages is a useful tool to measure the language similarity, and is closely related to the intersection problem as well as the shortest string problem. A parsing expression grammar (PEG) is an unambiguous grammar such that the choice operator selects the first matching in PEG while it can be ambiguous in a context-free grammar. PEGs are also closely related to top-down parsing languages. We consider two problems on parsing expression languages (PELs). One is the r-shortest string problem that decides whether or not a given PEL contains a string of length shorter than r. The other problem is the edit-distance problem of PELs with respect to other language families such as finite languages or regular languages. We show that the r-shortest string problem and the edit-distance problem with respect to finite languages are NEXPTIME-complete, and the edit-distance problem with respect to regular languages is undecidable. In addition, we prove that it is impossible to compute a length bound [Formula: see text] of a PEG G such that L(G) has a string w of length at most [Formula: see text]. 2020-05-26 /pmc/articles/PMC7247870/ http://dx.doi.org/10.1007/978-3-030-48516-0_4 Text en © Springer Nature Switzerland AG 2020 This article is made available via the PMC Open Access Subset for unrestricted research re-use and secondary analysis in any form or by any means with acknowledgement of the original source. These permissions are granted for the duration of the World Health Organization (WHO) declaration of COVID-19 as a global pandemic.
spellingShingle Article
Cheon, Hyunjoon
Han, Yo-Sub
Computing the Shortest String and the Edit-Distance for Parsing Expression Languages
title Computing the Shortest String and the Edit-Distance for Parsing Expression Languages
title_full Computing the Shortest String and the Edit-Distance for Parsing Expression Languages
title_fullStr Computing the Shortest String and the Edit-Distance for Parsing Expression Languages
title_full_unstemmed Computing the Shortest String and the Edit-Distance for Parsing Expression Languages
title_short Computing the Shortest String and the Edit-Distance for Parsing Expression Languages
title_sort computing the shortest string and the edit-distance for parsing expression languages
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7247870/
http://dx.doi.org/10.1007/978-3-030-48516-0_4
work_keys_str_mv AT cheonhyunjoon computingtheshorteststringandtheeditdistanceforparsingexpressionlanguages
AT hanyosub computingtheshorteststringandtheeditdistanceforparsingexpressionlanguages