Efficient Data Structures for the Factor Periodicity Problem

Size: px
Start display at page:

Download "Efficient Data Structures for the Factor Periodicity Problem"

Transcription

1 Efficient Data Structures for the Factor Periodicity Problem Tomasz Kociumaka Wojciech Rytter Jakub Radoszewski Tomasz Waleń University of Warsaw, Poland SPIRE 2012 Cartagena, October 23, 2012 Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 1/19

2 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

3 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

4 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b a a b a b a a b a b a a Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

5 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b a a b a b a a b a b a a Periods of w[11..22] are 5 Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

6 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b a a b a b a a b a b a a Periods of w[11..22] are 5, 10 Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

7 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b a a b a b a a b a b a a Periods of w[11..22] are 5, 10, 11 Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

8 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b a a b a b a a b a b a a Periods of w[11..22] are 5, 10, 11 and 12. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

9 Factor Periodicity Problem w: a b a a b a b a a b a a b a b a a b a b a a b a a b a b a a b a a b a a b a b a a b a b a a Periods of w[11..22] are 5, 10, 11 and 12. Notation P er(w[11..22]) ={5, 10, 11, 12}, per(w[11..22]) = 5. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 2/19

10 Arithmetic sets A word of length m might have Θ(m) periods, e.g. a m. Definition A set A = {a, a + d, a + 2d,..., a + kd} Z is called arithmetic. An integer d is called the difference of A. Observe that an arithmetic set can be represented by three integers: a, d and k. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 3/19

11 Arithmetic sets A word of length m might have Θ(m) periods, e.g. a m. Definition A set A = {a, a + d, a + 2d,..., a + kd} Z is called arithmetic. An integer d is called the difference of A. Observe that an arithmetic set can be represented by three integers: a, d and k. Fact Let v be a word of length m. Then P er(v) is a union of at most log m disjoint arithmetic sets. For example P er(w[11..22]) = {5} {10, 11, 12} = {5, 10} {11, 12}. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 3/19

12 Formal problem statement Problem (Period Queries) Design a data structure that for a fixed word w of length n answers the following queries. Given integers i, j (1 i j n) compute P er(w[i..j]) respresented as a union of O(log n) arithmetic sets. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 4/19

13 Formal problem statement Problem (Period Queries) Design a data structure that for a fixed word w of length n answers the following queries. Given integers i, j (1 i j n) compute P er(w[i..j]) respresented as a union of O(log n) arithmetic sets. Definition We say that p is an (1 + δ)-period of v if v (1 + δ)p. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 4/19

14 Formal problem statement Problem (Period Queries) Design a data structure that for a fixed word w of length n answers the following queries. Given integers i, j (1 i j n) compute P er(w[i..j]) respresented as a union of O(log n) arithmetic sets. Definition We say that p is an (1 + δ)-period of v if v (1 + δ)p. Problem ((1 + δ)-period Queries) Let us fix a real number δ > 0. Design a data structure that for a fixed word w of length n answers the following queries. Given integers i, j (1 i j n) compute all (1 + δ)-periods of w[i..j] respresented as a union of O(1) arithmetic sets. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 4/19

15 Related work To the best of our knowledge no previous research on the general case of Period Queries. Even for computing the shortest period, only straightforward solutions: memorize all answers O(n 2 ) space, O(1) query time compute the answer from scratch for each query no extra space, O(n) query time Efficient data structures for primitivity testing (generalized by 2-Period Queries) Karhumäki, Lifshits & Rytter; CPM 2007 O(n log n) space, O(1) query time, Crochemore et. al; SPIRE 2010 O(n log ε n) space, O(log n) query time. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 5/19

16 Our results Several results based on the common idea but different tools. Space All periods (1 + δ)-periods O(n) O(log 1+ε n) O(log ε n) O(n log log n) O(log n(log log n) 2 ) O((log log n) 2 ) O(n log ε n) O(log n log log n) O(log log n) O(n log n) O(log n) O(1) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 6/19

17 Our results Several results based on the common idea but different tools. Space All periods (1 + δ)-periods O(n) O(log 1+ε n) O(log ε n) O(n log log n) O(log n(log log n) 2 ) O((log log n) 2 ) O(n log ε n) O(log n log log n) O(log log n) O(n log n) O(log n) O(1) Standard assumptions on the model of computation: word RAM model with w = Ω(log n), randomization. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 6/19

18 Our approach Let Borders(v) = { u : u is a border of v}. Fact P er(v) = v Borders(v) = { v b : b Borders(v)}. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 7/19

19 Our approach Let Borders(v) = { u : u is a border of v}. Fact P er(v) = v Borders(v) = { v b : b Borders(v)}. We compute Borders(v) {2 k,..., 2 k+1 } separately for each k {0,..., log v }. 2 k 2 k 2 k 2 k v Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 7/19

20 Our approach Let Borders(v) = { u : u is a border of v}. Fact P er(v) = v Borders(v) = { v b : b Borders(v)}. We compute Borders(v) {2 k,..., 2 k+1 } separately for each k {0,..., log v }. 2 k 2 k 2 k 2 k v p s Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 7/19

21 Our approach Let Borders(v) = { u : u is a border of v}. Fact P er(v) = v Borders(v) = { v b : b Borders(v)}. We compute Borders(v) {2 k,..., 2 k+1 } separately for each k {0,..., log v }. 2 k 2 k 2 k 2 k v p border s Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 7/19

22 Our approach Let Borders(v) = { u : u is a border of v}. Fact P er(v) = v Borders(v) = { v b : b Borders(v)}. We compute Borders(v) {2 k,..., 2 k+1 } separately for each k {0,..., log v }. 2 k 2 k 2 k 2 k v p border s Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 7/19

