Hello!
Suppose that the two numbers are both >=2 (if one of the numbers is 1, the problem is trivial). Then both have its unique decomposition into prime factors. If we find this decomposition, which is not simple for large numbers, then LCM must contain the maximum degrees of all prime factors from both numbers.
Consider an example. Let a = 126, b = 108. Then a = 2^1*3^2*7, b = 2^2*3^3. The maximum degrees are 2 for 2, 3 for 3 and 1 for 7. Hence LCM(a,b) = 2^2*3^3*7 =756.
Another method is to find the greatest common divisor (for example, using Euclidean algorithm) and use the fact that a*b = LCM(a,b)*GCD(a,b).
Wednesday, January 31, 2018
How do you find the least common multiple between two numbers?
Subscribe to:
Post Comments (Atom)
Why is the fact that the Americans are helping the Russians important?
In the late author Tom Clancy’s first novel, The Hunt for Red October, the assistance rendered to the Russians by the United States is impor...
-
There are a plethora of rules that Jonas and the other citizens must follow. Again, page numbers will vary given the edition of the book tha...
-
The only example of simile in "The Lottery"—and a particularly weak one at that—is when Mrs. Hutchinson taps Mrs. Delacroix on the...
-
A good thesis statement presents a claim (an interpretive stance on a story that can be defended using textual evidence) and is a position w...
-
The given two points of the exponential function are (2,24) and (3,144). To determine the exponential function y=ab^x plug-in the given x an...
-
What does the hot air balloon symbolize? To the Assad son who buys the hot air balloon, it symbolizes a kind of whimsy that he can afford. B...
-
The play Duchess of Malfi is named after the character and real life historical tragic figure of Duchess of Malfi who was the regent of the ...
-
Allie’s baseball mitt is extremely important to Holden in The Catcher in the Rye. It is a symbol of Allie since it was important to his brot...
No comments:
Post a Comment