The Wayback Machine - https://web.archive.org/web/20240627104138/https://www.geeksforgeeks.org/euclids-lemma/
Open In App

Euclid’s lemma

Last Updated : 19 Nov, 2016
Improve
Improve
Like Article
Like
Save
Share
Report

We are given two numbers x and y. We know that a number p divides their product. Can we say for sure that p also divides one of them?

The answer is no. For example, consider x = 15, y = 6 and p = 9. p divides the product 15*6, but doesn’t divide any of them.

What if p is prime?
Euclid’s lemma states that if a prime p divides the product of two numbers (x*y), it must divide at least one of those numbers.

For example x = 15, y = 6 and p = 5. p divides the product 15*6, it also divides 15.

The idea is simple, since p is prime, it cannot be factorized. So it must either be completely present in x or in y.

Generalization of Euclid’s lemma:
If p divides x*y and p is relatively prime to x, then p must divide y. In the above example, 5 is relatively prime to 6, therefore it must divide 15.

Reference:
https://en.wikipedia.org/wiki/Euclid’s_lemma


Previous Article
Next Article

Similar Reads

Handshaking Lemma and Interesting Tree Properties
Introduction Trees are an important concept in graph theory, and understanding their properties is crucial in solving many graph-related problems. In this article, we will explore two important properties of trees - the Handshaking Lemma and interesting tree properties. What is Handshaking Lemma? Handshaking lemma is about an undirected graph. In e
5 min read
Orbit counting theorem or Burnside's Lemma
Burnside's Lemma is also sometimes known as orbit counting theorem. It is one of the results of group theory. It is used to count distinct objects with respect to symmetry. It basically gives us the formula to count the total number of combinations, where two objects that are symmetrical to each other with respect to rotation or reflection are coun
5 min read
Hensel's Lemma
Hensel's Lemma is a result that stipulates conditions for roots of polynomials modulo powers of primes to be "lifted" to roots modulo higher powers. The lifting method outlined in the proof is reminiscent of Newton's Method for solving equations. Say the equations of the below type is to be solved: [Tex](x^3 - a) mod \; p^k = 0 [/Tex] The idea is t
12 min read
Euclid Euler Theorem
According to Euclid Euler Theorem, a perfect number which is even, can be represented in the form [Tex](2^n - 1)*(2^n / 2) )) [/Tex]where n is a prime number and [Tex]2^n - 1 [/Tex]is a Mersenne prime number. It is a product of a power of 2 with a Mersenne prime number. This theorem establishes a connection between a Mersenne prime and an even perf
10 min read
Check whether the given number is Euclid Number or not
Given a positive integer n, the task is to check if it is Euclid Number or not. Print ‘YES’ if the given number is Euclid Number otherwise print ‘NO'. Euclid number : In Mathematics, Euclid numbers are integers of the form - [Tex]E_{n} = p_{n}\# + 1 [/Tex]where [Tex]p_{n}\# [/Tex]is product of first n prime numbers.The first few Euclid numbers are-
15 min read
Euclid–Mullin Sequence
Given an integer N, the task is to print the first N elements of the Euclid-Mullin Sequence. The Euclid-Mullin sequence is a sequence of prime numbers where each element is the least prime factor of one plus the product of all earlier elements. The sequence is named after the ancient Greek mathematician Euclid. Examples: Input: N = 14 Output: 2 3 7
6 min read
Euclid's Algorithm when % and / operations are costly
Euclid's algorithm is used to find GCD of two numbers. There are mainly two versions of algorithm. Version 1 (Using subtraction) C/C++ Code // Recursive function to return gcd of a and b int gcd(int a, int b) { if (a == b) return a; return (a > b) ? gcd(a - b, b) : gcd(a, b - a); } C/C++ Code // Recursive function to return gcd of a and b int gc
9 min read
Article Tags :
Practice Tags :
three90RightbarBannerImg