website or repository, are prohibited. ... We give simple and practical algorithms for finding all such pattern ..... compiled them with Borland C++ Builder 6. We per ...
Feb 20, 2018 - starting point is the result of Arora et al. [10], which gives a method ...... [10] Sanjeev Arora, David Karger, and Marek Karpinski. Polynomial time ...
Jan 3, 2010 - in computer graphics and vision [13, 14, 15, 7, 17, 18, 16], and has natural applications to other areas o
The H-Minor containment problem asks whether a graph G contains some fixed ... The derivation of a polynomial-time algorithm for H-Minor containment is one.
common subsequence (LCS) problem and study some new variants, first introduced and studied by ..... Press and McGraw Hill, Cambridge, 1992. 6. Maxime ...
Oct 31, 2006 - predict and search for the structure of new sequences. .... file corresponding to PDB-ID 1AV5) that contains eight cores. Fig. 2. ..... ordered to facilitate binary search by the computation for its ..... student member of the IEEE.
Jun 28, 2017 - 1 ⤠k ⤠n. Note that if fâk(V ) = â then it is not possible to partition V into k highly ... Compute f, i.e. compute value f(S) for all S â V . It takes O(2n(n + m)) time. 2. Using Björklund et ..... xiyi ⤠100k. Applying
Feb 8, 2007 - âDepartment of Mathematics, Tel Aviv University, Tel Aviv 69978, Israel. ... â¡Department of Computer Science, Royal Holloway, University of London, Egham, ..... ematics and Its Applications, Oxford University Press, (2006).
Feb 14, 2017 - CC] 14 Feb 2017. Parameterized Algorithms for Recognizing. Monopolar and 2-Subcolorable Graphs. â. Iyad Kanj1, Christian Komusiewicz2, ...
abstract. The parameterized complexity of the face cover prob- lem is considered. The input to this problem is a plane graph, G, of order n. The question asked is ...
A linear programming problem is said to be in special fbrm if it calls for minimizing a sum 6, of distinct positive terms, subject to a set constraints of the form 11/30, ...
Aug 16, 2016 - In this work we design algorithms that achieve ...... [ABS+12] Foto N. Afrati, Magdalena Balazinska, Anish Das Sarma, Bill Howe, Semih ...
Abstractâ String matching is an important part in today's computer applications ... based approaches might not be the best solution for performing parallel computing ... NVIDIA GPUs can be identified by looking at the Fig 2 [4]. It's X axis shows .
Mar 13, 2017 - cake-eating analogy. Example 2.2. ..... The TLS algorithm is closely related in this interpretation to the party game Yankee Swap or White Ele-.
restriction gx;T of the gate g is the gate g0 obtained from g by discarding the outputs not in T and discarding the inputs in S(x) after assigning to them the values.
Sep 4, 2013 - N(G, v) the set of neighbors of v in G. We consider bounded degree graphs with maxv |N(G, v)| ⤠â. ... In the computer science liter- ature, this ...
Nov 2, 2005 - supported by the Louis L. and Anita M. Perlman Postdoctoral ... in the previous portion of the string is replaced with the pointer to the previous.
Ulam distances âi ed(Ai,Bi) is at most R or is bigger ... In the end, when using our gap tester in the ... make extens
Jun 14, 2006 - means by definition that P [j] = i. If any of ..... with realistic real world data. .... Parameterized du
Color G in the same way: G is subgraph of G. • Time: carrying out d times a
perfect matching algorithm in a regular graph: – O(nd3) if we use Schrijver's
algorithm ...
In 1970, Knuth, Pratt, and Morris [1] showed how to do basic pattern matching in linear time. Related problems, such as those discussed in [4], have pre-.
Needle in a haystack the string matching problem consists of finding a (usually short) string, the pattern , as a substring in a given. (usually very long) string, the ...
Feb 3, 2014 - one-to-one graph matching to practical multi-partite matching for ER. In the theory ...... tion of site crawling and API access. All sources have.
Mar 6, 2013 - Computer Science and Engineering, The Ohio State University. 3 CNRS ... cases one of our GPU-accelerated algorithms is demonstrated to be .... high degree of parallelism but does not guarantee a maximal set of augmen-.
Jul 7, 2006 - Given a pattern of length m and a text of length n find all substrings of ... Transform the string into a Restricted Growth Function (RGF): Replace .... 0.25. 0.33. Proportion of read characters for two different texts and several ...
Sublinear Algorithms for Parameterized Matching
Sublinear Algorithms for Parameterized Matching Leena Salmela
Jorma Tarhio
July 7th, 2006
July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 1
Sublinear Algorithms for Parameterized Matching
Outline • Definition of parameterized matching • New algorithms based on the Boyer-Moore-Horspool (BMH) algorithm • Results of the analysis of the new algorithms • Some experimental results
July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 2
Sublinear Algorithms for Parameterized Matching
Parameterized Matching – Definition 1-dimensional problem: • Given a pattern of length m and a text of length n find all substrings of text that can be transformed into the pattern by using a bijection on the alphabet. 2-dimensional problem: • Given a pattern of size m × m and a text of size n × n find all m × m substrings of text that can be transformed into the pattern by using a bijection on the alphabet.
July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 3
Sublinear Algorithms for Parameterized Matching
Definitions Predecessor strings: • If a character at position i has an earlier occurrence in the position j, the predecessor string contains i − j at position i. Otherwise the predecessor string contains 0. • Example: ’aabac’ is transformed into 0-1-0-2-0 • If two strings p-match then their predecessor strings match exactly. RGF strings: • Transform the string into a Restricted Growth Function (RGF): Replace all occurrences of the first occurring character with 1, the second one with 2 and so on. • Example: ’aabac’ is transformed into 1-1-2-1-3 • If two strings p-match then their RGF strings match exactly. July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 4
Sublinear Algorithms for Parameterized Matching
Definitions q-repetitive patterns: • A 1-dimensional pattern is q-repetitive if for all substrings of length q there is a character that appears at least twice in the substring. • A 2-dimensional pattern is q-repetitive if for all substrings of size q × q there is a character that appears at least twice in the substring.
July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 5
Sublinear Algorithms for Parameterized Matching
New 1D Algorithms Based on Boyer-Moore-Horspool • Boyer-Moore-Horspool makes the shift based on the last character aligned with the pattern. • In the parameterized version we make the shift based on the last q characters (q-gram) aligned with the pattern • After the shift that q-gram will be aligned with the last q-gram of the pattern that p-matches it.
July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 6
Sublinear Algorithms for Parameterized Matching
How do we index the shift table? • Transform the q-gram into a RGF string and use the rank of the RGF string as an index. (PBMH-RGF) – Memory usage: bq (the q:th Bell number) – The calculation of RGF rank takes some time. • Transform the q-gram into a predecessor string and reserve enough bits in the index for each character of the predecessor string. (FPBMH) Pq s – Memory usage: 2 where s = i=2 ⌈log2 i⌉ – Fast to compute. • Hashing scheme: Transform the q-gram into a predecessor string and add up all positions in the predecessor string. (PBMH-Hash) – Memory usage: q(q − 1)/2 + 1 – Memory efficient and fast to compute but two q-grams may have the same hash value thus reducing the length of the shift. July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 7
Sublinear Algorithms for Parameterized Matching
2D Exact String Matching Algorithm by Tarhio . . .
...
Strip (n−m)/m +1
Strip 3
Strip 2
Strip 1
• Divide the text into ⌈(n − m)/m⌉ + 1 strips:
• Search each strip with a BMH like algorithm and verify the candidates with the trivial algorithm. July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 8
Sublinear Algorithms for Parameterized Matching
. . . 2D Exact String Matching Algorithm by Tarhio • Three tables used: – M [x] is the position where x occurs first in the lowest row of the pattern. – N links the occurrences of x in the lowest row of the pattern. M and N are used to find the candidates that have to be verified. – D[x] is the occurrence of x closest to the last row but not in the last row pattern. (Shift table) • The algorithm can be modified to use q-grams (q × q substrings).
July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 9
Sublinear Algorithms for Parameterized Matching
Generalization to Parameterized Matching • We generalize the algorithm that uses q-grams. • Otherwise the algorithm stays unchanged but the q-grams are transformed to RGFs or predecessor strings to index the tables.
July 7th, 2006
Leena Salmela and Jorma Tarhio
Slide 10
Sublinear Algorithms for Parameterized Matching
Analysis • 1-dimensional algorithms: – Preprocessing: O(σ + mq) (σ is the size of the alphabet) plus time to initialize the shift table which is O(bq ) for PBMH-RGF, O(q q−1 ) for FPBMH and O(q 2 ) for PBMH-Hash. – Matching: O(mn) worst-case complexity and O((qn)/(m − q + 1)) average-case complexity for q-repetitive patterns which is sublinear if q < (m + 1)/2 • 2-dimensional algorithm: – Preprocessing: O(σ + m2 q 2 ) (σ is the size of the alphabet) plus time to initialize the shift table. – Matching: O(m2 n2 ) worst-case complexity and O((q 2 n2 )/(m − q)2 ) average-case complexity for q-repetitive patterns which is sublinear if q < (m + 1)/2 July 7th, 2006