Can Linear Combinations of Primes Model Unique Solutions in Modular Arithmetic?

Click For Summary

Discussion Overview

The discussion revolves around the modeling of unique solutions in modular arithmetic using linear combinations of prime numbers. Participants explore the implications of the Chinese remainder theorem, the uniqueness of solutions based on prime coefficients, and the construction of primes as linear combinations of smaller primes. The scope includes theoretical considerations and potential applications in hash tables.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant proposes that for two primes \( p_1 \) and \( p_2 \), there exists a unique minimum pair of positive integers \( n_1 \) and \( n_2 \) such that \( x = p_1 n_1 + p_2 n_2 \mod{(p_1 p_2)} \).
  • Another participant mentions the Chinese remainder theorem and its application to map unique solution spaces for linear combinations of primes.
  • Concerns are raised about the redundancy in mappings when extending the discussion to three primes, particularly regarding the conditions under which unique values can be produced.
  • One participant questions whether every prime can be constructed as a linear combination of smaller primes, noting that this seems to hold true up to 17.
  • Another participant suggests that strong induction and Bertrand's postulate could be used to prove that every prime can indeed be constructed as a linear combination of smaller primes.
  • There is a discussion about the existence of coefficients \( a \) and \( b \) such that a linear combination of two distinct primes can equal 1, leading to the conclusion that all primes can be expressed as linear combinations of any two primes, although this may not hold if coefficients are restricted to positive integers.

Areas of Agreement / Disagreement

Participants express differing views on the uniqueness of solutions in modular arithmetic and the construction of primes as linear combinations of smaller primes. While some agree on the applicability of the Chinese remainder theorem, others raise questions about redundancy and the conditions necessary for unique mappings. The discussion remains unresolved regarding the broader implications of these findings.

Contextual Notes

Participants note limitations regarding the assumptions made about coefficients and the conditions under which unique solutions can be derived. There is also mention of the complexity introduced when considering moduli that are not pairwise prime.

John Creighto
Messages
487
Reaction score
2
Was thinking a bit about linear combination of primes and my conclusions are bellow. I presume their is some theorem to capture this but I don't know it's name.

If p1 p2 are primes and n1 or n2 are positive integers, then there should be unique a minimum n1 n2 pair such that:

x=p_1n_1+p_2n_2 \pmod{p_1p_2}

and all solutions should be of the form p_1n_1+p_2n_2 + m* p_1*p_2

Now If we introduce a third prime we know x satisfies:

x= a_1 \pmod{p_1}
x= a_2 \pmod{p_2}
x= a_3 \pmod{ p_3}

where:

a_1 = p_2n_2+p_3n_3 \pmod{p_1}
a_2 = p_1n_1+p_3n_3 \pmod{p_2}
a_3 = p_1n_1+p_2n_2 \pmod{p_3}

all solutions should be of the form: edit: part in quotes bellow needs to be fixed.

x+p1*n1
x+p2*n2
x+p3*n3

which are unique when x<p1p2p3

Now what happens if we wrap the space into something smaller then p1*p2*p3 as would be done in a hash table. Say, we wrap it into a power of two as is done in the java class hashmap.

Then I think this means

a1=a2=a3 \pmod{2^n}

because

we want x to have unique values in the range 0 to 2^n so

x= a_4 \pmod{2^n}
x= a_5 \pmod{2^n}
x= a_6 \pmod{ 2^n}

But the mod part of our equations is no longer pair wise prime and hence the solutions have to be equal with respect to modulo the greatest common divisor of the modulo part otherwise their is not a unique x. However, this looks quite difficult to satisfy so I think I might be missing something in terms of understanding.
 
Physics news on Phys.org
Chinese remainder theorem
 
adriank said:
Chinese remainder theorem

Odd. I thought I mentioned that theorem in my original post. Anyway, what I was trying to do is use that theorem to map the unique solution space of a linear combination of primes in terms of their coefficients, and then see what consequences this has in terms of hash tables. The result is pretty trivial when you consider only two primes as you can apply modulo operations and then use the Chinese remainder theorem to show the range for which the linear combination representation is unique.

However if you have three primes the Chinese remainder theorem tells us that each unique value of a_1 a_2 and a_3 in

x= a_1 \pmod{p_1}
x= a_2 \pmod{p_2}
x= a_3 \pmod{ p_3}

gives a unique value but we may not be able to produce all ordered pairs (a1 a2, a3) from a given (n1, n2,n3) because a1, a2 and a3 are defined as follows:

a_1 = p_2n_2+p_3n_3 \pmod{p_1}
a_2 = p_1n_1+p_3n_3 \pmod{p_2}
a_3 = p_1n_1+p_2n_2 \pmod{p_3}


Let's look at a simple example p1=2 p2=3 p3=5 and

2+3=5 so

Here is a redundant mapping from (n1, n2, n3) to (a1, a2,a3)
(1,1,0)->(1,2,0)
(0,0,1)->(1,2,0)

I'm not sure if their are any other redundant mappings if we restrict, n1<p1, n2<p2 and n3<p3. Perhaps if we insure p3 is greater then the product of p1p2 we avoid redundant mappings.
 
Here is another linear combination prime question. Can every prime be constructed as a linear combination of smaller primes. It seems to work up to 17. Haven't tried it any further where the coefficient must be a positive coefficient less then the prime for which it is multiplied by.
 
I was looking at the solution to the Chinese remainder theorem on wikipedia. It seems there is a linear independent basis for the number which are the solution to the chinease remainder theorem:

Again, to begin, the product N=n_1n_2\ldots n_k is defined. Then a solution ''x'' can be found as follows.

For each ''i''&nbsp;the integers n_i and N/n_i are coprime. Using the [[extended Euclidean algorithm]] we can find integers r_i and s_i such that r_in_i + s_iN/n_i = 1. Then, choosing the label e_i=s_iN/n_i, the above expression becomes:

r_i n_i + e_i = 1 \,\!

Although the basis vector e_i isn't a prime number and it isn't necessarily positive. It's still an interesting arthritic way to uniquely construct a set of numbers.
 
John Creighto said:
Here is another linear combination prime question. Can every prime be constructed as a linear combination of smaller primes. It seems to work up to 17. Haven't tried it any further where the coefficient must be a positive coefficient less then the prime for which it is multiplied by.

Yes. You can prove this with strong induction and Bertrand's postulate.
 
John Creighto said:
Here is another linear combination prime question. Can every prime be constructed as a linear combination of smaller primes. It seems to work up to 17. Haven't tried it any further where the coefficient must be a positive coefficient less then the prime for which it is multiplied by.

take any linear combination of primes p,q, (not equal) ap+qb equal to 1, we are guaranteed there exist such a,b. then just multiply through by any prime you want.

so, all primes (in fact integers) are a linear combination of any two primes.
 
daveyp225 said:
take any linear combination of primes p,q, (not equal) ap+qb equal to 1, we are guaranteed there exist such a,b. then just multiply through by any prime you want.

so, all primes (in fact integers) are a linear combination of any two primes.

Interesting technique. Of course this doesn't work if we restrict our coefficients to positive numbers.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 35 ·
2
Replies
35
Views
5K
  • · Replies 32 ·
2
Replies
32
Views
5K
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
5
Views
3K
  • · Replies 77 ·
3
Replies
77
Views
16K
  • · Replies 175 ·
6
Replies
175
Views
27K