An upper bound on the GCD of certain numbers derived from cyclic permutations of binary strings.

102 Views Asked by At

Let $s$ be any binary string of length $n$ with exactly $k$ ones and $n - k$ zeros. (In particular, I want to consider $n = \lceil k \log_2 3 \rceil$.) We will write $s_i = 1$ to denote that the character at index $i$ is a one and $s_i = 0$ for the similar statement.

For any cyclic permutation of $s$ and any index $1 \leq i \leq n$ such that $s_i = 1$, consider the following sum:

$\displaystyle \sum_{j=1}^n s_j \cdot 2^{|j-i|} \prod_{k=\min(i,j), k \neq i}^{\max(i,j)} 3^{s_k}$

Intuitively, fix a '1' in the string. Then, for each '1' in the string, add the term $2^{\mathrm{\#\ of\ characters\ between}} \cdot 3^{\mathrm{\# of\ ones\ between}}$, where we include one endpoint but not the other.

Problem: I'm looking for an upper bound for the greatest common divisor of all such numbers for an arbitrary binary string $s$ with precisely $k$ ones and of length $n = \lceil k \log_2 3 \rceil$, preferably $O(3^{k/(2+\varepsilon)} 2^{n/2})$ for some $\varepsilon > 0$.

Example: Consider the string '11110111000'. (Note that this string does not satisfy $n = \lceil k \log_2 3 \rceil$.) Using this permutation and $i = 1$, we have the sum

$S_1 = 1 + 2 \cdot 3 + 2^2 \cdot 3^2 + 2^3 \cdot 3^3 + 2^5 \cdot 3^4 + 2^6 \cdot 3^5 + 2^7 \cdot 3^6$

Using the same permutation and taking $i = 8$, we have the sum

$S_2 = 2^7 \cdot 3^6 + 2^6 \cdot 3^5 + 2^5 \cdot 3^4 + 2^4 \cdot 3^3 + 2^2 \cdot 3^2 + 2 \cdot 3 + 1$

Since the GCD of all such numbers must divide any linear combination of these numbers (over $\mathbb{Z}$), in particular, the GCD must divide $S_2 - S_1 = 2^4 \cdot 3^3 - 2^3 \cdot 3^3 = 216$, which is quite small. This smallness is due to the near symmetry in the substring '11110111'. Note that perfect symmetry would make the difference zero, giving no information about the GCD.

In a sense, this approach to the problem is asking how near (but not exactly) symmetric can we make a binary string when we are forced to have a certain number of ones and zeros asymptotically, which has a Ramsey flavor.

In the case with $n = \lceil k \log_2 3 \rceil$, my intuition tells me that the GCD should be fairly small and that a bound of the desired form should exist. Unfortunately, my intuition also tells me that this problem seems fairly hard, and I'm not sure where to begin. Any thoughts?

Edit: I forgot to mention the assumption that the string $s$ has $n$ unique cyclic permutations, i.e., that it's not simply a smaller string repeated some number of times.