1

Let numbers $n$ and $k$ such that $k \leq n$ be given.

Let $S$ be the set of prime numbers less than or equal to $k$.

We define a binary vector $v_{p, r}$ of length $n$ for each $p \in S$ and $r \in [p - 1] \cup \{0\}$ as follows.

For each $i \in [n-1] \cup \{0\}$:

  • $(v_{p, r})_i = 1$ if $i \equiv r \; mod \; p$
  • $(v_{p, r})_i = 0$ otherwise

Consider the set of all such binary vectors $X := \{ \; v_{p, r} \; | \; p \in S \text{ and } r \in [p - 1] \cup \{0\} \; \}$.

Question 1: Is $X$ linearly independent over $\mathbb{R}^{n}$? (No. See answer by @ChrisCulter)

Further, consider the vector space $V := span(X)$ such that $V$ is viewed as a subspace of $\mathbb{R}^{n}$.

I am trying to find bounds on $dim(V)$ in terms of $n$ and $k$. Any bounds would be greatly appreciated, but I am specifically trying to answer the following.

Question 2: What is the smallest $k$ (in terms of $n$) such that $dim(V) = n$? Can we always pick $k$ large enough to guarantee that $dim(V) = n$?


Update

Based on @GerryMyerson's suggestion, I coded up some examples in Octave.

When $n = 400$ and $k = 61$, we have $dim(V) = n = 400$.

This suggests that we might be able to find an upper bound on the smallest $k$ (relative to $n$) such that $dim(V) = n$.

Here is my Octave code in case anyone wants to give it a try:

% Parameters
n = 400
k = 61

% Prime numbers
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113];
primes = primes(find(primes <= k));

% Compute number of rows & cols
count = 0;
for p = primes
  count += p;
end
rows = count
cols = n

% Construct matrix
M = zeros(rows, cols);
count = 1;
for p = primes
  for r = 0:(p-1)
    for c = 1:cols
      if r == mod(c, p)
        M(count, c) = 1;
      end
    end
    count += 1;
  end
end

% Print rank
rankOfM = rank(M)
  • 4
    Have you computed any small examples, to get a feel for what's going on? – Gerry Myerson Sep 18 '19 at 04:44
  • @GerryMyerson This is a great suggestion! I tried to do it by hand, but the examples are fairly large. Maybe I could code something up in MATLAB. – Michael Wehar Sep 18 '19 at 04:50
  • Note: The question was modified several times until it got to its current form which most accurately captures what I'm looking for. Thank you! – Michael Wehar Sep 18 '19 at 05:34
  • 3
    It's not nice to change the question after someone has posted an answer. – Gerry Myerson Sep 18 '19 at 05:50
  • @GerryMyerson Thank you for the comment! My original post had some issues. I thought it was best to improve it, but it might have been better if I had posted a new question. The answer that was posted is valuable and still relevant. – Michael Wehar Sep 19 '19 at 21:58

4 Answers4

4

No, if $k>3$ then $V$ is not linearly independent (over any field). We can write the all-$1$s vector as two different linear combinations: $$\sum_r v_{2,r} = \sum_r v_{3,r}.$$ The same occurs if $X$ is any set containing at least two numbers.

Chris Culter
  • 26,806
1

For $n \ge 1$, let $k(n)$ denote the minimum value of $k$ for which the associated $V$ has $\dim(V) = n$.

Claim: For each $\epsilon > 0$, $k(n) \ge (1-\epsilon)\sqrt{n\log n}$ for all large $n$.

Proof: Less than $n$ vectors can't span an $n$-dimensional space, so we must have $n \le \sum_{p \le k} p \sim \frac{1}{2}\frac{k^2}{\log k}$. Clearly $k \le \sqrt{n}$ implies $\frac{1}{2}\frac{k^2}{\log k} \le n$. And if $k \in [\sqrt{n},(1-\epsilon)\sqrt{n\log n}]$, then $\frac{1}{2}\frac{k^2}{\log k} \le \frac{1}{2}\frac{(1-\epsilon)n\log n}{\log\sqrt{n}} = (1-\epsilon)n$. $\square$

