Skip to main content
QUICK REVIEW

[논문 리뷰] An error correcting parser for context free grammars that takes less than cubic time

Sanguthevar Rajasekaran, Marius Nicolae|arXiv (Cornell University)|2014. 06. 13.
semigroups and automata theory참고 문헌 11인용 수 8
한 줄 요약

이 논문은 언어 편집 거리 문제를 트로피컬 행렬 곱셈으로 환원하여 $ O\big(n^3 (\text{log}\text{log}\text{ }n)^3 / (\text{log}\text{ }n)^2\big) $ 시간에 작동하는 오류 수정 파서를 제안한다. 주요 기여는 $ \omega \approx 2.376 $ 일 때 $ O\big(n^3 (\text{log}\text{log}\text{ }n)^3 / (\text{log}\text{ }n)^2\big) $ 시간에 작동하는 정확한 알고리즘과 $ \frac{n}{M} $-근사 알고리즘($ O(Mn^\omega) $ 시간)을 제공하며, Aho와 Peterson이 1972년에 확립한 삼차 시간 복잡도를 개선한다.

ABSTRACT

The problem of parsing has been studied extensively for various formal grammars. Given an input string and a grammar, the parsing problem is to check if the input string belongs to the language generated by the grammar. A closely related problem of great importance is one where the input are a string ${\cal I}$ and a grammar $G$ and the task is to produce a string ${\cal I}'$ that belongs to the language generated by $G$ and the `distance' between ${\cal I}$ and ${\cal I}'$ is the smallest (from among all the strings in the language). Specifically, if ${\cal I}$ is in the language generated by $G$, then the output should be ${\cal I}$. Any parser that solves this version of the problem is called an {\em error correcting parser}. In 1972 Aho and Peterson presented a cubic time error correcting parser for context free grammars. Since then this asymptotic time bound has not been improved under the (standard) assumption that the grammar size is a constant. In this paper we present an error correcting parser for context free grammars that runs in $O(T(n))$ time, where $n$ is the length of the input string and $T(n)$ is the time needed to compute the tropical product of two $n imes n$ matrices. In this paper we also present an $\frac{n}{M}$-approximation algorithm for the {\em language edit distance problem} that has a run time of $O(Mn^ω)$, where $O(n^ω)$ is the time taken to multiply two $n imes n$ matrices. To the best of our knowledge, no approximation algorithms have been proposed for error correcting parsing for general context free grammars.

연구 동기 및 목표

  • 1972년 Aho와 Peterson이 확립한 오류 수정 파싱을 위한 오랜 기간 동안의 $ O(n^3) $ 시간 복잡도를 초월하는 것.
  • 주어진 CFG의 언어에 속하는 문자열과 입력 문자열 간의 최소 편집 거리를 삼차 시간 이하로 더 효율적으로 계산하는 파서를 개발하는 것.
  • 일반적인 CFG의 언어 편집 거리 문제에 대해 성능 보장이 있는 근사 알고리즘을 제공하는 것.
  • 언어 편집 거리 문제를 $ n \times n $ 행렬의 트로피컬 곱셈으로 환원할 수 있음을 보여주어 고급 행렬 곱셈 기법을 통해 더 빠른 알고리즘을 가능하게 하는 것.

제안 방법

  • 언어 편집 거리 문제를 두 개의 $ n \times n $ 행렬 간의 트로피컬 곱셈(min-plus 곱셈)으로 환원하는 접근 방식을 사용하며, 이에 대한 기존 알고리즘을 활용한다.
  • DYK 파서 프레임워크를 기반으로 한 동적 프로그래밍을 사용하며, 삽입, 삭제, 치환 등의 편집 연산을 행렬 연산을 통해 확장한다.
  • 정확한 파싱을 위해 트로피컬 행렬 곱셈을 사용하는 수정된 CYK 스타일 알고리즘을 적용하여, 빠른 행렬 곱셈을 활용할 경우 하위삼차 시간 복잡도를 달성한다.
  • 근사 알고리즘을 위해 편집 거리가 $ M $을 초과하는 값을 $ M+1 $로 대체하여, $ O(Mn^\omega) $의 런타임을 확보한다.
  • 계산된 행렬을 기반으로 재귀적 백트래킹 절차를 사용하여 파싱 결과 $ \mathcal{I}' $를 $ O(n^2) $ 시간에 복원한다.
  • 모든 행렬 원소가 $ M+1 $ 이하로 제한되어 있어, 근사 모델 하에서 효율적인 계산을 보장한다.

실험 결과

연구 질문

  • RQ1일반적인 CFG에 대해 언어 편집 거리 문제를 삼차 시간 이하로 해결할 수 있는가?
  • RQ2하위삼차 런타임과 유한한 근사 인자 보장이 가능한 언어 편집 거리 문제 근사 알고리즘을 설계할 수 있는가?
  • RQ3언어 편집 거리 문제를 트로피컬 행렬 곱셈으로 환원할 수 있으면, 더 빠른 파싱 알고리즘을 가능하게 할 수 있는가?
  • RQ4시간 복잡도와 실용적 효율성 측면에서 제안된 파서가 고전적인 Aho-Peterson 알고리즘과 비교해 어떻게 성능을 내는가?

주요 결과

  • 논문은 $ O\big(n^3 (\text{log}\text{log}\text{ }n)^3 / (\text{log}\text{ }n)^2\big) $ 시간에 작동하는 정확한 오류 수정 파서를 제안하며, 1972년의 $ O(n^3) $ 기준을 개선한다.
  • $ \omega \approx 2.376 $ 일 때 $ O(Mn^\omega) $ 런타임을 가지는 $ \frac{n}{M} $-근사 알고리즘을 제안하여, $ M $ 이 작을 경우 하위삼차 성능을 달성한다.
  • 언어 편집 거리 문제를 트로피컬 행렬 곱셈으로 환원함으로써, 파싱과 고급 행렬 계산 간의 새로운 연결 고리를 확립한다.
  • 최소 편집 거리를 갖는 문자열 $ \mathcal{I}' $ 는 계산된 행렬과 백트래킹 절차를 사용해 $ O(n^2) $ 시간에 복원할 수 있다.
  • 제안된 알고리즘은 이전의 삼차 시간 접근보다 더 단순하며, 빠른 행렬 곱셈을 활용함으로써 더 나은 점근적 성능을 제공한다.
  • 이 작업은 일반 CFG의 언어 편집 거리 문제에 대해 처음으로 근사 알고리즘을 제공하여 문헌에서 중요한 격차를 메운다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.