The lowest Common Denominator or Least Common Denominator is the Least Common Multiple of the denominators of a set of fractions.
Common denominator : when the denominators of two or more fractions are the same.
Least Common denominator is the smallest of all common denominators.
Why do we need LCD ?
It simplifies addition, subtraction and comparing fraction.
Common Denominator can be simply evaluated by multiplying the denominators. In this case, 3 * 6 = 18
But that may not always be least common denominator, as in this case LCD = 6 and not 18. LCD is actually LCM of denominators.
LCD for fractions 5/12 and 7/15 is 60. We can write both fractions as 25/60 and 28/60 so that they can be added and subtracted easily. LCD for fractions 1/3 and 4/7 is 21.
Example Problem : Given two fractions, find their sum using least common dominator.
Input : 1/6 + 7/15 Output : 19/30 Explanation : LCM of 6 and 15 is 30. So, 5/30 + 14/30 = 19/30 Input : 1/3 + 1/6 Output : 3/6 Explanation : LCM of 3 and 6 is 6. So, 2/6 + 1/6 = 3/6
Note* These answers can be further simplified by Anomalous cancellation.
This article is contributed by Shubham Rana. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Largest proper fraction with sum of numerator and denominator equal to a given number
- Find ΔX which is added to numerator and denominator both of fraction (a/b) to convert it to another fraction (c/d)
- Number of triangles formed by joining vertices of n-sided polygon with two common sides and no common sides
- ML | Common Loss Functions
- Common divisors of N numbers
- Sum of common divisors of two numbers A and B
- Common Divisors of Two Numbers
- Common prime factors of two numbers
- C++ Program for Common Divisors of Two Numbers
- Count divisors of n that have at-least one digit common with n
- Divide the two given numbers by their common divisors
- Count of common subarrays in two different permutations of 1 to N
- Print the kth common factor of two numbers
- Maximum count of common divisors of A and B such that all are co-primes to one another
- Maximize partitions such that no two substrings have any common character
- Find if two given Quadratic equations have common roots or not
- Count common prime factors of two numbers
- Minimize length of Substrings containing at least one common Character
- Count common elements in two arrays containing multiples of N and M
- Longest arithmetic progression with the given common difference
Improved By : Sam007