.

Claim: For each $\epsilon > 0$, $k(n) \le (\frac{3}{4}+\epsilon)n$ for all large $n$. In particular, the answer to the second half of question 2 is "yes".

Proof: Out of pure laziness, I'll just prove $k(n) \le \frac{9n}{10}$ for all large $n$. The amount of effort to adapt the following to $(\frac{3}{4}+\epsilon)n$ is less than that to write this current sentence. By the prime number theorem, we may take some prime $p \in (\frac{9n}{10},n)$. Then, for $\frac{n}{10} \le r \le p-1$, $v_{p,r} = e_r$ (where $e_j = (0,\dots,0,1,0,\dots,0)$, the $1$ in index $j$). Take some $q \in (\frac{n}{2},\frac{8n}{10})$. Then, for $0 \le r \le \frac{n}{10}$, $v_{q,r} = e_r+e_{q+r}$, so $v_{q,r}+v_{p,q+r} = e_r$ (note $q+r < p$, so $v_{p,q+r}$ is valid). Finally, for $p \le r \le n-1$, $v_{q,r-q} = e_{r-q}+e_r$, so $v_{q,r-q}+v_{p,r-q} = e_r$. $\square$

.

Now some minor results and speculations.

Let $v_1 = (1,1,1,\dots,1)$ and $v_2,v_3,v_4,\dots = v_{2,1},v_{3,1},v_{3,2},v_{5,1},v_{5,2},v_{5,3},v_{5,4},v_{7,1}\dots,v_{7,6},v_{11,1}\dots$.

Conjecture: For $n \ge 4$, $v_1,\dots,v_n$ are linearly independent in $\mathbb{R}^n$.

This is the natural conjecture to make in light of the obvious dependence pointed out by Chris Cutler ($n=2,3$ are too small for silly reasons).

Unfortunately, this conjecture is false, and $n=11$ is the smallest counter-example. However, it appears from code to be nearly true. If the conjecture were true, then the minimum value of $k$ for which $\dim(V) = n$ is the minimum value of $k$ for which $1+ \sum_{p \le k} (p-1) \ge n$. By partial summation and the prime number theorem, one can see that $\sum_{p \le k} p \sim \frac{1}{2}\frac{k^2}{\log k}$, so the answer would be basically $k = \sqrt{n\log n}$. Since the conjecture seems to be nearly true, I would guess $k = \Theta(\sqrt{n\log n})$ is the answer to question 2.

