6
$\begingroup$

Suppose $n_2$ denotes the binary representation of the integer number $n$. Let $X_2(n)=[1_22_2\ldots n_2]$,$n\geq3$, be a binary vector which is obtained by concatenating of binary representation of the numbers from $1$ to $n$. Also, let $X_2^m(n)$,$0\leq m\leq n-1$,denotes the cyclically $m$ shift of the entries of the vector $X_2(n)$. For example, we have $$X_2^0(n)=X_2(n)$$ $$X_2^1(n)=[n_21_22_2\ldots(n-1)_2]$$ $$X_2^2(n)=[(n-1)_2n_21_22_2\ldots(n-2)_2]$$ and so on.

For two binary vectors $X$ and $Y$ (with same length), suppose $|X\cap Y|$ denotes the number of ones common to both $X$ and $Y$.

The conjecture is:

Let $n\geq 3$ be a natural number. For all $m$ and $k$, we have $|X_2^m(n)\cap X_2^k(n)|\cong 0 \mod 2$ if and only if $n=2^s-1$, for some integer number $s$.

Note: I use $\lfloor \log_2n\rfloor +1$ bits for binary representation of each integer number from $1$ to $n$. So, fedja's example is as follows:

$X_2(3)=[011011]$, $X_2^1(3)=[110110]$ and $X_2^2(3)=[101101]$. We can see the claim is true.

The conjecture is tested for many integer numbers. I appreciate any helpful comments and answers.

$\textbf{Added later}(19/09/2017)-9:03:$ The other easy way to see the problem is as follows:

For the natural number $n\geq 3$, let $G$ be a graph with $n$ vertices such that the vertices of $G$ are labeled by numbers $1$ to $n$. Then we represent each vertex label in uniform binary form and we connect the vertex $i$ to the vertex $j$ with the edge weight equal to the number of ones common to both $i_2$ and $j_2$. Note that the resulting graph is complete and each edge has a weight between $0$ to $\lfloor \log_2n\rfloor$. See the below example:

Graph for $n=3$

By this representation, we have an equivalent graph theory problem. In this context we must show that the summation of the weights of edges of some special subgraphs are even or odd.

$\endgroup$
11
  • 1
    $\begingroup$ You mean that the set of $n$ such that for all $k$ and $m$ the "intersection" is even is exactly the set of $n$ of the form $2^s-1.$ $\endgroup$ Commented Dec 9, 2017 at 16:31
  • 1
    $\begingroup$ Take $n=3=2^2-1$. I have $X_2(3)=11011$, $X^1_2(3)=11110$. So it looks (to me) like the intersection has $3$ elements (1st,2nd, and 4th positions). Am I daltonic, or what? $\endgroup$
    – fedja
    Commented Dec 9, 2017 at 17:00
  • $\begingroup$ @AaronMeyerowitz: yes the claim is as you said. $\endgroup$
    – Shahrooz
    Commented Dec 9, 2017 at 17:32
  • $\begingroup$ @fedja: Please see the note that I added. I forgot to mention that I use the uniform representation, which explained in the question now. $\endgroup$
    – Shahrooz
    Commented Dec 9, 2017 at 17:34
  • 1
    $\begingroup$ I'm not that sure yet. It is easy to show that regular patterns enjoy nice properties due to their regularity (judging from the tone of your remarks, it looks like we both know the proof of that part now) , but to show that irregular ones do not enjoy those properties even accidentally is often much harder. At least I do not see it yet in this particular case :-) $\endgroup$
    – fedja
    Commented Dec 10, 2017 at 17:33

1 Answer 1

2
$\begingroup$

This is not a full answer, just the easy implication that if $n=2^{s}-1$ with $s\ge 2$, then, indeed, all overlaps are even.

