A coworker posed this problem as "The Battleship Problem":
A battleship starts at some unknown initial location $i\in\mathbb{Z}_n$ and moves at a constant velocity $v$ each turn. Each turn $t$ you may drop a bomb on one predetermined location, and the ship is destroyed if it occupies that position (that is, if $x_t=tv+i\pmod n$). What is the fewest number of turns required to guarantee that you destroy the ship?
Trivially it can be done by dropping $n$ bombs on each location, because after $n$ turns the ship is always back where it started. It turns out that it can actually be done in $2n-1$ (or less) turns for all $n<35$ (this was discovered by brute-force search). Is this true for all $n$?
I can show that it is true for primes as follows:
- $x_t=0$ for $0\leq t<n$ (all $v\neq 0$ are generators of $\mathbb{Z}_n$).
- $x_t=t$ for $n\leq t<2n$ (all locations for $v=0$).
- The zero common to both parts can be eliminated for a total length of $2n-1$.
And similar logic shows that the same sequence works for prime powers.
I have not been able to come up with anything for odd composite numbers. What I'm hoping for is an algorithm to generate sequences given $n$, or keywords I can research to make progress on that.