{"title":"字符串匹配的最佳并行算法","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":"{\"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}","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
摘要
假设WRAM [PRAM]是一台具有p个处理器(ram)的并行计算机,它们共享一个公共内存,并且允许同时读取和写入[仅同时读取]。唯一允许的并发写类型是并发AND:处理器的一个子集可以同时向同一内存单元写入0。设为计算机的时间限制。我们设计以下家庭解决字符串匹配问题的并行算法输入的大小为n (n是长度的总和的模式和文本)和有以下性能p、t和n: (1) WRAM: pt = O (n) p⩽n / O (log n)(例如,t⩾log n) __(2)婴儿车:pt = O (n) p⩽n / log2 n(即t⩾log2 n)。(3)WRAM: t =常数p = n1 +εε比;0. (4)对于WRAM: t = O(log n/log log n)对于p = n。对于查找给定字符串的所有初始回文的问题也得到了类似的族。
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.