We will think of our binary representations of length $s$ as written on the circle. We'll look at each digit sequence separately, so we get (starting with the right bit) $$ 1010101\dots101, \\ 01100110011\dots0011, \\ 000111100001111\dots00001111 $$ etc. Let's do elementary Fourier analysis on $\mathbb Z_n$. The $r$-th sequence $(r=0,\dots,s-1)$ has the Fourier coefficients (up to conjugation, which I'm too lazy to write at 11:15PM) $$ F_r(z)=\frac 1n z^{2^r-1}(1+z+z^2+\dots+z^{2^r-1})(1+z^{2^{r+1}}+z^{2\times 2^{r+1}}+\dots +z^{n+1-2^{r+1}}) \\ =\frac 1nz^{2^r-1}\frac{z^{2^r}-1}{z-1}\frac{z^{n+1}-1}{z^{2^{r+1}}-1} =\frac 1nz^{2^r-1}\frac 1{z^{2^r}+1} $$ for $z^n=1, z\ne 1$. $F(1)=\frac{n+1}{2n}$ regardless of $r$.

The cardinality of the intersection of the $r$-th sequence with the shift of itself by $m$ can be written as $$ n\sum_{z:z^n=1}|F_r(z)|^2z^m=n\sum_{z:z^n=1}\frac{z^m}{|z^{2^r}+1|^2} $$ (Plancherel) This looks pretty useless for determining the individual parities but it shows immediately ($z\mapsto z^{2^r}$ is just a rearrangement of the $n$th roots of unity) that the number of overlaps in the $r$-th position for $m$ is the same as the number of overlap in the $0$-th position for $m/2^r$ where the division is understood in the sense of $\mathbb Z_n$. Thus, instead of asking what happens for the individual $m\ne 0$ in all positions, we can ask what happens in the $0$-th position for $m,m/2,\dots, m/2^{s-1}$ ($m=0$ is a trivial case because the self-overlap in each position is $\frac{n+1}2=2^{s-1}$, which is even when $s>1$ and $n=2^1-1=1$ is, indeed, problematic).

Now we forget all high-tech and just keep this conclusion in mind. Of course, once we know it, we can show it in an elementary way too.

If $m\in\{1,\dots,n-1\}$, then we need to count the pairs of odd numbers in $\{1,2,\dots,n\}$ at distance either $m$ or $n-m$. But that is easy: if $m$ is even, they are $\frac{n+1-m}2=2^{s-1}-\frac m2\equiv \frac m2\mod 2$. Otherwise they are $\frac{m+1}2\equiv_2 \frac{m+1}2+2^{s-1}=\frac{m+n}2+1$.

Thus, if we consider the full cycle $m_r=m/2^r$ ($r=0,\dots,r-1$) in $\mathbb Z_n$ using the representatives $m_r\in\{1,\dots,n-1\}$ (some numbers may repeat, that's OK), then the parity of the number of overlaps in the $0$-th position for the shift by $m_r$ is the parity of $m_{r+1}=\frac{m_r}2$ if $m_r$ is even and of $1+m_{r+1}=1+\frac{m_r+n}2$ if $m_r$ is odd. This means that to get the parity of the full sum over the cycle, we should add the number of odd members of the cycle and the number of $+1$ corrections. But these two numbers are the same because the corrections are generated exactly by the odd members of the cycle, so the final result is always even.

This is quite simple and relatively clean. It is the other implication that seems to be a headache. Any bright ideas?

$\endgroup$
2
  • $\begingroup$ Thanks dear @fedja, your proof is nice. For the reverse one, I have no a general idea. Some cases can be checked by coding theory techniques if I have a closed formula for the number of ones in the vector $X_2(n)$, which we know there is not any hope. For example (for coding techniques) you can see page $275$ (and some other pages) of the book "Fundamentals of Error Correcting Codes". $\endgroup$
    – Shahrooz
    Commented Dec 13, 2017 at 10:52
  • $\begingroup$ @ShahroozJanbaz OK, I'll think of it a bit more. No promises though ;-) $\endgroup$
    – fedja
    Commented Dec 13, 2017 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .