Understanding the Results of gcd(x,n)

In summary: If the ##q## does not divide the ##c##, then ##\gcd(cp,pq) = p##, I would argue that the ##p## is the greatest common factor (in the expression of the gcd()). Is stat okay?Yes.Thank you @PeroK .
  • #1
Peter_Newman
155
11
Hello,

I read something about to which I have a small question of understanding. Before I would like to outline it a little. So we have the primes ##p## and ##q## and we know ##p|x## and ##n = p\cdot q## furthermore it follows that ##p|n## also holds.

Now it was said that if ##p|x##, then ##\gcd(x,n)## is either ##n## or ##p##. Why is this so? I had a few thoughts that I would like to share here.

Consideration 1:
From ##p|x## it follows that there is a ##c## such that ##c \cdot p = x##, I simply put this into the ##\gcd(x,n)## and rewrite this a bit, I get ##\gcd(c\cdot p, p\cdot q)##. This is exactly ##n## if the ##c=q##, because ##c## cannot divide either the ##q## or the ##p##. (gcd of two equal numbers, is that number)

Consideration 2:
I again use the approach as before, ##\gcd(c\cdot p, p\cdot q)##. So this is ##p## exactly when ##c \neq q##, because then the only (common) divisor can be the ##q##.

I would be interested to know if the reasoning is correct.
 
Physics news on Phys.org
  • #2
If ##n = pq## then the only divisors of ##n## are ##1,p, q, pq##.

Then the two cases are whether ##q## divides ##x## or not.

It's not a case of ##c =q##, it's a case of whether ##q## divides ##c##.
 
  • Like
Likes Peter_Newman
  • #3
Hello @PeroK , can you explain this a little further? From there, it is not really clear to me, how one then comes to the assertion "if ##p|x##, then ##gcd(x,n)## is either ##n## or ##p##".
 
  • #4
Peter_Newman said:
Hello @PeroK , can you explain this a little further? From there, it is not really clear to me, how one then comes to the assertion "if ##p|x##, then ##gcd(x,n)## is either ##n## or ##p##".
I left that bit for you to do. Look at the two cases I mentioned.
 
  • #5
OK, then I would get started:

If the ##q## does not divide the ##c##, then ##\gcd(cp,pq)=p##, I would argue that the ##p## is the greatest common factor (in the expression of the gcd()). Is stat okay?
 
  • #6
Peter_Newman said:
OK, then I would get started:

If the ##q## does not divide the ##c##, then ##\gcd(cp,pq)=p##, I would argue that the ##p## is the greatest common factor (in the expression of the gcd()). Is stat okay?
Yes.
 
  • Like
Likes Peter_Newman
  • #7
Thank you @PeroK .

I have to admit, however, that the other part of proving "feels" kind of weird.

If the ##q## divides the ##c##, then surely the ##\gcd(cp,pq) = q##, but that can't be? Surely it should be shown that then the ##n## results?!
 
  • #8
Peter_Newman said:
Thank you @PeroK .

I have to admit, however, that the other part of proving "feels" kind of weird.

If the ##q## divides the ##c##, then surely the ##\gcd(cp,pq) = q##, but that can't be? Surely it should be shown that then the ##n## results?!
You're looking for the greatest common divisor. And ##pq > q##.

Try ##c = qd## if you are still unsure.
 
  • Like
Likes Peter_Newman
  • #9
Oh, now I see what you mean! Yes, of course that is absolutely right! If the ##q## divides the ##c## that means exactly ##k\cdot q = c##... Insert and one sees the "magic". Many thanks @PeroK !
 
  • Like
Likes PeroK

FAQ: Understanding the Results of gcd(x,n)

What is the purpose of using cases for results of gcd(x,n)?

The purpose of using cases for results of gcd(x,n) is to determine the greatest common divisor (gcd) of two integers, x and n. This is a useful mathematical concept that can be applied in various fields, such as cryptography and computer science.

How do you determine the gcd using cases?

The gcd of two integers, x and n, can be determined using cases by considering all possible combinations of factors of x and n. This involves breaking down both numbers into their prime factors and finding the common factors between them.

What are the possible cases for the results of gcd(x,n)?

The possible cases for the results of gcd(x,n) are:
1) If x and n are both even, the gcd will be the largest power of 2 that divides both numbers.
2) If one of the numbers, say x, is even and the other, n, is odd, the gcd will be 1 as there are no common factors between an even and an odd number.
3) If both numbers are odd, the gcd will be the largest common factor between them.
4) If one of the numbers is 0, the gcd will be the other number.
5) If both numbers are 0, the gcd is undefined.

Why is it important to use cases for results of gcd(x,n)?

Using cases for results of gcd(x,n) is important because it allows us to systematically determine the gcd of two numbers, regardless of their size or complexity. It also helps us to understand the concept of gcd better and apply it in different scenarios.

Can cases for results of gcd(x,n) be applied to more than two numbers?

Yes, cases for results of gcd(x,n) can be applied to more than two numbers. The same principles and cases can be used to determine the gcd of three or more numbers by considering all possible combinations of factors among them.

Similar threads

Back
Top