23 Close occurrences Let Occ(v, u) be the set of positions of v where an occurrence of u starts. Arithmetic sets naturally appear as the Occ sets. Fact Let v 2 u. Then Occ(v, u) is arithmetic. Moreover, if Occ(v, u) 3 then its difference is equal to per(u). v u period of u Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 8/19

24 A formula for border lengths 2 k 2 k 2 k 2 k v p p s s Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 9/19

25 A formula for border lengths 2 k 2 k 2 k 2 k v p p s s P = Occ(s s, p) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 9/19

26 A formula for border lengths 2 k 2 k 2 k 2 k v p p s s S = Occ(pp, s) P = Occ(s s, p) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 9/19

27 A formula for border lengths 2 k 2 k 2 k 2 k v p p s s l S = Occ(pp, s) P = Occ(s s, p) l Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 9/19

28 A formula for border lengths 2 k 2 k 2 k 2 k l l v p p s s l S = Occ(pp, s) P = Occ(s s, p) l Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 9/19

29 A formula for border lengths 2 k 2 k 2 k 2 k l l v p p s s l S = Occ(pp, s) P = Occ(s s, p) l Fact Let 0 l < 2 k. Then the word v has a border of length 2 k + l if and only if l + 1 S and 2 k l P. Consequently Borders(v) {2 k,..., 2 k+1 } is arithmetic. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 9/19

30 Intersecting arithmetic sets Lemma If P 3 and S 3, then per(p) = per(s). Consequently P and S are arithmetic of common difference. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 10/19

31 Intersecting arithmetic sets Lemma If P 3 and S 3, then per(p) = per(s). Consequently P and S are arithmetic of common difference. v p p s s S P Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 10/19

32 Intersecting arithmetic sets Lemma If P 3 and S 3, then per(p) = per(s). Consequently P and S are arithmetic of common difference. v p p s s S P 2per(s) 2per(p) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 10/19

33 Intersecting arithmetic sets Lemma If P 3 and S 3, then per(p) = per(s). Consequently P and S are arithmetic of common difference. v p p s s S P 2per(s) of period both per(p) and per(s) 2per(p) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 10/19

34 Intersecting arithmetic sets Lemma If P 3 and S 3, then per(p) = per(s). Consequently P and S are arithmetic of common difference. v p p s s S P 2per(s) of period both per(p) and per(s) 2per(p) Intersecting two arithmetic sets can be performed in O(1) time, when one of them is small or when they share a common difference. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 10/19

35 Summary of the combinatorial part Problem (Occurrence Queries) Design a data structure that for a word w can answer the following queries. Given a basic factor u and a factor v of w such that v 2 u (both represented by one of their occurrences) compute the arithmetic set Occ(v, u). Theorem Assume there is a data structure answering the Occurrence Queries in O(f(n)) time. Then this data structure can answer Period Queries in O(f(n) log n) time and (1 + δ)-period Queries in O(f(n)) time. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 11/19

36 Occurrence Queries in O(1) time Fix 2 k n, Split w into parts of length 2 k+1 with overlaps of size 2 k, 2 k+1 w 2 k+1 Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 12/19

37 Occurrence Queries in O(1) time Fix 2 k n, Split w into parts of length 2 k+1 with overlaps of size 2 k, Consider a basic factor u, u = 2 k. 2 k+1 w 2 k+1 Each occurrence of u occurs within a single part. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 12/19

38 Occurrence Queries in O(1) time Fix 2 k n, Split w into parts of length 2 k+1 with overlaps of size 2 k, Consider a basic factor u, u = 2 k. 2 k+1 w 2 k+1 arithmetic sets Each occurrence of u occurs within a single part. Occurrences in a single part form an arithmetic set. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 12/19

39 Occurrence Queries in O(1) time Imagine a (large) array with columns indexed by parts and rows by identifiers of all basic factors of length 2 k. The identifiers are obtained from the DBF (Dictionary of Basic Factors) id(u) id(u ) id(u ) [ 0, 2 k+1 ] [ 2 k, 3 2 k] [ 2 2 k, 4 2 k][ 3 2 k, 5 2 k] Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 13/19

40 Occurrence Queries in O(1) time Imagine a (large) array with columns indexed by parts and rows by identifiers of all basic factors of length 2 k. The identifiers are obtained from the DBF (Dictionary of Basic Factors) id(u) id(u ) id(u ) [ 0, 2 k+1 ] [ 2 k, 3 2 k] [ 2 2 k, 4 2 k][ 3 2 k, 5 2 k] This array has Θ ( n 2 2 k ) cells. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 13/19

41 Occurrence Queries in O(1) time Imagine a (large) array with columns indexed by parts and rows by identifiers of all basic factors of length 2 k. The identifiers are obtained from the DBF (Dictionary of Basic Factors) id(u) id(u ) id(u ) [ 0, 2 k+1 ] [ 2 k, 3 2 k] [ 2 2 k, 4 2 k][ 3 2 k, 5 2 k] This array has Θ ( n 2 2 k ) cells. All factors of length 2 k have n occurrences in total, so n non-empty fields perfect hashing can be used. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 13/19

42 Occurrence Queries in O(1) time Imagine a (large) array with columns indexed by parts and rows by identifiers of all basic factors of length 2 k. The identifiers are obtained from the DBF (Dictionary of Basic Factors) id(u) id(u ) id(u ) [ 0, 2 k+1 ] [ 2 k, 3 2 k] [ 2 2 k, 4 2 k][ 3 2 k, 5 2 k] This array has Θ ( n 2 2 k ) cells. All factors of length 2 k have n occurrences in total, so n non-empty fields perfect hashing can be used. This gives O(n log n) size in total for all values of k. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 13/19

