Talk:Greatest common divisor

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Equation for finding gcd for more than 2 numbers, this is an example for 3 numbers[edit]

Consider to add the following equation, for finding gcd for more than two given numbers, the following example is for given 3 numbers.

— Preceding unsigned comment added by Eido95 (talkcontribs) 18:15, 10 November 2018 (UTC)[reply]
 DoneAnita5192 (talk) 18:33, 10 November 2018 (UTC)[reply]

Algorithms[edit]

Hi, I think the section on how to compute GCD ought to link to Lehmer's algorithm. The binary algorithm is great for numbers fitting in one or few computer words, but above that size up to bignums of several hundred digits, Lehmer's algorithm is usually preferable.

For asymptotically fast algorithms, O(M(n) log(n)), it would be nice to link to a description of how that works. I'm thinking of it as an divide-and-conquer extension of Lehmer's algorithm, but making that extension work is somewhat tricky. Now there are some links on the very long page on Euclid's algorithm, but that's not so easy to find from here. (Disclaimer: I'm author of one of those references, https://www.ams.org/journals/mcom/2008-77-261/S0025-5718-07-02017-0/home.html).

81.229.89.233 (talk) 08:00, 20 April 2019 (UTC)[reply]

Sure, a link to Lehmer's GCD algorithm should appear in the article (it appears only in the navbox at the bottom of the article.
I agree that the computational sections of this article and of Euclidean algorithm are messes, and would require a complete rewriting (minor results are too much emphasized, and major results such as the complexity O(M(n) log(n)) are lacking or unsourced). Probably, an article "Fast integer GCD computation" would be useful, with a summary and a {{main article}} template in both articles.
As you seem competent for these questions, I suggest that you start the work, and I am ready to help you (not really for finding sources). D.Lazard (talk) 09:07, 20 April 2019 (UTC)[reply]
I've now added section on Lehmer's algorithm. I agree a "Fast integer GCD computation" article, covering both state of
the art and history, would be great. But also a fair amount of work. 85.225.209.112 (talk) 09:26, 16 June 2019 (UTC)[reply]

"Greatest common denominator" listed at Redirects for discussion[edit]

An editor has asked for a discussion to address the redirect Greatest common denominator. Please participate in the redirect discussion if you wish to do so. D.Lazard (talk) 14:46, 31 March 2020 (UTC)[reply]

Adding new "other method"[edit]

Hello, there is another way of expressing the gcd of two natural numbers a and b.

I give a source. Some people claim it can´t be verified. But give a couple of sources.

Youtube-Video -> not accepted PDF -> not accepted Blogpost on a webpage -> not accepted

Other mathematical articles have also youtube sources. But they exist. — Preceding unsigned comment added by Scityscit (talkcontribs) 18:12, 18 March 2021 (UTC)[reply]

What do I have to do that my editing will be accpeted? Is it okay, if I put a "Proof"-Box in the article?

Or can I create a entry in "proofwiki"?

Best regards

--Scityscit (talk) 19:00, 18 March 2021 (UTC)[reply]
There are countless results about GCD. It would be pointless to include all of them. We rely on coverage by reliable sources to guide our editorial judgement about which ones to include in the article. If most treatments of GCD mention Pick's Theorem, then that's a good sign that we should include it here. As far as I can tell, that is not the case. Conversely, if only a few reliable sources mention them together, we probably shouldn't cover them together.
You should also be aware of WP's rules about constructive and collaborative editing. If there is a disagreement about the content of a page, you should discuss it on the Talk page, and not repeatedly re-insert your preferred version, especially when three different editors object. See Wikipedia:Edit warring... but apparently you're aware of WP:3RR, because you stopped after three reverts. --Macrakis (talk) 20:04, 18 March 2021 (UTC)[reply]

Name for a number's set of prime factors?[edit]

Isn't there a name for the set comprising a number's prime factors (e.g., the two sets shown in the Venn diagram of in the "Using prime factorizations" subsection)? I see nothing in the various prime/composite-related articles. BMJ-pdx (talk) 14:37, 26 July 2021 (UTC)[reply]

"The prime divisors of n" is a phrase that is commonly considered as convenient. Not all sets needs to be named, and using too much set theory leads to pedantry. Compare "p is a prime divisor of n" and "p is a member of the set of the prime divisors of n". Both sentences are correct, but the second one requires to know what is a set in mathematics, and what is a member of a set. Note that the concept of set is less than 150 years old, while the concept of prime divisor is more than 2000 years old. D.Lazard (talk) 15:12, 26 July 2021 (UTC)[reply]
My motivation came from how simple a definition of GCD could be with a simple name for such: "GCD is the product of the members of the intersection of ..." (much simpler still in symbolic form). Also, it could be used in a relatively simple proof that the square root of 2 (et. al) is irrational. Granted, all possible without a nice terse name. BMJ-pdx (talk) 15:48, 3 August 2021 (UTC)[reply]
"the two sets shown in the Venn diagram of in the "Using prime factorizations" subsection": This Venn diagramm does not show any set, but multisets, as there are repeated elements in them, which is not possible for sets. Another example that using set theory when it is not needed may be confusing. D.Lazard (talk) 16:10, 3 August 2021 (UTC)[reply]
I stand corrected. However, I don't share your apparent disdain of set theory :-) (As an aside, introduction to set theory was a feature of the "New Math" that started to be taught in the 1960's, and was musically satirized by mathematician Tom Lehrer.) BMJ-pdx (talk) 16:38, 3 August 2021 (UTC)[reply]

