On the Complexity of LR(k) Testing.

Saved in:
Bibliographic Details
Title: On the Complexity of LR(k) Testing.
Authors: Hunt, III, Harry B.1, Szymanski, Thomas G.2, Ullman, Jeffrey D.2
Source: Communications of the ACM. Dec1975, Vol. 18 Issue 12, p707-716. 10p.
Subjects: Linguistic String Parser (Computer grammar), Comparative grammar, Computational linguistics, Mathematical linguistics, Programming languages, Computer programming, Exponential functions, Transcendental functions, Computer science, Logic programming
Abstract: The problem of determining whether an arbitrary context-free grammar is a member of some easily parsed subclass of grammars such as the LR(k) grammars is considered. The time complexity of this problem is analyzed both when k is considered to be a fixed integer and when k is considered to be a parameter of the test. In the first case, it is shown that for every k there exists an O(nk+2) algorithm for testing the LR(k) property, where n is the size of the grammar in question. On the other hand, if both k and the subject grammar are problem parameters, then the complexity of the problem depends very strongly on the representation chosen for k. More specifically, it is shown that this problem is NP-complete when k is expressed in unary. When k is expressed in binary the problem is complete for nondeterministic exponential time. These results carry over to many other parameterized classes of grammars, such as the LL(k), strong LL(k), SLR(k), LC(k), and strong LC(k) grammars. [ABSTRACT FROM AUTHOR]
Copyright of Communications of the ACM is the property of Association for Computing Machinery and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Engineering Source
FullText Links:
  – Type: pdflink
Text:
  Availability: 0
Header DbId: egs
DbLabel: Engineering Source
An: 5206827
AccessLevel: 6
PubType: Periodical
PubTypeId: serialPeriodical
PreciseRelevancyScore: 0
IllustrationInfo
Items – Name: Title
  Label: Title
  Group: Ti
  Data: On the Complexity of LR(k) Testing.
– Name: Author
  Label: Authors
  Group: Au
  Data: <searchLink fieldCode="AR" term="%22Hunt%2C+III%2C+Harry+B%2E%22">Hunt, III, Harry B.</searchLink><relatesTo>1</relatesTo><br /><searchLink fieldCode="AR" term="%22Szymanski%2C+Thomas+G%2E%22">Szymanski, Thomas G.</searchLink><relatesTo>2</relatesTo><br /><searchLink fieldCode="AR" term="%22Ullman%2C+Jeffrey+D%2E%22">Ullman, Jeffrey D.</searchLink><relatesTo>2</relatesTo>
– Name: TitleSource
  Label: Source
  Group: Src
  Data: <searchLink fieldCode="JN" term="%22Communications+of+the+ACM%22">Communications of the ACM</searchLink>. Dec1975, Vol. 18 Issue 12, p707-716. 10p.
– Name: Subject
  Label: Subjects
  Group: Su
  Data: <searchLink fieldCode="DE" term="%22Linguistic+String+Parser+%28Computer+grammar%29%22">Linguistic String Parser (Computer grammar)</searchLink><br /><searchLink fieldCode="DE" term="%22Comparative+grammar%22">Comparative grammar</searchLink><br /><searchLink fieldCode="DE" term="%22Computational+linguistics%22">Computational linguistics</searchLink><br /><searchLink fieldCode="DE" term="%22Mathematical+linguistics%22">Mathematical linguistics</searchLink><br /><searchLink fieldCode="DE" term="%22Programming+languages%22">Programming languages</searchLink><br /><searchLink fieldCode="DE" term="%22Computer+programming%22">Computer programming</searchLink><br /><searchLink fieldCode="DE" term="%22Exponential+functions%22">Exponential functions</searchLink><br /><searchLink fieldCode="DE" term="%22Transcendental+functions%22">Transcendental functions</searchLink><br /><searchLink fieldCode="DE" term="%22Computer+science%22">Computer science</searchLink><br /><searchLink fieldCode="DE" term="%22Logic+programming%22">Logic programming</searchLink>
– Name: Abstract
  Label: Abstract
  Group: Ab
  Data: The problem of determining whether an arbitrary context-free grammar is a member of some easily parsed subclass of grammars such as the LR(k) grammars is considered. The time complexity of this problem is analyzed both when k is considered to be a fixed integer and when k is considered to be a parameter of the test. In the first case, it is shown that for every k there exists an O(nk+2) algorithm for testing the LR(k) property, where n is the size of the grammar in question. On the other hand, if both k and the subject grammar are problem parameters, then the complexity of the problem depends very strongly on the representation chosen for k. More specifically, it is shown that this problem is NP-complete when k is expressed in unary. When k is expressed in binary the problem is complete for nondeterministic exponential time. These results carry over to many other parameterized classes of grammars, such as the LL(k), strong LL(k), SLR(k), LC(k), and strong LC(k) grammars. [ABSTRACT FROM AUTHOR]
– Name: AbstractSuppliedCopyright
  Label:
  Group: Ab
  Data: <i>Copyright of Communications of the ACM is the property of Association for Computing Machinery and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract.</i> (Copyright applies to all Abstracts.)
PLink https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=egs&AN=5206827
RecordInfo BibRecord:
  BibEntity:
    Identifiers:
      – Type: doi
        Value: 10.1145/361227.361232
    Languages:
      – Code: eng
        Text: English
    PhysicalDescription:
      Pagination:
        PageCount: 10
        StartPage: 707
    Subjects:
      – SubjectFull: Linguistic String Parser (Computer grammar)
        Type: general
      – SubjectFull: Comparative grammar
        Type: general
      – SubjectFull: Computational linguistics
        Type: general
      – SubjectFull: Mathematical linguistics
        Type: general
      – SubjectFull: Programming languages
        Type: general
      – SubjectFull: Computer programming
        Type: general
      – SubjectFull: Exponential functions
        Type: general
      – SubjectFull: Transcendental functions
        Type: general
      – SubjectFull: Computer science
        Type: general
      – SubjectFull: Logic programming
        Type: general
    Titles:
      – TitleFull: On the Complexity of LR(k) Testing.
        Type: main
  BibRelationships:
    HasContributorRelationships:
      – PersonEntity:
          Name:
            NameFull: Hunt, III, Harry B.
      – PersonEntity:
          Name:
            NameFull: Szymanski, Thomas G.
      – PersonEntity:
          Name:
            NameFull: Ullman, Jeffrey D.
    IsPartOfRelationships:
      – BibEntity:
          Dates:
            – D: 01
              M: 12
              Text: Dec1975
              Type: published
              Y: 1975
          Identifiers:
            – Type: issn-print
              Value: 00010782
          Numbering:
            – Type: volume
              Value: 18
            – Type: issue
              Value: 12
          Titles:
            – TitleFull: Communications of the ACM
              Type: main
ResultId 1