43 Occurrence Queries in O(1) time Answering queries: v w 2 k+1 2 k+1 v lies within at most two consecutive parts, Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 14/19

44 Occurrence Queries in O(1) time Answering queries: v w 2 k+1 id(u) 2 k+1 v lies within at most two consecutive parts, get the occurrences of u from the hash table, Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 14/19

45 Occurrence Queries in O(1) time Answering queries: v w 2 k+1 id(u) 2 k+1 v lies within at most two consecutive parts, get the occurrences of u from the hash table, Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 14/19

46 Occurrence Queries in O(1) time Answering queries: v w 2 k+1 id(u) 2 k+1 v lies within at most two consecutive parts, get the occurrences of u from the hash table, crop and merge these arithmetic sets to obtain the result. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 14/19

47 Occurrence Queries in O(1) time Answering queries: v w 2 k+1 id(u) 2 k+1 v lies within at most two consecutive parts, get the occurrences of u from the hash table, crop and merge these arithmetic sets to obtain the result. Corollary There exists a data structure of O(n log n) size that answers the Occurrence Queries in O(1) time. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 14/19

48 Range Predecessor/Successor Queries Problem (Range Predecessor/Successor Queries) Design a data structure that for a word w can answer the following queries. Given a factor u of w (represented by an occurrence in w) and i {1... n} find P RED(u, i) the last occurrence of u ending at a position i, SUCC(u, i) the first occurrence of u starting at a position i. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 15/19

49 Range Predecessor/Successor Queries Problem (Range Predecessor/Successor Queries) Design a data structure that for a word w can answer the following queries. Given a factor u of w (represented by an occurrence in w) and i {1... n} find P RED(u, i) the last occurrence of u ending at a position i, SUCC(u, i) the first occurrence of u starting at a position i. The Occurrence Queries can be reduced to three Range Predecessor/Successor Queries, where u is a basic factor of w. w i v j Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 15/19

50 Range Predecessor/Successor Queries Problem (Range Predecessor/Successor Queries) Design a data structure that for a word w can answer the following queries. Given a factor u of w (represented by an occurrence in w) and i {1... n} find P RED(u, i) the last occurrence of u ending at a position i, SUCC(u, i) the first occurrence of u starting at a position i. The Occurrence Queries can be reduced to three Range Predecessor/Successor Queries, where u is a basic factor of w. w SUCC(u, i) i i v j Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 15/19

51 Range Predecessor/Successor Queries Problem (Range Predecessor/Successor Queries) Design a data structure that for a word w can answer the following queries. Given a factor u of w (represented by an occurrence in w) and i {1... n} find P RED(u, i) the last occurrence of u ending at a position i, SUCC(u, i) the first occurrence of u starting at a position i. The Occurrence Queries can be reduced to three Range Predecessor/Successor Queries, where u is a basic factor of w. w SUCC(u, i) i i SUCC(u, i + 1) v j Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 15/19

52 Range Predecessor/Successor Queries Problem (Range Predecessor/Successor Queries) Design a data structure that for a word w can answer the following queries. Given a factor u of w (represented by an occurrence in w) and i {1... n} find P RED(u, i) the last occurrence of u ending at a position i, SUCC(u, i) the first occurrence of u starting at a position i. The Occurrence Queries can be reduced to three Range Predecessor/Successor Queries, where u is a basic factor of w. w SUCC(u, i) i i SUCC(u, i + 1) v j P RED(u, j) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 15/19

53 Range Predecessor/Successor Queries Problem (Range Predecessor/Successor Queries) Design a data structure that for a word w can answer the following queries. Given a factor u of w (represented by an occurrence in w) and i {1... n} find P RED(u, i) the last occurrence of u ending at a position i, SUCC(u, i) the first occurrence of u starting at a position i. The Occurrence Queries can be reduced to three Range Predecessor/Successor Queries, where u is a basic factor of w. w SUCC(u, i) i i SUCC(u, i + 1) v j P RED(u, j) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 15/19

54 Range Predecessor/Successor Queries Theorem (Nekrich, Navarro; 2012) There exist data structures that given the locus of u in the suffix tree of w answer the Range Predecessor/Successor queries in and satisfy the following space and time bounds: Space Query time O(n) O(log ε n) O(n log log n) O((log log n) 2 ) O(n log ε n) O(log log n) Theorem (Weighted LA Kopelovitz, Lewenstein; 2007) There exists a data structure of size O(n), which given an interval [i..j] finds the locus of w[i..j] in the suffix tree of w in O(log log n) time. Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 16/19

55 Summary Theorem (this paper) There exist data structures that satisfy following time and space bounds for size, Period Queries query time and (1 + δ)-period Queries query time: Space Period Queries (1 + δ)-period Q. O(n) O(log 1+ε n) O(log ε n) O(n log log n) O(log n(log log n) 2 ) O((log log n) 2 ) O(n log ε n) O(log n log log n) O(log log n) O(n log n) O(log n) O(1) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 17/19

56 Further research Space Period Queries (1 + δ)-period Q. O(n) O(log 1+ε n) O(log ε n) O(n log log n) O(log n(log log n) 2 ) O((log log n) 2 ) O(n log ε n) O(log n log log n) O(log log n) O(n log n) O(log n) O(1) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 18/19

57 Further research Currently in progress: Space Period Queries 2-Period Queries O(n) O(log 1+ε n) O(log ε n) O(n log log n) O(log n(log log n) 2 ) O((log log n) 2 ) O(n log ε n) O(log n log log n) O(log log n) O(n log n) O(log n) O(1) O(n) O(1) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 18/19

