{"title":"Optimal parallel algorithms for string matching","authors":"Zvi Galil","doi":"10.1016/S0019-9958(85)80031-0","DOIUrl":null,"url":null,"abstract":"<div><p>Let WRAM [PRAM]be a parallel computer with <em>p</em> processors (RAMs) which share a common memory and are allowed simultaneous reads and writes [only simultaneous reads]. The only type of simultaneous writes allowed is a simultaneous AND: a subset of the processors may write 0 simultaneously into the same memory cell. Let <em>t</em> be the time bound of the computer. We design below families of parallel algorithms that solve the string matching problem with inputs of size <em>n</em> (<em>n</em> is the sum of lengths of the pattern and the text) and have the following performance in terms of <em>p, t</em> and <em>n</em>: (1) For WRAM: <em>pt</em> = <em>O</em>(<em>n</em>) for <em>p</em> ⩽ <em>n</em>/log <em>n</em> (i.e., <em>t</em> ⩾ log <em>n</em>).<span><sup>†</sup></span> (2) for PRAM: <em>pt</em> = <em>O</em>(<em>n</em>) for <em>p</em> ⩽ <em>n</em>/log<sup>2</sup> <em>n</em> (i.e., <em>t</em> ⩾ log<sup>2</sup> <em>n</em>). (3) For WRAM: <em>t</em> = constant for <em>p</em> = <em>n</em><sup>1 + ε</sup> and any ε > 0. (4) For WRAM: <em>t</em> = <em>O</em>(log <em>n</em>/log log <em>n</em>) for <em>p</em> = <em>n</em>. Similar families are also obtained for the problem of finding all initial palindromes of a given string.</p></div>","PeriodicalId":38164,"journal":{"name":"信息与控制","volume":"67 1","pages":"Pages 144-157"},"PeriodicalIF":0.0000,"publicationDate":"1985-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0019-9958(85)80031-0","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"信息与控制","FirstCategoryId":"1093","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0019995885800310","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"Mathematics","Score":null,"Total":0}
引用次数: 0
Abstract
Let WRAM [PRAM]be a parallel computer with p processors (RAMs) which share a common memory and are allowed simultaneous reads and writes [only simultaneous reads]. The only type of simultaneous writes allowed is a simultaneous AND: a subset of the processors may write 0 simultaneously into the same memory cell. Let t be the time bound of the computer. We design below families of parallel algorithms that solve the string matching problem with inputs of size n (n is the sum of lengths of the pattern and the text) and have the following performance in terms of p, t and n: (1) For WRAM: pt = O(n) for p ⩽ n/log n (i.e., t ⩾ log n).† (2) for PRAM: pt = O(n) for p ⩽ n/log2n (i.e., t ⩾ log2n). (3) For WRAM: t = constant for p = n1 + ε and any ε > 0. (4) For WRAM: t = O(log n/log log n) for p = n. Similar families are also obtained for the problem of finding all initial palindromes of a given string.