Finite arithmetic progressions in cyclic groups
Finite arithmetic progressions in cyclic groups
Here are two puzzles of my own invention concerning finite arithmetic progressions in cyclic (or monothetic) groups. An example this is a sequence of regularly scheduled meetings spread throughout multiple years (e.g. 10 meetings occuring once every 60 days). Both questions involve determining when it is possible to find a progression disjoint from a given set of points (e.g. holidays). One of these problems is in a "discrete" setting while the other one is in a "continuous" setting.
Problem 1
Let be a prime number and be a subset of size . Devise an algorithm to determine the number of arithmetic progressions of length in disjoint from , with time complexity .
Solution to Problem 1
For each , we find the number of arithmetic progressions disjoint from of length , with common difference , which we denote by . When , the number of constant arithmetic progressions disjoint from is simply .
Otherwise, note that multiplication by is an isomorphism of taking an arithmetic progression with common difference to a progression with common difference . It follows that , which is the number of contiguous subsets of length disjoint from . To calculate this, we write , where each is a representative in such that , and let be the smallest positive integer such that , taking indices modulo . Then
The time complexity of an algorithm following this procedure is , since there are remaining values of to iterate over, and for each value of , one must
- sort , requiring at most operations, and
- compute using the given sum, requiring operations.
A potential implementation of this algorithm in Python is the following:
def delta(a, b, q):
return q if a == b else (a - b + q) % q
def nu(k, q, S):
total = q - len(S)
if k > 1:
for d in range(1, q):
dS = sorted([d * s for s in S])
total += sum([max((delta(dS[(i + 1) % len(S)], dS[i], q) - k, 0)) for i in range(len(S))])
return total
Problem 2
For each Fibonacci number , determine whether or not there exists an arithmetic progression in of length and common difference (the golden ratio) disjoint from some open ball of radius .
Solution to Problem 2
The answer is no.
Let denote the th Fibonacci number, and be an arbitrary open ball of radius . We show that any arithmetic progression with length and common difference must intersect at some point.
Given such a progression , consider the progression given by . Since and are relatively prime, we have
It follows that we can cover the circle with intervals of length centered at each element, that is,
Hence, the center must lie in an interval . Note that the successive ratio of Fibonacci numbers approximates very well, in the sense that
Thus . Finally, by the triangle inequality, we must have
Hence . Therefore, any arithmetic progression of length with common difference must intersect at some point.