58 Further research Currently in progress: Space Period Queries 2-Period Queries O(n) O(log 1+ε n) O(log ε n) O(n log log n) O(log n log log n) O(log log n) O(n log n) O(log n) O(1) O(n) O(1) Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 18/19

59 Further research Currently in progress: Space Period Queries 2-Period Queries O(n) O(log 1+ε n) O(log ε n) O(n log log n) O(log n log log n) O(log log n) O(n log n) O(log n) O(1) O(n) O(1) Open problems: Can the O(n log n) time preprocessing be improved with o(n) query time? Can the shortest period be found faster than O(log n) with o(n 2 ) space? Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 18/19

60 Thank you for your attention Thank you! Tomasz Kociumaka Efficient Data Structures for the Factor Periodicity Problem 19/19

Data Warehousing und Data Mining

Data Warehousing und Data Mining Data Warehousing und Data Mining Multidimensionale Indexstrukturen Ulf Leser Wissensmanagement in der Bioinformatik Content of this Lecture Multidimensional Indexing Grid-Files Kd-trees Ulf Leser: Data

More information

Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2)

Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2) Sorting revisited How did we use a binary search tree to sort an array of elements? Tree Sort Algorithm Given: An array of elements to sort 1. Build a binary search tree out of the elements 2. Traverse

More information

Finding and counting given length cycles

Finding and counting given length cycles Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected

More information

Randomized algorithms

Randomized algorithms Randomized algorithms March 10, 2005 1 What are randomized algorithms? Algorithms which use random numbers to make decisions during the executions of the algorithm. Why would we want to do this?? Deterministic

More information

All trees contain a large induced subgraph having all degrees 1 (mod k)

All trees contain a large induced subgraph having all degrees 1 (mod k) All trees contain a large induced subgraph having all degrees 1 (mod k) David M. Berman, A.J. Radcliffe, A.D. Scott, Hong Wang, and Larry Wargo *Department of Mathematics University of New Orleans New

More information

Complexity of Union-Split-Find Problems. Katherine Jane Lai

Complexity of Union-Split-Find Problems. Katherine Jane Lai Complexity of Union-Split-Find Problems by Katherine Jane Lai S.B., Electrical Engineering and Computer Science, MIT, 2007 S.B., Mathematics, MIT, 2007 Submitted to the Department of Electrical Engineering

More information

How To Find An Optimal Search Protocol For An Oblivious Cell

How To Find An Optimal Search Protocol For An Oblivious Cell The Conference Call Search Problem in Wireless Networks Leah Epstein 1, and Asaf Levin 2 1 Department of Mathematics, University of Haifa, 31905 Haifa, Israel. lea@math.haifa.ac.il 2 Department of Statistics,

More information

SOLUTIONS TO ASSIGNMENT 1 MATH 576

SOLUTIONS TO ASSIGNMENT 1 MATH 576 SOLUTIONS TO ASSIGNMENT 1 MATH 576 SOLUTIONS BY OLIVIER MARTIN 13 #5. Let T be the topology generated by A on X. We want to show T = J B J where B is the set of all topologies J on X with A J. This amounts

More information

Cycles and clique-minors in expanders

