OPTIMAL PARALLEL SUPERPRIMITIVITY TESTING FOR SQUARE ARRAYS

Size: px
Start display at page:

Download "OPTIMAL PARALLEL SUPERPRIMITIVITY TESTING FOR SQUARE ARRAYS"

Transcription

1 Parallel Processing Letters, c World Scientific Publishing Company OPTIMAL PARALLEL SUPERPRIMITIVITY TESTING FOR SQUARE ARRAYS COSTAS S. ILIOPOULOS Department of Computer Science, King s College London, Strand London, England and School of Computing, Curtin University Perth, WA, Australia csi@dcs.kcl.ac.uk and MAUREEN KORDA Department of Computer Science, King s College London, Strand London, England mo@dcs.kcl.ac.uk Received January 1996 Revised May 1996 Communicated by G. Beauquier ABSTRACT We present an optimal O(log log n) time algorithm on the CRCW PRAM which tests whether a square array, A, of size n n, is superprimitive. If A is not superprimitive, the algorithm returns the quasiperiod, i.e., the smallest square array that covers A. Keywords: String Algorithms, Parallel Algorithms, PRAM Algorithms, Complexity 1. Introduction The problem of identifying the repetitive structures in a string is common in computer science. A typical regularity of a string is its period. We say that a string x has a period u, when x is a prefix of the string u k for some integer k > 1, where u k is formed by concatenating k copies of u. The period of a string can be generalised to the notions of seed and cover. A cover of x is a substring w such that x can be reconstructed from superpositions and concatenations of w. A seed of x is a substring w such that a superstring of x can be constructed from superpositions and concatenations of w. For example, abc is a period of abcabcabca, abca is a cover of abcabcaabca, and abca is a seed of abcabcaabc. A Partially supported by SERC grants GR/F 00898, GR/L and GR/J 17844, NATO grant CRG , ESPRIT BRA grant 7131 for ALCOM II, and MRC grant G Supported by a Medical Research Council Studentship.

2 variant of the covering problem (see [11]) defined above, was shown to have applications to DNA sequencing by hybridization using oligonucleotide probes. The shortest cover, w of a string x, w < x, is said to be its quasiperiod. If there is no such w, then x is said to be superprimitive. A linear time sequential algorithm was given in [2] for superprimitivity testing which returns the quasiperiod if it exists. Breslauer [3] presented a linear time on-line algorithm for the same problem. Moore and Smyth [14] presented a linear time algorithm for computing all the covers of a given string. Using the PRAM model of computation, Breslauer [4] gave an optimal O(α(n) log log n)-time algorithm for computing the quasiperiod, where α(n) is the inverse Ackermann function; Breslauer [4] also produced a non-optimal algorithm that requires O(log log n) time and O(nlog n/log log n) processors. Iliopoulos and Park [13] gave an optimal O(log log n)-time algorithm for the same problem. The notion of covers was extended to two dimensions in [10]. Given an n n array, A, a square subarray M of A is called a cover of A, if every element A(i,j) is contained within some occurrence of M in A. A sequential linear time algorithm was presented in [10] for the all-covers problem. The shortest square subarray Q of A that covers A is said to be the quasiperiod of A. If there is no subarray that covers A, then we say that A is superprimitive. This paper considers the parallel complexity of finding the quasiperiod of A and presents an optimal, O(log log n)-time algorithm for superprimitivity testing using the common CRCW PRAM model. While the algorithm in [10] uses the Aho- Corasick automaton, the algorithm presented here uses the notion of witnesses in an elimination procedure and is therefore alphabet independent. The paper is organized as follows: in the next section we present some definitions and results used in the sequel. In Section 3 we present an O(log log n) parallel algorithm for computing all the square borders of a square array. In Section 4 we present a constant time algorithm for performing a bout between two borders. In Section 5 we present an O(log log n)-time algorithm for superprimitivity testing. 2. Preliminaries A string is a sequence of zero or more symbols from an alphabet Σ. The set of all strings over the alphabet Σ is denoted by Σ. A string x of length n is represented by x 1 x n, where x i Σ for 1 i n. A string w is a substring of x if x = uwv for u,v Σ. A string w is a prefix of x if x = wu for u Σ. Similarly, w is a suffix of x if x = uw for u Σ. The string xy is a concatenation of two strings x and y. The concatenations of k copies of x is denoted by x k. A non-empty string u is a period of x if x is a prefix of u k for some integer k > 1, or equivalently if x is a prefix of ux. The period of a string x is the shortest period of x. A two dimensional string is an n m array of nm symbols drawn from an alphabet Σ. The n n square array A can be represented by A[1 n,1 n]; the size n of A is denoted by A. An m m array M is a subarray of A if the upper left corner of M can be aligned with an element A(i,j), 1 i,j n m + 1 and M[1 m,1 m] = A[i i + m 1,j j + m 1]. In this case, the

3 subarray M is said to occur at A(i,j). A subarray M is said to be a prefix of A if M occurs at A(1,1). Similarly, a subarray M is a suffix of A if M occurs at A(n m + 1,n m + 1). A substring w of x is called a cover of x, if x can be constructed by concatenations and superpositions of w. A subarray M of A is called a cover of A, if every element A(i,j) is contained within some occurrence of M. The shortest non-empty square subarray Q of A that covers A is said to be the quasiperiod of A. If there is no subarray that covers A, then we say that A is superprimitive. A string b is a border of x if b is a prefix and a suffix of x. The empty string and x itself are trivial borders of x. A m m subarray M is a border of A if M occurs at positions A(1,1), A(n m + 1,1), A(1,n m + 1) and A(n m + 1,n m+1) (see Figure 1). The empty array and the array A itself are trivial borders of A. M M A M M Figure 1: M is a border of the square array A Fact 1.. A string u is a period of x = ub if and only if b is a non-trivial border of x. Proof. It follows immediately from the definitions of period and border.. Fact 2. A cover of string x is also its border. A cover of array A is also its border. Proof. A cover of a string x occurs as both a prefix and a suffix (in order to cover positions 1 and n) and therefore it is a border of x. A cover of an array A occurs at positions A(1,1), A(n m + 1,1), A(1,n m + 1) and A(n m + 1,n m + 1) ( in order to cover positions A(1,1), A(1,n), A(n,1) and A(n,n)) and therefore is a border of A.. By Fact 2, all borders of A are candidates for the quasiperiod. Let B u and B v be two borders of A such that B u < B v, then the following facts are analogous to those for strings: Fact 3. If B u covers B v, then B v is not the quasiperiod of A. Proof. Assume that B v is the quasiperiod of A; by the definition of the quasiperiodicity B v covers A. However, B u covers B v, which in turn implies that B u also covers A. Therefore B v cannot be the quasiperiod of A, a contradiction, since B u is a shorter cover than B v of A.. Fact 4. If B u B v /2, then B u covers B v. Proof. Let B u and B v be p p and q q matrices respectively. From the

