Finding longest approximate periodic patterns

  • Authors:
  • Beat Gfeller

  • Affiliations:
  • IBM Research, Zurich, Switzerland

  • Venue:
  • WADS'11 Proceedings of the 12th international conference on Algorithms and data structures
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Motivated by the task of finding approximate periodic patterns in real-world data, we consider the following problem: Given a sequence S of n numbers in increasing order, and α ∈ [0, 1], find a longest subsequence Τ = s1, s2,..., sk of numbers si ∈ S, ordered as in S, under the condition that maxi=1,...,k-1{si+1-si}/ mini=1,...,k-1{si+1-si}, called the period ratio of Τ, is at most 1+α. We give an exact algorithm with run time O(n3) for this problem. This bound is too high for large inputs in practice. Therefore, we describe an algorithm which approximates the longest periodic pattern present in the input in the following sense: Given constants α and ε, the algorithm computes a subsequence with period ratio at most (1+α)(1+ε), whose length is greater or equal to the longest subsequence with period ratio at most (1+α). This latter algorithm has a much smaller run time of O(n1+γ), where γ 0 is an arbitrarily small positive constant. As a byproduct which may be of independent interest, we show that an approximate variant of the well-known 3SUM problem can also be solved in O(n1+γ + Tsort(n)) time, for any constant γ 0, where Tsort(n) is the time required to sort n numbers.