least common multiple
≈ 9 min read
Names in other languages
- Polskinajmniejsza wspólna wielokrotność
- eumultiplo komun txikien
- Englishleast common multiple
- 中文最小公倍数
- 简体中文最小公倍数
- 繁體中文最小公倍數
- 中文最小公倍數
- 中文最小公倍数
- 中文最小公倍數
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
showing the least common multiples of all subsets of {2, 3, 4, 5, 7} In mathematics, the least common multiple (LCM), lowest common multiple, or smallest common multiple (SCM) of two integers a and b, usually denoted by , is the smallest positive integer that is divisible by both a and b. Since division of integers by zero is undefined, this definition has meaning only if a and b are both different from zero. However, some authors define lcm(a, 0) as 0 for all a, since 0 is the only common multiple of a and 0. The least common multiple of the denominators of two fractions is the "lowest common denominator" (lcd), and can be used for adding, subtracting or comparing the fractions. The least common multiple of more than two integers a, b, c, . . . , usually denoted by , is defined as the smallest positive integer that is divisible by each of a, b, c, . . . The greatest common divisor is a related notion.
showing the least common multiples of all subsets of {2, 3, 4, 5, 7} In mathematics, the least common multiple (LCM), lowest common multiple, or smallest common multiple (SCM) of two integers a and b, usually denoted by , is the smallest positive integer that is divisible by both a and b. Since division of integers by zero is undefined, this definition has meaning only if a and b are both different from zero. However, some authors define lcm(a, 0) as 0 for all a, since 0 is the only common multiple of a and 0. The least common multiple of the denominators of two fractions is the "lowest common denominator" (lcd), and can be used for adding, subtracting or comparing the fractions. The least common multiple of more than two integers a, b, c, . . . , usually denoted by , is defined as the smallest positive integer that is divisible by each of a, b, c, . . . The greatest common divisor is a related notion. A multiple of a number is the product of that number and an integer. For example, 10 is a multiple of 5 because 5 × 2 = 10, so 10 is divisible by 5 and 2. Because 10 is the smallest positive integer that is divisible by both 5 and 2, it is the least common multiple of 5 and 2. By the same principle, 10 is the least common multiple of −5 and −2 as well. {2\over21}+{1\over6}={4\over42}+{7\over42}={11\over42} where the denominator 42 was used, because it is the least common multiple of 21 and 6. Suppose there are two meshing gears in a machine, having m and n teeth, respectively, and the gears are marked by a line segment drawn from the center of the first gear to the center of the second gear. When the gears begin rotating, the number of rotations the first gear must complete to realign the line segment can be calculated by using \operatorname{lcm}(m, n) . The first gear must complete \frac{\operatorname{lcm}(m, n)}{m} rotations for the realignment. By that time, the second gear will have made \frac{\operatorname{lcm}(m, n)}{n} rotations. Suppose there are three planets revolving around a star that take l, m, and n units of time, respectively, to complete their orbits. Assume that l, m, and n are integers. Assuming the planets started moving around the star after an initial linear alignment, all the planets attain a linear alignment again after \operatorname{lcm}(l, m, n) units of time. At this time, the first, second and third planet will have completed \frac{\operatorname{lcm}(l, m, n)}{l} , \frac{\operatorname{lcm}(l, m, n)}{m} and \frac{\operatorname{lcm}(l, m, n)}{n} orbits, respectively, around the star. \operatorname{lcm}(a,b)=\frac {\gcd(a,b)}. To avoid introducing integers that are larger than the result, it is convenient to use the equivalent formulas \operatorname{lcm}(a,b)=|a|\,\frac {\gcd(a,b)} = |b|\,\frac {\gcd(a,b)} , where the result of the division is always an integer. These formulas are also valid when exactly one of and is , since . However, if both and are , these formulas would cause division by zero; so, must be considered as a special case. To return to the example above, \operatorname{lcm}(21,6) =6\times\frac {21}{\gcd(21,6)} =6\times\frac {21} 3 =6\times 7 = 42. There are fast algorithms, such as the Euclidean algorithm for computing the gcd that do not require the numbers to be factored. For very large integers, there are even faster algorithms for the three involved operations (multiplication, gcd, and division); see Fast multiplication. As these algorithms are more efficient with factors of similar size, it is more efficient to divide the largest argument of the lcm by the gcd of the arguments, as in the example above. 90 = 2^1 \cdot 3^2 \cdot 5^1 = 2 \cdot 3 \cdot 3 \cdot 5. Here, the composite number 90 is made up of one atom of the prime number 2, two atoms of the prime number 3, and one atom of the prime number 5. This fact can be used to find the lcm of a set of numbers. Example: lcm(8,9,21) Factor each number and express it as a product of prime number powers. \begin{align} 8 & = 2^3 \\ 9 & = 3^2 \\ 21 & = 3^1 \cdot 7^1 \end{align} The lcm will be the product of multiplying the highest power of each prime number together. The highest power of the three prime numbers 2, 3, and 7 is 2 3 , 3 2 , and 7 1 , respectively. Thus, \operatorname{lcm}(8,9,21) = 2^3 \cdot 3^2 \cdot 7^1 = 8 \cdot 9 \cdot 7 = 504. This method is not as efficient as reducing to the greatest common divisor, since there is no known general efficient algorithm for integer factorization. The same method can also be illustrated with a Venn diagram as follows, with the prime factorization of each of the two numbers demonstrated in each circle and all factors they share in common in the intersection. The lcm then can be found by multiplying all of the prime numbers in the diagram. Here is an example: 48 = 2 × 2 × 2 × 2 × 3, 180 = 2 × 2 × 3 × 3 × 5, sharing two "2"s and a "3" in common: Least common multiple = 2 × 2 × 2 × 2 × 3 × 3 × 5 = 720 Greatest common divisor = 2 × 2 × 3 = 12 Product = 2 × 2 × 2 × 2 × 3 × 2 × 2 × 3 × 3 × 5 = 8640 This also works for the greatest common divisor (gcd), except that instead of multiplying all of the numbers in the Venn diagram, one multiplies only the prime factors that are in the intersection. Thus the gcd of 48 and 180 is 2 × 2 × 3 = 12. n = 2^{n_2} 3^{n_3} 5^{n_5} 7^{n_7} \cdots = \prod_p p^{n_p}, where the exponents n 2 , n 3 , ... are non-negative integers; for example, 84 = 2 2 3 1 5 0 7 1 11 0 13 0 ... Given two positive integers a = \prod_p p^{a_p} and b = \prod_p p^{b_p} , their greatest common divisor and least common multiple are given by the formulas \gcd(a,b) = \prod_p p^{\min(a_p, b_p)} and \operatorname{lcm}(a,b) = \prod_p p^{\max(a_p, b_p)}. Since \min(x,y) + \max(x,y) = x + y, this gives \gcd(a,b) \operatorname{lcm}(a,b) = ab. In fact, every rational number can be written uniquely as the product of primes, if negative exponents are allowed. When this is done, the above formulas remain valid. For example: \begin{align} 4 &= 2^2 3^0, & 6 &= 2^1 3^1, & \gcd(4, 6) &= 2^1 3^0 = 2, & \operatorname{lcm}(4,6) &= 2^2 3^1 = 12. \\[8pt] \tfrac{1}{3} &= 2^0 3^{-1} 5^0, & \tfrac{2}{5} &= 2^1 3^0 5^{-1}, & \gcd\left(\tfrac13, \tfrac{2}{5}\right) &= 2^0 3^{-1} 5^{-1} = \tfrac{1}{15}, & \operatorname{lcm}\left(\tfrac{1}{3}, \tfrac{2}{5}\right) &= 2^1 3^0 5^0 = 2, \\[8pt] \tfrac{1}{6} &= 2^{-1} 3^{-1}, & \tfrac{3}{4} &= 2^{-2} 3^1, & \gcd\left(\tfrac{1}{6}, \tfrac{3}{4}\right) &= 2^{-2} 3^{-1} = \tfrac{1}{12}, & \operatorname{lcm}\left(\tfrac{1}{6}, \tfrac{3}{4}\right) &= 2^{-1} 3^1 = \tfrac{3}{2}. \end{align} \operatorname{lcm}(a,\gcd(b,c)) = \gcd(\operatorname{lcm}(a,b),\operatorname{lcm}(a,c)), \gcd(a,\operatorname{lcm}(b,c)) = \operatorname{lcm}(\gcd(a,b),\gcd(a,c)). This identity is self-dual: \gcd(\operatorname{lcm}(a,b),\operatorname{lcm}(b,c),\operatorname{lcm}(a,c))=\operatorname{lcm}(\gcd(a,b),\gcd(b,c),\gcd(a,c)). |\{(x,y) \;:\; \operatorname{lcm}(x,y) = D\}| = 3^{\omega(D)}, where the absolute bars || denote the cardinality of a set. If none of a_1, a_2, \ldots , a_r is zero, then \operatorname{lcm}(a_1, a_2, \ldots , a_r) = \operatorname{lcm}(\operatorname{lcm}(a_1, a_2, \ldots , a_{r-1}), a_r).
Text derived from https://en.wikipedia.org/w/index.php?oldid=1377929597 under CC BY-SA 4.0; modifications have been made.