4 definition of a border, B u must occur at all corners of B v. Specifically, B u occurs at locations (1,1), (q p+1,1), (1,q p+1), and (q p+1,q p+1). If p = q/2, then B v occurs at (1,1), (q/2+1,1), (1,q/2+1), (q/2+1,q/2+1) and each occurrence covers q/2 q/2 locations. Clearly, B v is covered. If p > q/2 the occurrences of B u overlap and therefore cover B v.. Fact 5. The quasiperiod Q of an array A covers all the borders of A. Proof. Let B be a border of A. If Q B /2, then Q covers B by Fact 4. Now let Q > B /2. One can see that Q occurs at all four corners of a border B of A; this follows from the fact that Q is also a border of A. From the fact that Q covers A, it follows that Q covers positions A(j, Q +1),...,A(j, B Q ) for j = 1,... Q or equivalently B(j, Q + 1),...,B(j, B Q ) for j = 1,..., Q ; therefore Q covers the first Q rows of B. Similarly we can show that Q is covering the last Q rows, the first Q columns as well as the last Q columns. The rest of the positions in B that are not covered by the above occurrences of Q, are also within another occurrence of Q, since all positions of A are within an occurrence of B; these occurrences are clearly within B. Thus Q covers B.. Our algorithm uses the above Facts to eliminate candidates during the competition which is described in Section 5. The parallel algorithm presented in this paper is based on the common CRCW PRAM (Concurrent Read Concurrent Write Parallel Random Access Machine). The common CRCW PRAM is a shared memory model of parallel computation which consists of a collection of identical processors and a shared memory. Each processor is a RAM, working synchronously and communicating via the shared memory. The memory is accessed by concurrent writes and concurrent reads. Concurrent writes are assumed to write the same value. We measure the complexity of an algorithm on this model by the pair (t,p) where t denotes the time and p the number of processors used by the algorithm. The product t p is the total number of operations required by the algorithm. A parallel algorithm for a problem is said to be optimal if its total number of operations is asymptotically the same as that required by the fastest sequential algorithm for the problem. An optimal algorithm is said to be work-time optimal if its time is the best possible (i.e., matches a lower bound). Our algorithm for superprimitivity testing makes use of the following known algorithms: 1 Given a string of length n, the algorithm in [1] (which will be referred to as the All-Period algorithm) computes all the periods of the string in optimal O(log log n) time. 2 Given a 2-dimensional string of length n n, the algorithm in [6] [7] [8] (which will be referred to as the Witness algorithm) computes the witnesses of the string in optimal O(log log n) time. 3 Given a 2-dimensional m m pattern, a 2-dimensional n n text, and the witnesses of the pattern, the string matching algorithm Constant- Match in [9] [7] finds all occurrences of the pattern in the text in constant time with n 2 processors.