mathworker21
  • 34,399
  • 1
    Thank you so much! I really liked how you laid everything out. Reading your answer, makes me feel like I better understand the problem. Also, I liked how you removed the remainder 0 case and I feel it's surprising how your conjecture fails, but it seems to be nearly correct. I feel like we should be able to prove your suggested upper bound and I am hopeful that we can. :) – Michael Wehar Sep 22 '19 at 09:10
  • 1
    @MichaelWehar very nice question! still trying to get anything $o(n)$ for an upper bound. see my updated answer. I'm feeling kind of sluggish for not getting a better upper bound. My mind just gets confused thinking about too many vectors. Let me know if you figure out anything. – mathworker21 Sep 22 '19 at 21:32
  • Thank you again for the follow-up! Showing that $k(n) < (3/4 + \varepsilon) n$ is important progress and I am very appreciative of this. I guess I am still hopeful that something about the period lengths being relatively prime to each other will help us to achieve a better upper bound, but maybe I am wrong. – Michael Wehar Sep 23 '19 at 02:36
  • I've been trying to prove a better upper bound via induction. No luck so far, but it feels like I'm close. – Michael Wehar Sep 23 '19 at 21:19
  • We still need to prove the upper bound, but I'm giving you the bounty for all of your help. :) – Michael Wehar Sep 26 '19 at 04:30
  • 1
    @MichaelWehar thanks! ill still think about it. feel free to ping me in the comments here in a few months – mathworker21 Sep 26 '19 at 09:39
  • I posted about the general (not just prime divisor) case on mathoverflow and @Ilya Bogdanov solved it! I think that the solution caries over to the prime case so that we get a bound close to what you proposed as a conjecture. :) – Michael Wehar Oct 08 '19 at 07:32
  • See here: https://mathoverflow.net/questions/343355/do-the-following-binary-vectors-span-mathbbrn/343374#343374 – Michael Wehar Oct 08 '19 at 07:33
  • 1
    @MichaelWehar thanks for telling me! I have to run right now, but it seems that Ilya's answer is seeming to say that the false conjecture in my answer is true. Am I mistaken? – mathworker21 Oct 08 '19 at 14:58
  • 1
    @MichaelWehar wait, Ilya says the answer is $\sqrt{n}$, but my answer shows the (trivial) lower bound of $\sqrt{n\log n}$. – mathworker21 Oct 08 '19 at 15:00
  • Ilya showed that across all divisors we get $\sqrt{n}$. However, across prime divisors we should get something like (maybe not exactly) $\sqrt{n \log(n)}$. This is because there are fewer primes. – Michael Wehar Oct 08 '19 at 16:53
  • I'll try to work it out at somepoint and let you know the exact bound. – Michael Wehar Oct 08 '19 at 16:54
  • Yes! I believe that your conjecture is true. :) – Michael Wehar Oct 09 '19 at 02:22
  • @MichaelWehar I said from code it is false. There is no debate, unless my code is somehow weirdly flawed... I'll check – mathworker21 Oct 09 '19 at 08:35
  • Sorry, I said "conjecture", but I meant to say that your "guess" for the bounds on $k(n)$ are correct! :) – Michael Wehar Oct 09 '19 at 17:01
  • @MichaelWehar i asked the following: does Ilya's answer say that my false conjecture is actually true? – mathworker21 Oct 09 '19 at 17:36
  • Sorry, every time that I said your "conjecture", I meant to say your "guess" for the bounds for $k(n)$. Your "guess" is true. Your "conjecture" is false. Ilya's answer just shows that your "guess" is true. It does not contradict your statements. His approach just shows that although they are linearly dependent, they are "close" to being linearly independent. – Michael Wehar Oct 09 '19 at 21:10
1

Suppose $\dim(V) < n$. Then there is some nonzero vector $x$ orthogonal to all the $v_{r,p}$'s, which it's easy to see implies $\sum_{j=1}^n x_j z^j$ has roots at $z = e^{2\pi i \frac{m}{p}}$ for each $p \le k$ and $0 \le m \le p-1$, so since $x$ is nonzero and $\sum_{j=1}^n x_jz^j$ is a degree $n$ polynomial, we must have $1+\sum_{p \le k} (p-1) \le n$.

