{"title":"A parallel algorithm for counting parse trees","authors":"Margarita Mikhelson, Alexander Okhotin","doi":"10.1016/j.ic.2024.105237","DOIUrl":null,"url":null,"abstract":"<div><div>A parallel algorithm for computing the number of parse trees of a given string according to a fixed context-free grammar is defined. More generally, the algorithm applies to computing the weight of a string in a weighted grammar over any semiring. The algorithm is first implemented on an arithmetic circuit of depth at most <span><math><mn>6</mn><msup><mrow><mo>(</mo><msub><mrow><mi>log</mi></mrow><mrow><mn>2</mn></mrow></msub><mo></mo><mi>n</mi><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup><mo>+</mo><mi>O</mi><mo>(</mo><mi>log</mi><mo></mo><mi>n</mi><mo>)</mo></math></span> and with <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>n</mi></mrow><mrow><mn>6</mn></mrow></msup><mo>)</mo></math></span> elements, where the constant factors in the big-O notation depend on the grammar. Then, the circuit is improved using fast matrix multiplication to use only <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>n</mi></mrow><mrow><mn>5.38</mn></mrow></msup><mo>)</mo></math></span> elements, while preserving depth <span><math><mi>O</mi><mo>(</mo><msup><mrow><mo>(</mo><mi>log</mi><mo></mo><mi>n</mi><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></math></span>.</div></div>","PeriodicalId":54985,"journal":{"name":"Information and Computation","volume":"303 ","pages":"Article 105237"},"PeriodicalIF":0.8000,"publicationDate":"2024-11-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information and Computation","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0890540124001020","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
A parallel algorithm for computing the number of parse trees of a given string according to a fixed context-free grammar is defined. More generally, the algorithm applies to computing the weight of a string in a weighted grammar over any semiring. The algorithm is first implemented on an arithmetic circuit of depth at most and with elements, where the constant factors in the big-O notation depend on the grammar. Then, the circuit is improved using fast matrix multiplication to use only elements, while preserving depth .
期刊介绍:
Information and Computation welcomes original papers in all areas of theoretical computer science and computational applications of information theory. Survey articles of exceptional quality will also be considered. Particularly welcome are papers contributing new results in active theoretical areas such as
-Biological computation and computational biology-
Computational complexity-
Computer theorem-proving-
Concurrency and distributed process theory-
Cryptographic theory-
Data base theory-
Decision problems in logic-
Design and analysis of algorithms-
Discrete optimization and mathematical programming-
Inductive inference and learning theory-
Logic & constraint programming-
Program verification & model checking-
Probabilistic & Quantum computation-
Semantics of programming languages-
Symbolic computation, lambda calculus, and rewriting systems-
Types and typechecking