Cycles and clique-minors in expanders Cycles and clique-minors in expanders Benny Sudakov UCLA and Princeton University Expanders Definition: The vertex boundary of a subset X of a graph G: X = { all vertices in G\X with at least one neighbor

More information

ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu

ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ON THE COMPLEXITY OF THE GAME OF SET KAMALIKA CHAUDHURI, BRIGHTEN GODFREY, DAVID RATAJCZAK, AND HOETECK WEE {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ABSTRACT. Set R is a card game played with a

More information

TECHNIQUES FOR OPTIMIZING THE RELATIONSHIP BETWEEN DATA STORAGE SPACE AND DATA RETRIEVAL TIME FOR LARGE DATABASES

TECHNIQUES FOR OPTIMIZING THE RELATIONSHIP BETWEEN DATA STORAGE SPACE AND DATA RETRIEVAL TIME FOR LARGE DATABASES Techniques For Optimizing The Relationship Between Data Storage Space And Data Retrieval Time For Large Databases TECHNIQUES FOR OPTIMIZING THE RELATIONSHIP BETWEEN DATA STORAGE SPACE AND DATA RETRIEVAL

More information

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Why? A central concept in Computer Science. Algorithms are ubiquitous. Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

More information

Using Data-Oblivious Algorithms for Private Cloud Storage Access. Michael T. Goodrich Dept. of Computer Science

Using Data-Oblivious Algorithms for Private Cloud Storage Access. Michael T. Goodrich Dept. of Computer Science Using Data-Oblivious Algorithms for Private Cloud Storage Access Michael T. Goodrich Dept. of Computer Science Privacy in the Cloud Alice owns a large data set, which she outsources to an honest-but-curious

More information

Big Data Technology Map-Reduce Motivation: Indexing in Search Engines

Big Data Technology Map-Reduce Motivation: Indexing in Search Engines Big Data Technology Map-Reduce Motivation: Indexing in Search Engines Edward Bortnikov & Ronny Lempel Yahoo Labs, Haifa Indexing in Search Engines Information Retrieval s two main stages: Indexing process

More information

IB Math Research Problem

IB Math Research Problem Vincent Chu Block F IB Math Research Problem The product of all factors of 2000 can be found using several methods. One of the methods I employed in the beginning is a primitive one I wrote a computer

More information

Generating models of a matched formula with a polynomial delay

Generating models of a matched formula with a polynomial delay Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic

More information

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research MapReduce and Distributed Data Analysis Google Research 1 Dealing With Massive Data 2 2 Dealing With Massive Data Polynomial Memory Sublinear RAM Sketches External Memory Property Testing 3 3 Dealing With

More information

ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015

ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015 ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015 ONLINE STEINER FOREST PROBLEM An initially given graph G. s 1 s 2 A sequence of demands (s i, t i ) arriving

More information

Universal hashing. In other words, the probability of a collision for two different keys x and y given a hash function randomly chosen from H is 1/m.

Universal hashing. In other words, the probability of a collision for two different keys x and y given a hash function randomly chosen from H is 1/m. Universal hashing No matter how we choose our hash function, it is always possible to devise a set of keys that will hash to the same slot, making the hash scheme perform poorly. To circumvent this, we

More information

A Note on Maximum Independent Sets in Rectangle Intersection Graphs

A Note on Maximum Independent Sets in Rectangle Intersection Graphs A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada tmchan@uwaterloo.ca September 12,

More information

Dynamic 3-sided Planar Range Queries with Expected Doubly Logarithmic Time

Dynamic 3-sided Planar Range Queries with Expected Doubly Logarithmic Time Dynamic 3-sided Planar Range Queries with Expected Doubly Logarithmic Time Gerth Stølting Brodal 1, Alexis C. Kaporis 2, Spyros Sioutas 3, Konstantinos Tsakalidis 1, Kostas Tsichlas 4 1 MADALGO, Department

More information

Efficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case.

Efficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case. Algorithms Efficiency of algorithms Computational resources: time and space Best, worst and average case performance How to compare algorithms: machine-independent measure of efficiency Growth rate Complexity

More information

The Butterfly, Cube-Connected-Cycles and Benes Networks

The Butterfly, Cube-Connected-Cycles and Benes Networks The Butterfly, Cube-Connected-Cycles and Benes Networks Michael Lampis mlambis@softlab.ntua.gr NTUA The Butterfly, Cube-Connected-Cycles and Benes Networks p.1/16 Introduction Hypercubes are computationally

More information

Full and Complete Binary Trees

Full and Complete Binary Trees Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full

More information

Stationary random graphs on Z with prescribed iid degrees and finite mean connections

Stationary random graphs on Z with prescribed iid degrees and finite mean connections Stationary random graphs on Z with prescribed iid degrees and finite mean connections Maria Deijfen Johan Jonasson February 2006 Abstract Let F be a probability distribution with support on the non-negative

More information

DATA STRUCTURES USING C

DATA STRUCTURES USING C DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give

More information

Closest Pair Problem

Closest Pair Problem Closest Pair Problem Given n points in d-dimensions, find two whose mutual distance is smallest. Fundamental problem in many applications as well as a key step in many algorithms. p q A naive algorithm

More information

CHAPTER 7 INTRODUCTION TO SAMPLING DISTRIBUTIONS

CHAPTER 7 INTRODUCTION TO SAMPLING DISTRIBUTIONS CHAPTER 7 INTRODUCTION TO SAMPLING DISTRIBUTIONS CENTRAL LIMIT THEOREM (SECTION 7.2 OF UNDERSTANDABLE STATISTICS) The Central Limit Theorem says that if x is a random variable with any distribution having

More information

Internet Packet Filter Management and Rectangle Geometry

Internet Packet Filter Management and Rectangle Geometry Internet Packet Filter Management and Rectangle Geometry David Eppstein S. Muthukrishnan Abstract We consider rule sets for internet packet routing and filtering, where each rule consists of a range of

More information

Appendix: Simple Methods for Shift Scheduling in Multi-Skill Call Centers

Appendix: Simple Methods for Shift Scheduling in Multi-Skill Call Centers MSOM.1070.0172 Appendix: Simple Methods for Shift Scheduling in Multi-Skill Call Centers In Bhulai et al. (2006) we presented a method for computing optimal schedules, separately, after the optimal staffing

More information

Arithmetic Coding: Introduction

Arithmetic Coding: Introduction Data Compression Arithmetic coding Arithmetic Coding: Introduction Allows using fractional parts of bits!! Used in PPM, JPEG/MPEG (as option), Bzip More time costly than Huffman, but integer implementation

More information

The Ideal Class Group

The Ideal Class Group Chapter 5 The Ideal Class Group We will use Minkowski theory, which belongs to the general area of geometry of numbers, to gain insight into the ideal class group of a number field. We have already mentioned

More information

Graphs without proper subgraphs of minimum degree 3 and short cycles

Graphs without proper subgraphs of minimum degree 3 and short cycles Graphs without proper subgraphs of minimum degree 3 and short cycles Lothar Narins, Alexey Pokrovskiy, Tibor Szabó Department of Mathematics, Freie Universität, Berlin, Germany. August 22, 2014 Abstract

More information

A New Approach to Dynamic All Pairs Shortest Paths

A New Approach to Dynamic All Pairs Shortest Paths A New Approach to Dynamic All Pairs Shortest Paths Camil Demetrescu Giuseppe F. Italiano Abstract We study novel combinatorial properties of graphs that allow us to devise a completely new approach to

More information

5.4 Closest Pair of Points

5.4 Closest Pair of Points 5.4 Closest Pair of Points Closest Pair of Points Closest pair. Given n points in the plane, find a pair with smallest Euclidean distance between them. Fundamental geometric primitive. Graphics, computer

More information

Classification - Examples

Classification - Examples Lecture 2 Scheduling 1 Classification - Examples 1 r j C max given: n jobs with processing times p 1,...,p n and release dates r 1,...,r n jobs have to be scheduled without preemption on one machine taking

More information

Position-Restricted Substring Searching

Position-Restricted Substring Searching Position-Restricted Substring Searching Veli Mäkinen 1 and Gonzalo Navarro 2 1 AG Genominformatik, Technische Fakultät Universität Bielefeld, Germany. veli@cebitec.uni-bielefeld.de 2 Center for Web Research

More information

Physical Database Design and Tuning

Physical Database Design and Tuning Chapter 20 Physical Database Design and Tuning Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1. Physical Database Design in Relational Databases (1) Factors that Influence

More information

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Mathematics Course 111: Algebra I Part IV: Vector Spaces Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

More information

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

More information

IB Maths SL Sequence and Series Practice Problems Mr. W Name

IB Maths SL Sequence and Series Practice Problems Mr. W Name IB Maths SL Sequence and Series Practice Problems Mr. W Name Remember to show all necessary reasoning! Separate paper is probably best. 3b 3d is optional! 1. In an arithmetic sequence, u 1 = and u 3 =

More information

1. Physical Database Design in Relational Databases (1)

1. Physical Database Design in Relational Databases (1) Chapter 20 Physical Database Design and Tuning Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1. Physical Database Design in Relational Databases (1) Factors that Influence

More information

Approximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs

Approximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs Approximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs R. L. Scot Drysdale a Günter Rote b,1 Astrid Sturm b,1 a Department of Computer Science, Dartmouth College b Institut

More information

Multi-dimensional index structures Part I: motivation

Multi-dimensional index structures Part I: motivation Multi-dimensional index structures Part I: motivation 144 Motivation: Data Warehouse A definition A data warehouse is a repository of integrated enterprise data. A data warehouse is used specifically for

More information

Algorithms and Methods for Distributed Storage Networks 9 Analysis of DHT Christian Schindelhauer

Algorithms and Methods for Distributed Storage Networks 9 Analysis of DHT Christian Schindelhauer Algorithms and Methods for 9 Analysis of DHT Institut für Informatik Wintersemester 2007/08 Distributed Hash-Table (DHT) Hash table does not work efficiently for inserting and deleting Distributed Hash-Table

More information

arxiv:1209.1595v5 [math.co] 26 Dec 2014

arxiv:1209.1595v5 [math.co] 26 Dec 2014 TRIANGLE-FREE INTERSECTION GRAPHS OF LINE SEGMENTS WITH LARGE CHROMATIC NUMBER ARKADIUSZ PAWLIK, JAKUB KOZIK, TOMASZ KRAWCZYK, MICHAŁ LASOŃ, PIOTR MICEK, WILLIAM T. TROTTER, AND BARTOSZ WALCZAK arxiv:1209.1595v5

More information

PYTHAGOREAN TRIPLES KEITH CONRAD

PYTHAGOREAN TRIPLES KEITH CONRAD PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient

More information

The Relation between Two Present Value Formulae

The Relation between Two Present Value Formulae James Ciecka, Gary Skoog, and Gerald Martin. 009. The Relation between Two Present Value Formulae. Journal of Legal Economics 15(): pp. 61-74. The Relation between Two Present Value Formulae James E. Ciecka,

More information

On line construction of suffix trees 1

On line construction of suffix trees 1 (To appear in ALGORITHMICA) On line construction of suffix trees 1 Esko Ukkonen Department of Computer Science, University of Helsinki, P. O. Box 26 (Teollisuuskatu 23), FIN 00014 University of Helsinki,

More information

Comparing Multiple Proportions, Test of Independence and Goodness of Fit

Comparing Multiple Proportions, Test of Independence and Goodness of Fit Comparing Multiple Proportions, Test of Independence and Goodness of Fit Content Testing the Equality of Population Proportions for Three or More Populations Test of Independence Goodness of Fit Test 2

More information

INTERSECTION OF LINE-SEGMENTS

INTERSECTION OF LINE-SEGMENTS INTERSECTION OF LINE-SEGMENTS Vera Sacristán Discrete and Algorithmic Geometry Facultat de Matemàtiques i Estadística Universitat Politècnica de Catalunya Problem Input: n line-segments in the plane,

More information

1. Prove that the empty set is a subset of every set.

1. Prove that the empty set is a subset of every set. 1. Prove that the empty set is a subset of every set. Basic Topology Written by Men-Gen Tsai email: b89902089@ntu.edu.tw Proof: For any element x of the empty set, x is also an element of every set since

More information

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

More information

Algorithmics on SLP-Compressed Strings: A Survey

Algorithmics on SLP-Compressed Strings: A Survey Algorithmics on SLP-Compressed Strings: A Survey Markus Lohrey Universität Leipzig, Institut für Informatik, Germany lohrey@informatik.uni-leipzig.de October 2, 2012 Abstract Results on algorithmic problems

More information

The degree, size and chromatic index of a uniform hypergraph

The degree, size and chromatic index of a uniform hypergraph The degree, size and chromatic index of a uniform hypergraph Noga Alon Jeong Han Kim Abstract Let H be a k-uniform hypergraph in which no two edges share more than t common vertices, and let D denote the

More information

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

A COOL AND PRACTICAL ALTERNATIVE TO TRADITIONAL HASH TABLES

A COOL AND PRACTICAL ALTERNATIVE TO TRADITIONAL HASH TABLES A COOL AND PRACTICAL ALTERNATIVE TO TRADITIONAL HASH TABLES ULFAR ERLINGSSON, MARK MANASSE, FRANK MCSHERRY MICROSOFT RESEARCH SILICON VALLEY MOUNTAIN VIEW, CALIFORNIA, USA ABSTRACT Recent advances in the

More information

School Timetabling in Theory and Practice

School Timetabling in Theory and Practice School Timetabling in Theory and Practice Irving van Heuven van Staereling VU University, Amsterdam Faculty of Sciences December 24, 2012 Preface At almost every secondary school and university, some

More information

Group Testing a tool of protecting Network Security

Group Testing a tool of protecting Network Security Group Testing a tool of protecting Network Security Hung-Lin Fu 傅 恆 霖 Department of Applied Mathematics, National Chiao Tung University, Hsin Chu, Taiwan Group testing (General Model) Consider a set N

More information

On an anti-ramsey type result

On an anti-ramsey type result On an anti-ramsey type result Noga Alon, Hanno Lefmann and Vojtĕch Rödl Abstract We consider anti-ramsey type results. For a given coloring of the k-element subsets of an n-element set X, where two k-element

More information

Factoring & Primality

Factoring & Primality Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

More information

Lecture 2: Universality

Lecture 2: Universality CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal

More information

How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl)

How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl) Subsets of Euclidean domains possessing a unique division algorithm Andrew D. Lewis 2009/03/16 Abstract Subsets of a Euclidean domain are characterised with the following objectives: (1) ensuring uniqueness