5 4 The integer minimum algorithm in [12] (which will be referred to as the Integer-Min algorithm) computes the minimum of at most n integers whose values are in [1..n] in optimal constant time. The following theorem by Brent [5] is useful in analyzing parallel algorithms, since it allows us to count only the time and the total number of operations. Theorem 1. If a parallel computation can be performed in time t using q operations, then it can be performed in time t + (q t)/p using p processors. For example, if a parallel algorithm runs in O(log log n) time using O(n) operations, then it can be performed in the same O(log log n) time with n/log log n processors. Theorem 1 requires the assignment of processors to their tasks, which can be easily done in our algorithm. 3. Computing all Borders Here we describe a common-crcw PRAM algorithm which computes all the square borders of an n n array A in O(log log n) time and linear work. The algorithm makes use of two n n matrices C and R such that : { 1, A[1...i,j] is a border of A[1...n,j]; C(i,j) = 0, otherwise. { 1, A[i,1...j] is a border of A[i,1...n]; R(i,j) = 0, otherwise. Step 1. Compute C(i,j) and R(i,j), 1 i,j n. This can be done in O(log log n) time using n 2 /log log n processors. We use the All-Periods algorithm of [1]. Step 2. Compute M(i,j) = C(i,j) + R(i,j), 1 i,j n. This can easily be done in constant time using n 2 processors. Step 3. We now consider all positions A(i,i) of A, with M(i,i) = 2; the prefix A[1..i,1..i] of A is a candidate for a border. If M(i,i) = 0, then neither the prefix of the i-th row of length i is a border of that row nor the prefix of the i-th column of length i is a border of that column; therefore A[1..i,1..i] cannot be a border of A. If M(i,i) = 1, then either the prefix of the i-th row of length i is not a border of that row or the prefix of the i-th column of length i is not a border of that column; therefore A[1..i,1..i] cannot be a border of A. If M(i,i) = 2, then both the i-th row and i-th column have borders of length i. Now, for all positions M(i,i) = 2, we know that if M(0,i) = M(1,i)... = M(i 1,i) 1, then rows r 0,r 1,...,r i of A have borders of length i. Similarly the columns c 0,c 1,...,c i have borders of length i, if positions M(i,0) = M(i,1)... = M(i,i 1) 1. Using this criterion we will check whether the prefix A[1..i,1..i] of A occurs on the top right (Step 3.1), bottom left (Step 3.2), and bottom right (Step 3.3) corners of A. Step 3.1 Check whether C(i,j) = 1, for all j = 1,...,i. If this is the case, then A[1..i,1..i] occurs at A(n i + 1,1); otherwise A[1..i,1..i] is not a border.

6 This can easily be done in constant time using n 2 processors (see pseudo-code below). Step 3.2 Check whether R(j,i) = 1, for all j = 1,...,i. If this is the case then A[1..i,1..i] occurs at A(1,n i + 1); otherwise A[1..i,1..i] is not a border. This can easily be done in constant time using n 2 processors (see pseudo-code below). Step 3.3 Check whether R(j,i) = 1 for all j = n i,...,n. If this the case, then A[1..i,1..i] occurs at A(n i+1,n i+1); otherwise A[1..i,1..i] is not a border. This can easily be done in constant time using n 2 processors (see pseudo-code below). The pseudo-code for the All-Borders algorithm is as follows: begin Compute C(i,j), 1 i,j n ; Compute R(i,j), 1 i,j n ; comment Use the All-Periods algorithm for finding all the periods of a string. M(i,j) 0 ; forall i,j pardo if R((i,j) = 1 and C(i,j) = 1 then Processor p ij writes 2 to M(i,j) ; if R((i,j) = 1 xor C(i,j) = 1 then Processor p ij writes 1 to M(i,j) ; odpar forall processors p ij pardo if C(i,j) = 0 and j < i then Processor p ij writes 1 to M(i,i) ; if R(j,i) = 0 and j < i then Processor p ij writes 1 to M(i,i) ; if R(j,i) = 0 and n j < i then Processor p ij writes 1 to M(i,i) ; odpar if M(i,i) = 2 then return A[1...i,1...i]) ; end From the above the following theorem follows: Theorem 3.1. There exists an algorithm to compute all the borders of an n n square array A in O(log log n) time using O(n 2 /log log n) processors.. 4. Bouts The algorithm makes use of Fact 2 that all borders of x are candidates for the quasiperiod. We employ an elimination procedure called the bout: For two borders B u and B v, B u < B v, of A, check if B u covers B v. If B u covers B v, then B v is eliminated since B v cannot be the quasiperiod by Fact 3. Otherwise

7 B u is eliminated since B u cannot be the quasiperiod by Fact 5. Testing whether B u covers B v can be done by firstly dividing B v into disjoint consecutive square blocks of size B u B u and secondly by checking whether each row of every block is covered by an occurrence of B u. We need the following definitions in order to establish the lemma below that forms the basis of our elimination procedure. Let α be the leftmost position above the i-th row such that B u occurs within the block (see Figure 2). Let ζ be the position such that B u occurs and its top right corner δ is the rightmost position within the block above the i-th row (see Figure 2). Also let µ be the position such that B u occurs and its bottom right corner γ is the rightmost position within the block below the i-th row (see Figure 2). Finally let λ be the position such that B u occurs and its bottom left corner β is the leftmost position within the block below the i-th row. µ λ α α ζ δ a b c d e f a b f β γ h Figure 2: Covering a sub-array Lemma 4.1. An array B u covers B v if for every row of every block of B v at least one of the following pairs of points (as defined above) exists {(α,γ),(α,δ),(β,δ), (β,γ)}. Proof. We consider the i-th row of a block of B v. It is clear that if any of the above pairs of points exists then the i-th row is covered (see Figure 2). Assume that α exists. This implies that there is at least one occurrence of B u in the block (above the i-th row) and α is the position of the leftmost occurrence of B u above the i-th row and inside the block. This implies that the segment [b,f] of the i-th row is covered (see Figure 2). In order for the segment [a,b] to be covered then B u must occur to the left of α. But a covering occurrence above α implies the existence of γ and a covering occurrence below α implies the existence of δ. Assume that α does not exist. In this case there is no occurrence of B u in the block (above the i-th row). Let λ be the leftmost occurrence of B u to the right of the first column of the block (see Figure 2). If λ does not exist, then the row is not covered. The existence of λ implies the existence β and that the segment [c,f] of the i-th row is covered by B u. The segment [a,c] can be only

8 covered by an occurrence of B u to the left of the block, which in turn implies the existence of either µ or ζ and therefore the existence of either γ or δ.. Given two borders B u and B v, we use Lemma 4.1 as the basis of the following procedure, which determines whether B u covers B v, to eliminate one of them. Step 1. If B u B v /2, then B u covers B v by Fact 4. Otherwise we use the Constant-Match algorithm to find all occurrences of B u in B v. Step 2. We divide B v into disjoint consecutive square blocks of size B u B u. We assign B u 2 processors to each block. Step 3. For every column of each block we compute the top-most occurrence of B u ; this can be done in constant time using the Integer-Min algorithm and B u processors for each column. We mark all positions of the column below the topmost occurrence. One can see that b (as in Figure 2) is the leftmost mark on the i-th row of the block; we compute the position b (if it exists) in constant time, again using the Integer-Min algorithm. If b exists, then it implies that α exists. Testing the existence of β,γ,δ is done in a similar manner for every row of every block. Step 4. If none of the four pairs of points given by Lemma 4.1 exists in a row of some block, then B u does not cover B v. Otherwise by Lemma 4.1, B v covers B u. Theorem 4.2. Given two borders B u and B v and the witnesses for B u, one can test whether B u covers B v in constant time using n 2 processors.. 5. Superprimitivity Testing The steps of the algorithm are as follows: Step 1. Compute all borders of A using the All-Borders algorithm in O(log log n) time using n 2 /log log n processors. For 1 i < log n, let R i be the range of borders such that {t : 2 i B t < 2 i+1 }. Let B i be the smallest border in the range R i. Note that there are at most log n such borders and that only these can be candidates for the quasiperiod by Facts 3 and 4. In each interval R i the smallest border can be found in constant time using the Integer-Min algorithm. Step 2. Compute the witnesses for each B i selected in Step 1 using the Witness algorithm. This is done in O(log log 2 i ) time and O(2 i ) work for i = 1,...,log n. Therefore the total number of operations is bounded by: log n i=0 log n 2 2i < ( i=0 2 i ) 2 = O(n 2 ) Step 3. First we consider all borders B i such that B i n/log log n performing bouts in a binary tree fashion using the constant time Bout algorithm. The number of operations during the bout is dominated by the pattern matching phase which requires B i 2 operations. There are O(log log n) levels of bouts.

9 The number of candidates for the quasiperiod will be halved at each level and the number of operations required is bounded by: B i n log log n B i 2 B i n log log n (2 i+1 ) 2 < B i n log log n 2 i+1 2 n = O(( log log n )2 ) Since there are log log n levels of bouts, the time for this step is O(log log n) and the total number of operations is O((n/log log n) 2 ). We let b be the only border which survives this step. Step 4. We must now perform bouts sequentially between the remaining borders and b. The borders which have not yet competed in a competition are all B i such that n/log log n < B i n. There are at most log log log n of them. The total sequential time to complete the competition is therefore O(log log log n). The total number of operations for this step is bounded by: b 2 + B i>n/ log log n log log log n B i 2 (n/log log n) 2 + (n/2 i ) 2 = O(n 2 ) Let B be the border which survives this round. If B = A then A is superprimitive. Otherwise b is the quasiperiod of A. 6. Conclusions We have presented an optimal O(log log n)-time algorithm for superprimitivity testing of a square array. The problem of designing an optimal parallel algorithm to compute all the covers of a square array is an open one. 7. References i=0 [1] A.Apostolico, D.Breslauer and Z.Galil, Optimal parallel algorithms for periods, palindromes and squares, Proc. of the 19th International Colloquium on Automota, Languages and Programming, Lecture Notes in Computer Science, 623, (1992) [2] A.Apostolico, M.Farach and C.S.Iliopoulos, Optimal superprimitivity testing for strings, Inform. Process. Lett. 39, (1991) [3] D.Breslauer, An on-line string superprimitivity test, Inform. Process. Lett. 44 (1992) [4] D.Breslauer, Testing string superprimitivity in parallel, Inform. Process. Lett, to appear. [5] R.P. Brent, The parallel evaluation of general arithmetic expressions, Journal of Assoc. Comput. Mach., 21, (1974) [6] M.Crochemore, L.Gasieniec, Z.Galil, K.Park and W.Rytter. Constant time deterministic sample computation and its applications, SIAM Journal of Computing to appear.

10 [7] R.Cole, M.Crochemore, Z.Galil, L.Gasieniec, R.Hariharan, S.Muthukrishnan, K.Park and W.Rytter, Optimally fast parallel algorithms for preprocessing and pattern matching in one and two dimensions, 34th IEEE Symposium on Foundations of Computer Science, Palo Alto, USA, [8] R.Cole, Z.Galil, R.Hariharan, S.Muthukrishnan and K.Park, Optimal parallel witness computation, manuscript, [9] M.Crochemore, L.Gasieniec, R.Hariharan, S.Muthukrishnan and W.Rytter, An optimal constant time algorithm for 2D pattern matching, manuscript, [10] M.Crochemore, C.S.Iliopoulos and M.Korda, Two-dimensional prefix matching and covering for square matrices, submitted, [11] A.M. Duval and W.F. Smyth, Covering a circular string with substrings of fixed length, Int. Journal of Foundations of Computer Science, to appear. [12] F.Fich, R.Ragde and A.Widgerson, Relations between concurrent-write models of parallel computation, SIAM Journal of Computing, 17, (1988) [13] C.S.Iliopoulos and K.Park, An optimal O(log log n) time algorithm for parallel superprimitivity testing, Journal of the Korea Information Science Society, 21(8), (1994) [14] D.W.G.Moore and W.F.Smyth, Computing the covers of a string in linear time, Proc. 5th ACM-SIAM Symp. Discrete Algorithms, (1994)

Computing repetitive structures in indeterminate strings

Computing repetitive structures in indeterminate strings Computing repetitive structures in indeterminate strings Pavlos Antoniou 1, Costas S. Iliopoulos 1, Inuka Jayasekera 1, Wojciech Rytter 2,3 1 Dept. of Computer Science, King s College London, London WC2R

More information

Finding all covers of an indeterminate string in O(n) time on average

Finding all covers of an indeterminate string in O(n) time on average Finding all covers of an indeterminate string in O(n) time on average Md. Faizul Bari, M. Sohel Rahman, and Rifat Shahriyar Department of Computer Science and Engineering Bangladesh University of Engineering

More information

Optimal Superprimitivity Testing for Strings

Optimal Superprimitivity Testing for Strings Optimal Superprimitivity Testing for Strings Alberto Apostolico Martin Farach Costas S. Iliopoulos Fibonacci Report 90.7 August 1990 - Revised: March 1991 Abstract A string w covers another string z if

More information

Sorting suffixes of two-pattern strings

Sorting suffixes of two-pattern strings Sorting suffixes of two-pattern strings Frantisek Franek W. F. Smyth Algorithms Research Group Department of Computing & Software McMaster University Hamilton, Ontario Canada L8S 4L7 April 19, 2004 Abstract

More information

SORTING SUFFIXES OF TWO-PATTERN STRINGS.

SORTING SUFFIXES OF TWO-PATTERN STRINGS. International Journal of Foundations of Computer Science c World Scientific Publishing Company SORTING SUFFIXES OF TWO-PATTERN STRINGS. FRANTISEK FRANEK and WILLIAM F. SMYTH Algorithms Research Group,

More information

Implementing Approximate Regularities

Implementing Approximate Regularities Implementing Approximate Regularities Manolis Christodoulakis Costas S. Iliopoulos Department of Computer Science King s College London Kunsoo Park School of Computer Science and Engineering, Seoul National

More information

Overlapping factors in words

Overlapping factors in words AUSTRALASIAN JOURNAL OF COMBINATORICS Volume 57 (2013), Pages 49 64 Overlapping factors in words Manolis Christodoulakis University of Cyprus P.O. Box 20537, 1678 Nicosia Cyprus christodoulakis.manolis@ucy.ac.cy

More information

(Preliminary Version)

(Preliminary Version) Relations Between δ-matching and Matching with Don t Care Symbols: δ-distinguishing Morphisms (Preliminary Version) Richard Cole, 1 Costas S. Iliopoulos, 2 Thierry Lecroq, 3 Wojciech Plandowski, 4 and

More information

Approximate periods of strings

Approximate periods of strings Theoretical Computer Science 262 (2001) 557 568 www.elsevier.com/locate/tcs Approximate periods of strings Jeong Seop Sim a;1, Costas S. Iliopoulos b; c;2, Kunsoo Park a;1; c; d;3, W.F. Smyth a School

More information

String Regularities and Degenerate Strings

String Regularities and Degenerate Strings M. Sc. Thesis Defense Md. Faizul Bari (100705050P) Supervisor: Dr. M. Sohel Rahman String Regularities and Degenerate Strings Department of Computer Science and Engineering Bangladesh University of Engineering

More information

On-line String Matching in Highly Similar DNA Sequences

On-line String Matching in Highly Similar DNA Sequences On-line String Matching in Highly Similar DNA Sequences Nadia Ben Nsira 1,2,ThierryLecroq 1,,MouradElloumi 2 1 LITIS EA 4108, Normastic FR3638, University of Rouen, France 2 LaTICE, University of Tunis

More information

Online Computation of Abelian Runs

Online Computation of Abelian Runs Online Computation of Abelian Runs Gabriele Fici 1, Thierry Lecroq 2, Arnaud Lefebvre 2, and Élise Prieur-Gaston2 1 Dipartimento di Matematica e Informatica, Università di Palermo, Italy Gabriele.Fici@unipa.it

More information

Number of occurrences of powers in strings

Number of occurrences of powers in strings Author manuscript, published in "International Journal of Foundations of Computer Science 21, 4 (2010) 535--547" DOI : 10.1142/S0129054110007416 Number of occurrences of powers in strings Maxime Crochemore

More information

String Regularities and Degenerate Strings

String Regularities and Degenerate Strings M.Sc. Engg. Thesis String Regularities and Degenerate Strings by Md. Faizul Bari Submitted to Department of Computer Science and Engineering in partial fulfilment of the requirments for the degree of Master

More information

(Refer Slide Time: 0:21)

(Refer Slide Time: 0:21) Theory of Computation Prof. Somenath Biswas Department of Computer Science and Engineering Indian Institute of Technology Kanpur Lecture 7 A generalisation of pumping lemma, Non-deterministic finite automata

More information

R ij = 2. Using all of these facts together, you can solve problem number 9.

R ij = 2. Using all of these facts together, you can solve problem number 9. Help for Homework Problem #9 Let G(V,E) be any undirected graph We want to calculate the travel time across the graph. Think of each edge as one resistor of 1 Ohm. Say we have two nodes: i and j Let the

More information

Chapter 1. Comparison-Sorting and Selecting in. Totally Monotone Matrices. totally monotone matrices can be found in [4], [5], [9],

Chapter 1. Comparison-Sorting and Selecting in. Totally Monotone Matrices. totally monotone matrices can be found in [4], [5], [9], Chapter 1 Comparison-Sorting and Selecting in Totally Monotone Matrices Noga Alon Yossi Azar y Abstract An mn matrix A is called totally monotone if for all i 1 < i 2 and j 1 < j 2, A[i 1; j 1] > A[i 1;

More information

Unbordered Factors and Lyndon Words

Unbordered Factors and Lyndon Words Unbordered Factors and Lyndon Words J.-P. Duval Univ. of Rouen France T. Harju Univ. of Turku Finland September 2006 D. Nowotka Univ. of Stuttgart Germany Abstract A primitive word w is a Lyndon word if

More information

Compressed Index for Dynamic Text

Compressed Index for Dynamic Text Compressed Index for Dynamic Text Wing-Kai Hon Tak-Wah Lam Kunihiko Sadakane Wing-Kin Sung Siu-Ming Yiu Abstract This paper investigates how to index a text which is subject to updates. The best solution

More information

On the Number of Distinct Squares

On the Number of Distinct Squares Frantisek (Franya) Franek Advanced Optimization Laboratory Department of Computing and Software McMaster University, Hamilton, Ontario, Canada Invited talk - Prague Stringology Conference 2014 Outline

More information

MURDOCH RESEARCH REPOSITORY Authors Version Iliopoulos, C.S., Moore, D. and Smyth, W.. (1998) The covers of a circular ibonacci string. Journal of Combinatorial Mathematics and Combinatorial Computing,

More information

Sequential and Parallel Algorithms for the All-Substrings Longest Common Subsequence Problem

Sequential and Parallel Algorithms for the All-Substrings Longest Common Subsequence Problem Sequential and Parallel Algorithms for the All-Substrings Longest Common Subsequence Problem C. E. R. Alves Faculdade de Tecnologia e Ciências Exatas Universidade São Judas Tadeu São Paulo-SP-Brazil prof.carlos

More information

String Range Matching

String Range Matching String Range Matching Juha Kärkkäinen, Dominik Kempa, and Simon J. Puglisi Department of Computer Science, University of Helsinki Helsinki, Finland firstname.lastname@cs.helsinki.fi Abstract. Given strings

More information

1 Alphabets and Languages

1 Alphabets and Languages 1 Alphabets and Languages Look at handout 1 (inference rules for sets) and use the rules on some examples like {a} {{a}} {a} {a, b}, {a} {{a}}, {a} {{a}}, {a} {a, b}, a {{a}}, a {a, b}, a {{a}}, a {a,

More information

Varieties of Regularities in Weighted Sequences

Varieties of Regularities in Weighted Sequences Varieties of Regularities in Weighted Sequences Hui Zhang 1, Qing Guo 2 and Costas S. Iliopoulos 3 1 College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou, Zhejiang 310023,

More information

Transducers for bidirectional decoding of prefix codes

Transducers for bidirectional decoding of prefix codes Transducers for bidirectional decoding of prefix codes Laura Giambruno a,1, Sabrina Mantaci a,1 a Dipartimento di Matematica ed Applicazioni - Università di Palermo - Italy Abstract We construct a transducer

More information

Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017

Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 1. Find a Greibach normal form for the following given grammar. (10 points) S bab A BAa a B bb Ʌ Solution: (1) Since S does not

More information

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1) CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1) Definition 1 (Alphabet) A alphabet is a finite set of objects called symbols. Definition 2 (String)

More information

SUFFIX TREE. SYNONYMS Compact suffix trie

SUFFIX TREE. SYNONYMS Compact suffix trie SUFFIX TREE Maxime Crochemore King s College London and Université Paris-Est, http://www.dcs.kcl.ac.uk/staff/mac/ Thierry Lecroq Université de Rouen, http://monge.univ-mlv.fr/~lecroq SYNONYMS Compact suffix

More information

SIMPLE ALGORITHM FOR SORTING THE FIBONACCI STRING ROTATIONS

SIMPLE ALGORITHM FOR SORTING THE FIBONACCI STRING ROTATIONS SIMPLE ALGORITHM FOR SORTING THE FIBONACCI STRING ROTATIONS Manolis Christodoulakis 1, Costas S. Iliopoulos 1, Yoan José Pinzón Ardila 2 1 King s College London, Department of Computer Science London WC2R

More information

MURDOCH RESEARCH REPOSITORY This is the author s final version of the work, as accepted for publication following peer review but without the publisher s layout or pagination. The definitive version is

More information

How many double squares can a string contain?

How many double squares can a string contain? How many double squares can a string contain? F. Franek, joint work with A. Deza and A. Thierry Algorithms Research Group Department of Computing and Software McMaster University, Hamilton, Ontario, Canada

More information

On Pattern Matching With Swaps

On Pattern Matching With Swaps On Pattern Matching With Swaps Fouad B. Chedid Dhofar University, Salalah, Oman Notre Dame University - Louaize, Lebanon P.O.Box: 2509, Postal Code 211 Salalah, Oman Tel: +968 23237200 Fax: +968 23237720

More information

CS243, Logic and Computation Nondeterministic finite automata

CS243, Logic and Computation Nondeterministic finite automata CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333

More information

Computational Models - Lecture 4

Computational Models - Lecture 4 Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push

More information

Pascal Ochem 1 and Elise Vaslet Introduction REPETITION THRESHOLDS FOR SUBDIVIDED GRAPHS AND TREES

Pascal Ochem 1 and Elise Vaslet Introduction REPETITION THRESHOLDS FOR SUBDIVIDED GRAPHS AND TREES Theoretical Informatics and Applications Informatique Théorique et Applications Will be set by the publisher REPETITION THRESHOLDS FOR SUBDIVIDED GRAPHS AND TREES Pascal Ochem 1 and Elise Vaslet 2 Abstract.

More information

ON SENSITIVITY OF k-uniform HYPERGRAPH PROPERTIES

ON SENSITIVITY OF k-uniform HYPERGRAPH PROPERTIES ON SENSITIVITY OF k-uniform HYPERGRAPH PROPERTIES JOSHUA BIDERMAN, KEVIN CUDDY, ANG LI, MIN JAE SONG Abstract. In this paper we present a graph property with sensitivity Θ( n), where n = ( v 2) is the

More information

Dynamic Programming. Shuang Zhao. Microsoft Research Asia September 5, Dynamic Programming. Shuang Zhao. Outline. Introduction.

Dynamic Programming. Shuang Zhao. Microsoft Research Asia September 5, Dynamic Programming. Shuang Zhao. Outline. Introduction. Microsoft Research Asia September 5, 2005 1 2 3 4 Section I What is? Definition is a technique for efficiently recurrence computing by storing partial results. In this slides, I will NOT use too many formal

More information

Optimal Superprimitivity Testing for Strings

Optimal Superprimitivity Testing for Strings Purdue University Purdue e-pubs Computer Science Technical Reports Department of Computer Science 1990 Optimal Superprimitivity Testing for Strings Alberto Apostolico Martin Farach Costas S. Iliopoulos

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

Words with the Smallest Number of Closed Factors

Words with the Smallest Number of Closed Factors Words with the Smallest Number of Closed Factors Gabriele Fici Zsuzsanna Lipták Abstract A word is closed if it contains a factor that occurs both as a prefix and as a suffix but does not have internal

More information

Lecture 17: Language Recognition

Lecture 17: Language Recognition Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

More information

Aperiodic languages and generalizations

Aperiodic languages and generalizations Aperiodic languages and generalizations Lila Kari and Gabriel Thierrin Department of Mathematics University of Western Ontario London, Ontario, N6A 5B7 Canada June 18, 2010 Abstract For every integer k

More information

3515ICT: Theory of Computation. Regular languages

3515ICT: Theory of Computation. Regular languages 3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,

More information

arxiv: v1 [cs.ds] 15 Feb 2012

arxiv: v1 [cs.ds] 15 Feb 2012 Linear-Space Substring Range Counting over Polylogarithmic Alphabets Travis Gagie 1 and Pawe l Gawrychowski 2 1 Aalto University, Finland travis.gagie@aalto.fi 2 Max Planck Institute, Germany gawry@cs.uni.wroc.pl

More information

Counting and Verifying Maximal Palindromes

Counting and Verifying Maximal Palindromes Counting and Verifying Maximal Palindromes Tomohiro I 1, Shunsuke Inenaga 2, Hideo Bannai 1, and Masayuki Takeda 1 1 Department of Informatics, Kyushu University 2 Graduate School of Information Science

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010 University of Virginia - cs3102: Theory of Computation Spring 2010 PS2 - Comments Average: 77.4 (full credit for each question is 100 points) Distribution (of 54 submissions): 90, 12; 80 89, 11; 70-79,

More information

Small-Space Dictionary Matching (Dissertation Proposal)

Small-Space Dictionary Matching (Dissertation Proposal) Small-Space Dictionary Matching (Dissertation Proposal) Graduate Center of CUNY 1/24/2012 Problem Definition Dictionary Matching Input: Dictionary D = P 1,P 2,...,P d containing d patterns. Text T of length

More information

The Power of One-State Turing Machines

The Power of One-State Turing Machines The Power of One-State Turing Machines Marzio De Biasi Jan 15, 2018 Abstract At first glance, one state Turing machines are very weak: the Halting problem for them is decidable, and, without memory, they

More information

Binary Image Reconstruction Based on Prescribed Numerical Information

Binary Image Reconstruction Based on Prescribed Numerical Information Acta Mathematicae Applicatae Sinica, English Series Vol. 31, No. 2 (2015) 519 528 DOI: 10.1007/s10255-015-0482-4 http://www.applmath.com.cn & www.springerlink.com Acta Mathema cae Applicatae Sinica, English

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

Automata Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

CISC4090: Theory of Computation

CISC4090: Theory of Computation CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

More information

arxiv: v1 [cs.ds] 9 Apr 2018

arxiv: v1 [cs.ds] 9 Apr 2018 From Regular Expression Matching to Parsing Philip Bille Technical University of Denmark phbi@dtu.dk Inge Li Gørtz Technical University of Denmark inge@dtu.dk arxiv:1804.02906v1 [cs.ds] 9 Apr 2018 Abstract

More information

UNIT-III REGULAR LANGUAGES

UNIT-III REGULAR LANGUAGES Syllabus R9 Regulation REGULAR EXPRESSIONS UNIT-III REGULAR LANGUAGES Regular expressions are useful for representing certain sets of strings in an algebraic fashion. In arithmetic we can use the operations

More information

Bordered Conjugates of Words over Large Alphabets

Bordered Conjugates of Words over Large Alphabets Bordered Conjugates of Words over Large Alphabets Tero Harju University of Turku harju@utu.fi Dirk Nowotka Universität Stuttgart nowotka@fmi.uni-stuttgart.de Submitted: Oct 23, 2008; Accepted: Nov 14,

More information

Efficient (δ, γ)-pattern-matching with Don t Cares

Efficient (δ, γ)-pattern-matching with Don t Cares fficient (δ, γ)-pattern-matching with Don t Cares Yoan José Pinzón Ardila Costas S. Iliopoulos Manolis Christodoulakis Manal Mohamed King s College London, Department of Computer Science, London WC2R 2LS,

More information

Periodicity in Rectangular Arrays

Periodicity in Rectangular Arrays Periodicity in Rectangular Arrays arxiv:1602.06915v2 [cs.dm] 1 Jul 2016 Guilhem Gamard LIRMM CNRS, Univ. Montpellier UMR 5506, CC 477 161 rue Ada 34095 Montpellier Cedex 5 France guilhem.gamard@lirmm.fr

More information

BOUNDS ON ZIMIN WORD AVOIDANCE

BOUNDS ON ZIMIN WORD AVOIDANCE BOUNDS ON ZIMIN WORD AVOIDANCE JOSHUA COOPER* AND DANNY RORABAUGH* Abstract. How long can a word be that avoids the unavoidable? Word W encounters word V provided there is a homomorphism φ defined by mapping

More information

The Number of Runs in a String: Improved Analysis of the Linear Upper Bound

The Number of Runs in a String: Improved Analysis of the Linear Upper Bound The Number of Runs in a String: Improved Analysis of the Linear Upper Bound Wojciech Rytter Instytut Informatyki, Uniwersytet Warszawski, Banacha 2, 02 097, Warszawa, Poland Department of Computer Science,

More information

PATTERN MATCHING WITH SWAPS IN PRACTICE

PATTERN MATCHING WITH SWAPS IN PRACTICE International Journal of Foundations of Computer Science c World Scientific Publishing Company PATTERN MATCHING WITH SWAPS IN PRACTICE MATTEO CAMPANELLI Università di Catania, Scuola Superiore di Catania

More information

(NB. Pages are intended for those who need repeated study in formal languages) Length of a string. Formal languages. Substrings: Prefix, suffix.

(NB. Pages are intended for those who need repeated study in formal languages) Length of a string. Formal languages. Substrings: Prefix, suffix. (NB. Pages 22-40 are intended for those who need repeated study in formal languages) Length of a string Number of symbols in the string. Formal languages Basic concepts for symbols, strings and languages:

More information

A GREEDY APPROXIMATION ALGORITHM FOR CONSTRUCTING SHORTEST COMMON SUPERSTRINGS *

A GREEDY APPROXIMATION ALGORITHM FOR CONSTRUCTING SHORTEST COMMON SUPERSTRINGS * A GREEDY APPROXIMATION ALGORITHM FOR CONSTRUCTING SHORTEST COMMON SUPERSTRINGS * 1 Jorma Tarhio and Esko Ukkonen Department of Computer Science, University of Helsinki Tukholmankatu 2, SF-00250 Helsinki,

More information

arxiv: v2 [math.co] 24 Oct 2012

arxiv: v2 [math.co] 24 Oct 2012 On minimal factorizations of words as products of palindromes A. Frid, S. Puzynina, L. Zamboni June 23, 2018 Abstract arxiv:1210.6179v2 [math.co] 24 Oct 2012 Given a finite word u, we define its palindromic

More information

String Matching. Thanks to Piotr Indyk. String Matching. Simple Algorithm. for s 0 to n-m. Match 0. for j 1 to m if T[s+j] P[j] then

String Matching. Thanks to Piotr Indyk. String Matching. Simple Algorithm. for s 0 to n-m. Match 0. for j 1 to m if T[s+j] P[j] then String Matching Thanks to Piotr Indyk String Matching Input: Two strings T[1 n] and P[1 m], containing symbols from alphabet Σ Goal: find all shifts 0 s n-m such that T[s+1 s+m]=p Example: Σ={,a,b,,z}

More information

Bounds on parameters of minimally non-linear patterns

Bounds on parameters of minimally non-linear patterns Bounds on parameters of minimally non-linear patterns P.A. CrowdMath Department of Mathematics Massachusetts Institute of Technology Massachusetts, U.S.A. crowdmath@artofproblemsolving.com Submitted: Jan

More information

Define M to be a binary n by m matrix such that:

Define M to be a binary n by m matrix such that: The Shift-And Method Define M to be a binary n by m matrix such that: M(i,j) = iff the first i characters of P exactly match the i characters of T ending at character j. M(i,j) = iff P[.. i] T[j-i+.. j]

More information

Succinct 2D Dictionary Matching with No Slowdown

Succinct 2D Dictionary Matching with No Slowdown Succinct 2D Dictionary Matching with No Slowdown Shoshana Neuburger and Dina Sokol City University of New York Problem Definition Dictionary Matching Input: Dictionary D = P 1,P 2,...,P d containing d

More information

A Time Hierarchy for Bounded One-Way Cellular Automata

A Time Hierarchy for Bounded One-Way Cellular Automata A Time Hierarchy for Bounded One-Way Cellular Automata Andreas Klein and Martin Kutrib Institute of Informatics, University of Giessen Arndtstr. 2, D-35392 Giessen, Germany Abstract. Space-bounded one-way

More information

Multiple Pattern Matching

Multiple Pattern Matching Multiple Pattern Matching Stephen Fulwider and Amar Mukherjee College of Engineering and Computer Science University of Central Florida Orlando, FL USA Email: {stephen,amar}@cs.ucf.edu Abstract In this

More information

On a Parallel Lehmer-Euclid GCD Algorithm

On a Parallel Lehmer-Euclid GCD Algorithm On a Parallel Lehmer-Euclid GCD Algorithm Sidi Mohammed Sedjelmaci LIPN CNRS UPRES-A 7030, Université Paris-Nord 93430 Villetaneuse, France. e-mail: sms@lipn.univ-paris13.fr ABSTRACT A new version of Euclid

More information

International Journal of Foundations of Computer Science Two-dimensional Digitized Picture Arrays and Parikh Matrices

International Journal of Foundations of Computer Science Two-dimensional Digitized Picture Arrays and Parikh Matrices International Journal of Foundations of Computer Science Two-dimensional Digitized Picture Arrays and Parikh Matrices --Manuscript Draft-- Manuscript Number: Full Title: Article Type: Keywords: Corresponding

More information

Mining Maximal Flexible Patterns in a Sequence

Mining Maximal Flexible Patterns in a Sequence Mining Maximal Flexible Patterns in a Sequence Hiroki Arimura 1, Takeaki Uno 2 1 Graduate School of Information Science and Technology, Hokkaido University Kita 14 Nishi 9, Sapporo 060-0814, Japan arim@ist.hokudai.ac.jp

More information

IAENG International Journal of Applied Mathematics, 46:2, IJAM_46_2_08. A Solution to Yamakami s Problem on Non-uniform Context-free Languages

IAENG International Journal of Applied Mathematics, 46:2, IJAM_46_2_08. A Solution to Yamakami s Problem on Non-uniform Context-free Languages A Solution to Yamakami s Problem on Non-uniform Context-free Languages Toshio Suzuki, Member, IAENG Abstract Yamakami (Theoret. Comput. Sci., 2011) studies non-uniform context-free languages. Here, the

More information

A Quasilinear-Time Algorithm for Tiling the Plane Isohedrally with a Polyomino

A Quasilinear-Time Algorithm for Tiling the Plane Isohedrally with a Polyomino arxiv:1507.02762v2 [cs.cg] 9 Mar 2016 A Quasilinear-Time Algorithm for Tiling the Plane Isohedrally with a Polyomino Stefan Langerman Andrew Winslow Abstract A plane tiling consisting of congruent copies

More information

CSci 311, Models of Computation Chapter 4 Properties of Regular Languages

CSci 311, Models of Computation Chapter 4 Properties of Regular Languages CSci 311, Models of Computation Chapter 4 Properties of Regular Languages H. Conrad Cunningham 29 December 2015 Contents Introduction................................. 1 4.1 Closure Properties of Regular

More information

The distribution of run lengths in integer compositions

The distribution of run lengths in integer compositions The distribution of run lengths in integer compositions Herbert S Wilf University of Pennsylvania Philadelphia PA 19104-6395, USA wilf@mathupennedu Submitted: Mar 7, 2010; Accepted: Oct 9, 2011; Published:

More information

arxiv: v2 [cs.ds] 5 Mar 2014

arxiv: v2 [cs.ds] 5 Mar 2014 Order-preserving pattern matching with k mismatches Pawe l Gawrychowski 1 and Przemys law Uznański 2 1 Max-Planck-Institut für Informatik, Saarbrücken, Germany 2 LIF, CNRS and Aix-Marseille Université,

More information

THIS paper is aimed at designing efficient decoding algorithms

THIS paper is aimed at designing efficient decoding algorithms IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 45, NO. 7, NOVEMBER 1999 2333 Sort-and-Match Algorithm for Soft-Decision Decoding Ilya Dumer, Member, IEEE Abstract Let a q-ary linear (n; k)-code C be used

More information

Remarks on Separating Words

Remarks on Separating Words Remarks on Separating Words Erik D. Demaine, Sarah Eisenstat, Jeffrey Shallit 2, and David A. Wilson MIT Computer Science and Artificial Intelligence Laboratory, 32 Vassar Street, Cambridge, MA 239, USA,

More information

Theory of Computation 1 Sets and Regular Expressions

Theory of Computation 1 Sets and Regular Expressions Theory of Computation 1 Sets and Regular Expressions Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Theory of Computation

More information

Algorithms for Three Versions of the Shortest Common Superstring Problem

Algorithms for Three Versions of the Shortest Common Superstring Problem Algorithms for Three Versions of the Shortest Common Superstring Problem Maxime Crochemore, Marek Cygan, Costas Iliopoulos, Marcin Kubica, Jakub Radoszewski, Wojciech Rytter, Tomasz Walen King s College

More information

Learning k-edge Deterministic Finite Automata in the Framework of Active Learning

Learning k-edge Deterministic Finite Automata in the Framework of Active Learning Learning k-edge Deterministic Finite Automata in the Framework of Active Learning Anuchit Jitpattanakul* Department of Mathematics, Faculty of Applied Science, King Mong s University of Technology North

More information

Module 9: Tries and String Matching

Module 9: Tries and String Matching Module 9: Tries and String Matching CS 240 - Data Structures and Data Management Sajed Haque Veronika Irvine Taylor Smith Based on lecture notes by many previous cs240 instructors David R. Cheriton School

More information

All of the above algorithms are such that the total work done by themisω(n 2 m 2 ). (The work done by a parallel algorithm that uses p processors and

All of the above algorithms are such that the total work done by themisω(n 2 m 2 ). (The work done by a parallel algorithm that uses p processors and Efficient Parallel Algorithms for Template Matching Sanguthevar Rajasekaran Department of CISE, University of Florida Abstract. The parallel complexity of template matching has been well studied. In this

More information

Sliding Windows with Limited Storage

Sliding Windows with Limited Storage Electronic Colloquium on Computational Complexity, Report No. 178 (2012) Sliding Windows with Limited Storage Paul Beame Computer Science and Engineering University of Washington Seattle, WA 98195-2350

More information

Constructing c-ary Perfect Factors

Constructing c-ary Perfect Factors Constructing c-ary Perfect Factors Chris J. Mitchell Computer Science Department Royal Holloway University of London Egham Hill Egham Surrey TW20 0EX England. Tel.: +44 784 443423 Fax: +44 784 443420 Email:

More information

Theory of Computation (II) Yijia Chen Fudan University

Theory of Computation (II) Yijia Chen Fudan University Theory of Computation (II) Yijia Chen Fudan University Review A language L is a subset of strings over an alphabet Σ. Our goal is to identify those languages that can be recognized by one of the simplest

More information

Design of Distributed Systems Melinda Tóth, Zoltán Horváth

Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Publication date 2014 Copyright 2014 Melinda Tóth, Zoltán Horváth Supported by TÁMOP-412A/1-11/1-2011-0052

More information

On Stateless Multicounter Machines

On Stateless Multicounter Machines On Stateless Multicounter Machines Ömer Eğecioğlu and Oscar H. Ibarra Department of Computer Science University of California, Santa Barbara, CA 93106, USA Email: {omer, ibarra}@cs.ucsb.edu Abstract. We

More information

Theory of Computation

Theory of Computation Theory of Computation (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2018 Theory of Computation, Feodor F. Dragan, Kent State University 1 Before we go into details, what

More information

Theoretical Computer Science

Theoretical Computer Science Theoretical Computer Science Zdeněk Sawa Department of Computer Science, FEI, Technical University of Ostrava 17. listopadu 15, Ostrava-Poruba 708 33 Czech republic September 22, 2017 Z. Sawa (TU Ostrava)

More information

Theory of Languages and Automata

Theory of Languages and Automata Theory of Languages and Automata Chapter 1- Regular Languages & Finite State Automaton Sharif University of Technology Finite State Automaton We begin with the simplest model of Computation, called finite

More information

2. Elements of the Theory of Computation, Lewis and Papadimitrou,

2. Elements of the Theory of Computation, Lewis and Papadimitrou, Introduction Finite Automata DFA, regular languages Nondeterminism, NFA, subset construction Regular Epressions Synta, Semantics Relationship to regular languages Properties of regular languages Pumping

More information

arxiv: v1 [cs.dm] 18 May 2016

arxiv: v1 [cs.dm] 18 May 2016 A note on the shortest common superstring of NGS reads arxiv:1605.05542v1 [cs.dm] 18 May 2016 Tristan Braquelaire Marie Gasparoux Mathieu Raffinot Raluca Uricaru May 19, 2016 Abstract The Shortest Superstring

More information

Parity Dominating Sets in Grid Graphs

Parity Dominating Sets in Grid Graphs Parity Dominating Sets in Grid Graphs John L. Goldwasser and William F. Klostermeyer Dept. of Mathematics West Virginia University Morgantown, WV 26506 Dept. of Computer and Information Sciences University

More information

Automata Theory for Presburger Arithmetic Logic

Automata Theory for Presburger Arithmetic Logic Automata Theory for Presburger Arithmetic Logic References from Introduction to Automata Theory, Languages & Computation and Constraints in Computational Logic Theory & Application Presented by Masood

More information