Enumerating Inclusion-Maximal Arithmetic Progressions

Abstract

We present a simple O( n2 N N + N ) enumeration algorithm for solving a problem from mathematical and computational music analysis where, given a strictly increasing integer sequence, S, with n entries and maximum value N, the task is to enumerate all m inclusion-maximal arithmetic progressions (IMAPs) in this sequence. An IMAP is a subsequence, S' ⊂eq S with k>2 integers, in which (i) the difference between any two consecutive integers is the same number, d (i.e., S' is an arithmetic progression), (ii) S' cannot be further extended to the left or to the right with any additional integers from S while still remaining an arithmetic progression (i.e., S' is a maximal arithmetic progression), and (iii) there is no other maximal arithmetic progression, S'' ⊂eq S, which properly contains S' (i.e., S' is an inclusion-maximal arithmetic progression). We further provide proofs for the expected number of IMAPs in random integer sequences, S, and a bound on their order of growth. Finally, we provide empirical experiments comparing both (a) the practical running time performance of the proposed algorithm against that of a previously known algorithm which has higher time complexity O(N2+o(1)n), and (b) the actual enumerated number of IMAPs to that of their mathematically expected number. Notably, the proposed algorithm demonstrates a significant improvement in running time over the previously known algorithm, and in immediate practical applications, will allow for more efficient analysis of large and rhythmically complex musical pieces.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…