More information

root node level: internal node edge leaf node CS@VT Data Structures & Algorithms 2000-2009 McQuain

root node level: internal node edge leaf node CS@VT Data Structures & Algorithms 2000-2009 McQuain inary Trees 1 A binary tree is either empty, or it consists of a node called the root together with two binary trees called the left subtree and the right subtree of the root, which are disjoint from each

More information

Removing Local Extrema from Imprecise Terrains

Removing Local Extrema from Imprecise Terrains Removing Local Extrema from Imprecise Terrains Chris Gray Frank Kammer Maarten Löffler Rodrigo I. Silveira Abstract In this paper we consider imprecise terrains, that is, triangulated terrains with a vertical

More information

Longest Common Extensions via Fingerprinting

Longest Common Extensions via Fingerprinting Longest Common Extensions via Fingerprinting Philip Bille, Inge Li Gørtz, and Jesper Kristensen Technical University of Denmark, DTU Informatics, Copenhagen, Denmark Abstract. The longest common extension

More information

The program also provides supplemental modules on topics in geometry and probability and statistics.

The program also provides supplemental modules on topics in geometry and probability and statistics. Algebra 1 Course Overview Students develop algebraic fluency by learning the skills needed to solve equations and perform important manipulations with numbers, variables, equations, and inequalities. Students

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