mathworker21
  • 34,399
  • If I understand correctly, then by contrapositive we have the following. If $\sum_{p \le k} (p-1) \geq n$, then $dim(V) = n$. Also, just to be clear, the sum is only over primes $p$ less than or equal to $k$. – Michael Wehar Apr 26 '20 at 01:03
  • I'm still trying to understand this part: "It's easy to see that $\sum_{j=1}^n x_j z^j$ has roots at $z = e^{2\pi i \frac{m}{p}}$". It seems that somehow $x$ being orthogonal implies this. Any additional explanation is greatly appreciated! – Michael Wehar Apr 26 '20 at 01:07
  • By the way, wow, this is very concise. Thank you for the update. – Michael Wehar Apr 26 '20 at 01:08
  • 1
    @MichaelWehar In response to your first comment, yup! In response to your second comment, separate the sum based on the residue of $j$ mod $p$: $\sum_{j=1}^n x_je(\frac{mj}{p}) = \sum_{i=0}^{p-1} e(\frac{mi}{p})\sum_{j=1 \ j \equiv i \text{ mod p}}^n x_j = \sum_{i=0}^{p-1} e(\frac{mi}{p}) (x\cdot v_{i,p})$ – mathworker21 Apr 26 '20 at 05:15
  • Thank you for the follow-up. It helped a lot! I think I get it now. The answer could use a little bit more explanation, but this is really neat. :) – Michael Wehar Apr 27 '20 at 10:23
  • And, just so that I understand correctly, this approach should work for the other question too? (I mean, the question on MathOverflow.) – Michael Wehar Apr 27 '20 at 10:28
  • 1
    @MichaelWehar thanks :) what else needs explanation? and yea – mathworker21 Apr 27 '20 at 10:29
  • 1
    I could be mistaken, but I think it should be $\sum_{j=1}^n x_jz^j$ has degree $d \leq n$, we must have $1+\sum_{p \le k} (p-1) \le d$. Therefore, $1+\sum_{p \le k} (p-1) \le n$. – Michael Wehar Apr 27 '20 at 10:37
  • 1
    @MichaelWehar ok, sure – mathworker21 Apr 27 '20 at 10:48
  • It seems that your comment disappeared on mathoverflow. Is this the paper that your were referring to? https://arxiv.org/abs/2007.12097 – Michael Wehar Jul 26 '20 at 23:43
  • Thank you again for the update! :) – Michael Wehar Jul 26 '20 at 23:43
0

We can use the same approach as was presented by @Ilya Bogdanov here: https://mathoverflow.net/questions/343355/do-the-following-binary-vectors-span-mathbbrn

Following the same format, we get a polynomial $$P_k(x) = \prod_{\substack{ p \, \in \, \mathtt{PRIMES \hspace{0.08em} \cup \hspace{0.08em} \{1\}}\\ p \leq k }} \Phi_p(x).$$

Therefore, the degree of $P_k$ is equal to $$1 + \sum_{\substack{ p \, \in \, \mathtt{PRIMES}\\ p \leq k }} (p - 1).$$

Further, we get that the degree of $P_k \sim \frac{k^2}{2 \log k}$ by applying results from: What is the sum of the prime numbers up to a prime number $n$?

We have that $dim(V) = n$ precisely when degree of $P_k \geq n$.

Therefore, $k(n) = \Theta(\sqrt{n \log n})$ as conjectured by @mathworker21.