"Grootste gemene deler" listed at Redirects for discussion[edit]

An editor has identified a potential problem with the redirect Grootste gemene deler and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 February 13#Grootste gemene deler until a consensus is reached, and readers of this page are welcome to contribute to the discussion. ~~~~
User:1234qwer1234qwer4 (talk)
02:40, 13 February 2022 (UTC)[reply]

gcd(0,0)[edit]

I always thought , but anyway Properties 3 and 5 are conflicting.

3) gcd(a, 0) = |a|, for a ≠ 0, since any number is a divisor of 0, and the greatest divisor of a is |a|.[2][5] This is usually used as the base case in the Euclidean algorithm.

5) If m is a non-negative integer, then gcd(m⋅a, m⋅b) = m⋅gcd(a, b).

Darcourse (talk) 10:20, 21 February 2022 (UTC)[reply]

There is no conflict. However the second assertion supposes that gcd(0, 0) is defined as being 0. So, I have replaced "non-negative" by "positive" in the article. If gcd(0, 0) would be defined as 0, the second assertion could be left as it was, and "for a ≠ 0" could be removed from the first one.
Note that when gcd(0, 0) is defined, this is always as 0, as this is the only value that allows extending all properties to this case. D.Lazard (talk) 11:22, 21 February 2022 (UTC)[reply]

Euclid's algorithm principle[edit]

Let a and b be distinct natural numbers. Then gcd(a, b) =gcd(|a-b|, min(a, b)) 202.168.85.234 (talk) 05:04, 13 June 2022 (UTC)[reply]

Why not state the (extremely simple) formulas in generality?[edit]

The section Using prime factorizations begins with this:

" Greatest common divisors can be computed by determining the prime factorizations of the two numbers and comparing factors. For example, to compute gcd(48, 180), we find the prime factorizations 48 = 24 · 31 and 180 = 22 · 32 · 51; the GCD is then 2min(4,2) · 3min(1,2) · 5min(0,1) = 22 · 31 · 50 = 12 The corresponding LCM is then 2max(4,2) · 3max(1,2) · 5max(0,1) = 24 · 32 · 51 = 720."

But the formulas for GCD and LCM of two integers are very important in number theory.

There's nothing wrong with examples, but:

Why not just state the general formulas for GCD and LCM instead of solely giving examples???

I hope someone knowledgeable about this subject can fix this.

The the dismissive last sentence of this section:

"In practice, this method is only feasible for small numbers, as computing prime factorizations takes too long"

is wholly inappropriate since "practice" means entirely different things — especially in a case like this — to pure mathematicians as compared with applied mathematicians.

I hope someone knowledgeable about this subject can fix this, too. 2601:200:C082:2EA0:19F5:EB17:C336:8B35 (talk) 05:13, 18 March 2024 (UTC)[reply]