The LCA Problem Revisited

The LCA Problem Revisited The LA Problem Revisited Michael A. Bender Martín Farach-olton SUNY Stony Brook Rutgers University May 16, 2000 Abstract We present a very simple algorithm for the Least ommon Ancestor problem. We thus

More information

9.2 Summation Notation

9.2 Summation Notation 9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a

More information

EXAM. Exam #3. Math 1430, Spring 2002. April 21, 2001 ANSWERS

EXAM. Exam #3. Math 1430, Spring 2002. April 21, 2001 ANSWERS EXAM Exam #3 Math 1430, Spring 2002 April 21, 2001 ANSWERS i 60 pts. Problem 1. A city has two newspapers, the Gazette and the Journal. In a survey of 1, 200 residents, 500 read the Journal, 700 read the

More information

Pigeonhole Principle Solutions

Pigeonhole Principle Solutions Pigeonhole Principle Solutions 1. Show that if we take n + 1 numbers from the set {1, 2,..., 2n}, then some pair of numbers will have no factors in common. Solution: Note that consecutive numbers (such

More information

Offline sorting buffers on Line

Offline sorting buffers on Line Offline sorting buffers on Line Rohit Khandekar 1 and Vinayaka Pandit 2 1 University of Waterloo, ON, Canada. email: rkhandekar@gmail.com 2 IBM India Research Lab, New Delhi. email: pvinayak@in.ibm.com

More information

Computing Primitively-Rooted Squares and Runs in Partial Words

Computing Primitively-Rooted Squares and Runs in Partial Words Computing Primitively-Rooted Squares and Runs in Partial Words F. Blanchet-Sadri 1, Jordan Nikkel 2, J.D. Quigley 3, and Xufan Zhang 4 1 Department of Computer Science, University of North Carolina, P.O.

More information

High degree graphs contain large-star factors

High degree graphs contain large-star factors High degree graphs contain large-star factors Dedicated to László Lovász, for his 60th birthday Noga Alon Nicholas Wormald Abstract We show that any finite simple graph with minimum degree d contains a

More information

Notes on Factoring. MA 206 Kurt Bryan

Notes on Factoring. MA 206 Kurt Bryan The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

More information

Diffuse Reflection Radius in a Simple Polygon

Diffuse Reflection Radius in a Simple Polygon Diffuse Reflection Radius in a Simple olygon Eli Fox-Epstein Csaba D. Tóth Andrew Winslow arxiv:1402.5303v3 [cs.cg] 17 May 2015 Abstract It is shown that every simple polygon in general position with n

More information

The Set Data Model CHAPTER 7. 7.1 What This Chapter Is About

The Set Data Model CHAPTER 7. 7.1 What This Chapter Is About CHAPTER 7 The Set Data Model The set is the most fundamental data model of mathematics. Every concept in mathematics, from trees to real numbers, is expressible as a special kind of set. In this book,

More information

Basics of Counting. The product rule. Product rule example. 22C:19, Chapter 6 Hantao Zhang. Sample question. Total is 18 * 325 = 5850

Basics of Counting. The product rule. Product rule example. 22C:19, Chapter 6 Hantao Zhang. Sample question. Total is 18 * 325 = 5850 Basics of Counting 22C:19, Chapter 6 Hantao Zhang 1 The product rule Also called the multiplication rule If there are n 1 ways to do task 1, and n 2 ways to do task 2 Then there are n 1 n 2 ways to do

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b

LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b LZ77 The original LZ77 algorithm works as follows: A phrase T j starting at a position i is encoded as a triple of the form distance, length, symbol. A triple d, l, s means that: T j = T [i...i + l] =

More information

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7 (67902) Topics in Theory and Complexity Nov 2, 2006 Lecturer: Irit Dinur Lecture 7 Scribe: Rani Lekach 1 Lecture overview This Lecture consists of two parts In the first part we will refresh the definition

More information

How Efficient can Memory Checking be?

How Efficient can Memory Checking be? How Efficient can Memory Checking be? Cynthia Dwork Moni Naor Guy N. Rothblum Vinod Vaikuntanathan Abstract We consider the problem of memory checking, where a user wants to maintain a large database on

More information

Labeling outerplanar graphs with maximum degree three

Labeling outerplanar graphs with maximum degree three Labeling outerplanar graphs with maximum degree three Xiangwen Li 1 and Sanming Zhou 2 1 Department of Mathematics Huazhong Normal University, Wuhan 430079, China 2 Department of Mathematics and Statistics

More information

Factoring Algorithms

Factoring Algorithms Factoring Algorithms The p 1 Method and Quadratic Sieve November 17, 2008 () Factoring Algorithms November 17, 2008 1 / 12 Fermat s factoring method Fermat made the observation that if n has two factors

More information

Efficient LDPC Code Based Secret Sharing Schemes and Private Data Storage in Cloud without Encryption

Efficient LDPC Code Based Secret Sharing Schemes and Private Data Storage in Cloud without Encryption Efficient LDPC Code Based Secret Sharing Schemes and Private Data Storage in Cloud without Encryption Yongge Wang Department of SIS, UNC Charlotte, USA yonwang@uncc.edu Abstract. LDPC codes, LT codes,

More information

Ph.D. Thesis. Judit Nagy-György. Supervisor: Péter Hajnal Associate Professor

Ph.D. Thesis. Judit Nagy-György. Supervisor: Péter Hajnal Associate Professor Online algorithms for combinatorial problems Ph.D. Thesis by Judit Nagy-György Supervisor: Péter Hajnal Associate Professor Doctoral School in Mathematics and Computer Science University of Szeged Bolyai

More information

Chapter Objectives. Chapter 9. Sequential Search. Search Algorithms. Search Algorithms. Binary Search

Chapter Objectives. Chapter 9. Sequential Search. Search Algorithms. Search Algorithms. Binary Search Chapter Objectives Chapter 9 Search Algorithms Data Structures Using C++ 1 Learn the various search algorithms Explore how to implement the sequential and binary search algorithms Discover how the sequential

More information

GREATEST COMMON DIVISOR

GREATEST COMMON DIVISOR DEFINITION: GREATEST COMMON DIVISOR The greatest common divisor (gcd) of a and b, denoted by (a, b), is the largest common divisor of integers a and b. THEOREM: If a and b are nonzero integers, then their

More information

DEFINABLE TYPES IN PRESBURGER ARITHMETIC

DEFINABLE TYPES IN PRESBURGER ARITHMETIC DEFINABLE TYPES IN PRESBURGER ARITHMETIC GABRIEL CONANT Abstract. We consider the first order theory of (Z, +,

More information

MATHEMATICAL ENGINEERING TECHNICAL REPORTS. A Parallel Tree Contraction Algorithm on Non-Binary Trees

MATHEMATICAL ENGINEERING TECHNICAL REPORTS. A Parallel Tree Contraction Algorithm on Non-Binary Trees MATHEMATICAL ENGINEERING TECHNICAL REPORTS A Parallel Tree Contraction Algorithm on Non-Binary Trees Akimasa MORIHATA and Kiminori MATSUZAKI METR 2008 27 June 2008 DEPARTMENT OF MATHEMATICAL INFORMATICS

More information

Recall that two vectors in are perpendicular or orthogonal provided that their dot

Recall that two vectors in are perpendicular or orthogonal provided that their dot Orthogonal Complements and Projections Recall that two vectors in are perpendicular or orthogonal provided that their dot product vanishes That is, if and only if Example 1 The vectors in are orthogonal

More information

Large induced subgraphs with all degrees odd

Large induced subgraphs with all degrees odd Large induced subgraphs with all degrees odd A.D. Scott Department of Pure Mathematics and Mathematical Statistics, University of Cambridge, England Abstract: We prove that every connected graph of order

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

Clique coloring B 1 -EPG graphs

Clique coloring B 1 -EPG graphs Clique coloring B 1 -EPG graphs Flavia Bonomo a,c, María Pía Mazzoleni b,c, and Maya Stein d a Departamento de Computación, FCEN-UBA, Buenos Aires, Argentina. b Departamento de Matemática, FCE-UNLP, La

More information

Improved Single and Multiple Approximate String Matching

Improved Single and Multiple Approximate String Matching Improved Single and Multiple Approximate String Matching Kimmo Fredriksson Department of Computer Science, University of Joensuu, Finland Gonzalo Navarro Department of Computer Science, University of Chile

More information

A Weighted-Sum Mixed Integer Program for Bi-Objective Dynamic Portfolio Optimization

A Weighted-Sum Mixed Integer Program for Bi-Objective Dynamic Portfolio Optimization AUTOMATYKA 2009 Tom 3 Zeszyt 2 Bartosz Sawik* A Weighted-Sum Mixed Integer Program for Bi-Objective Dynamic Portfolio Optimization. Introduction The optimal security selection is a classical portfolio

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL Oracle University Contact Us: 1.800.529.0165 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database technology.

More information