Thank you very much @Ilya Bogdanov and @mathworker21!

  • 1
    Note that $\deg\Phi_p=p-1$. Not that it matters much... – Ilya Bogdanov Oct 09 '19 at 04:59
  • @IlyaBogdanov Great catch! You're totally right. I will fix it now. Thank you. :) – Michael Wehar Oct 09 '19 at 07:06
  • 1
    @MichaelWehar Hi. I'm just getting to this now. I don't understand Ilya's solution on MO. First of all, what does he/she mean by "linear recurrence"? – mathworker21 Nov 03 '19 at 23:32
  • @mathworker21 Thank you for the follow-up! By linear recurrence, we mean a recurrence relation like this: $r_n = \Sigma_{i \in [k]} ; c_i \cdot r_{n - i}$. The characteristic polynomial of this recurrence is: $x^k - \Sigma_{i \in [k]} ; c_i \cdot x^{k - i}$. – Michael Wehar Nov 03 '19 at 23:57
  • Notice, when I say linear recurrence, I am excluding the initial conditions. – Michael Wehar Nov 04 '19 at 00:00
  • Also, with these kinds of recurrences, the set of functions (or infinite sequences) that solve the recurrences (for some initial conditions) have a nice form that is related to the roots of the characteristic polynomial. – Michael Wehar Nov 04 '19 at 00:01
  • An important property of these linear recurrences can be proven. I made a typo and wrote linear congruence by mistake in the comment, but here it is: https://mathoverflow.net/questions/343355/do-the-following-binary-vectors-span-mathbbrn#comment858460_343374 – Michael Wehar Nov 04 '19 at 00:03
  • @mathworker21 These comments should hopefully provide some helpful background information. Originally, after seeing Ilya's post, it took me a few days of background reading on linear recurrences and cyclotomic polynomials to work out the proof details for myself. – Michael Wehar Nov 04 '19 at 00:05
  • 1
    @MichaelWehar Thanks for your response! Do you want to just post a complete answer here (on your answer)? It will (1) be a good review for you and (2) save me and others much time – mathworker21 Nov 04 '19 at 00:31
  • 1
    @mathworker21 Yes, I would like to do this, but first I need to find better sources on linear recurrences and cyclotomic polynomials so that I have something I can reference. – Michael Wehar Nov 04 '19 at 00:42
  • 1
    @MichaelWehar I'd be very appreciative, as this is an interesting solution. – mathworker21 Nov 04 '19 at 00:44
  • 1
    @MichaelWehar ha! this is such a small world. I just encountered these vectors $v_{p,r}$ in my research now. May I ask where you got these from? Also, as I have a concrete use now, I would especially appreciate if you could take the time to provide the references and/or a complete answer to the question, but, of course, I don't want to rush you. – mathworker21 Nov 30 '19 at 19:50
  • @mathworker21 Awesome!! This problem came up for me while looking at the separating words problem: https://en.wikipedia.org/wiki/Separating_words_problem – Michael Wehar Dec 02 '19 at 06:11
  • @mathworker21 I hope to come back to this over winter break and provide a more complete answer. :) – Michael Wehar Dec 02 '19 at 06:11
  • @mathworker21 I'm excited to hear more about how this problem came up for you too! – Michael Wehar Dec 02 '19 at 06:12
  • @mathworker21 I haven't yet had a chance to do this, but it's still on my mental todo list. :) – Michael Wehar Jan 15 '20 at 05:57
  • @MichaelWehar This answer is not complete, and you do not understand it. I provided a complete, self-contained answer. – mathworker21 Apr 25 '20 at 13:58
  • @mathworker21 Thank you for the follow-up answer. I think my answer above is a good starting point and as always, it was my hope that it could be made more elegant and improved over time. As far as I can tell, I don't think there is any major issue with it, but it seems that you have an objection to it. – Michael Wehar Apr 26 '20 at 01:13
  • 1
    @MichaelWehar I was just annoyed with the current situation is all. You accepted an answer that could not be explained, and there is a confusing proof on mathoverflow. Usually in such situations, questions are left unanswered so that someone can come along and (fully) answer them. But, I'm happy we've been talking and figuring things out :) Btw, are you working on the separating words problem? – mathworker21 Apr 26 '20 at 05:19
  • @mathworker21 Sorry, I thought it was essentially the same as Ilya's approach, but the polynomial comes out to having a different degree. Once I confirm your answer, I will make that the accepted solution instead since it's more self-contained and elegant. I'm actually very happy that there are multiple approaches. I think this is great! Improvement and multiple approaches is a good thing in my book. :) – Michael Wehar Apr 27 '20 at 09:00
  • 1
    @MichaelWehar It is the same as Ilya's approach, but we currently cannot completely explain it (though I'm reading your comments over there now) – mathworker21 Apr 27 '20 at 09:01
  • @mathworker21 I was working on the separating words problem. I had an approach based on this that proves there is always a separating string of length $O(\sqrt{n} \cdot polylog(n))$. This is not as good as the known upper bounds, but I was thrilled to have a new approach that is $o(n)$. – Michael Wehar Apr 27 '20 at 09:04
  • 1
    @MichaelWehar i think that bound from this method is very well-known. E.g. "Separating Words by Occurrences of Subwords" by Vyalyi and Gimadeev, but it's cool you also discovered it – mathworker21 Apr 27 '20 at 09:06
  • @mathworker21 This is great! I have never seen this paper, but yes, it is very similar to what I was doing. Awesome! Thank you so much for sharing. :) – Michael Wehar Apr 27 '20 at 09:38