Data Structures & Algorithms Multiple Choice Questions on “GCD and LCM using Recursion – 2”.
1. LCM is also called as ________ Answer: b 2. What is the LCM of 8 and 13? Answer: d 3. Which is the smallest number of 3 digits that is divisible by 2, 4, 8? 4. Which of the following is also known as LCM? 5. What is the LCM of two coprime numbers? Answer: d 6. In terms of Venn Diagram, which of the following expression gives LCM (Given A ꓵ B ≠ Ø)? 7. What is the LCM according to the given Venn Diagram? Answer: c 8. What is the lcm (a, b)? Answer: c 9. What is the LCM of 48, 18, 6? Answer: a 10. Is 9 and 28 coprime number. Answer: a 11. What is the following expression, lcm (a, lcm (b, c) equal to? Answer: d 12. Is lcm an associative function. Answer: a 13. Which is the correct term of the given relation, lcm (a, b) * gcd (a, b) =? Answer: a 14. What is the following expression, lcm (a, gcd (a, b)) equal to? 15. Which algorithm is the most efficient numerical algorithm to obtain lcm?
a) GCD
b) SCM
c) GCF
d) HCF
Clarification: GCD (Greatest Common Divisor), GCF (Greatest Common Factor), HCF (Highest Common Factor) is not an alias for LCM. LCM is also called as Smallest Common Multiple(SCM).
a) 8
b) 12
c) 20
d) 104
Clarification: 104 is the smallest positive integer that is divisible by both 8 and 12.
a) 100
b) 102
c) 116
d) 104
Answer: d
Clarification: LCM of 2, 4, 8 is 8. So check for the number that is divisible by 8. So 104 is the smallest number that is divisible by 2, 4, 8.
a) Lowest Common Divisor
b) Least Common Multiple
c) Lowest Common Measure
d) Highest Common Multiple
Answer: a
Clarification: Least Common Multiple is also known as LCM or Lowest Common Multiple.
a) 1
b) 0
c) Addition of two coprime numbers
d) Multiplication of two coprime numbers
Clarification: Coprime numbers have GCD 1. While LCM of coprime numbers is the product of those two coprime numbers.
a) Multiplication of A U B terms
b) Multiplication of A ꓵ B terms
c) Multiplication of A*B terms
d) Multiplication of A-B terms
Answer: a
Clarification: In terms of Venn Diagram, the LCM is given by the Union of two sets. So A U B gives the LCM. While A ꓵ B gives the GCD.
a) 2
b) 3
c) 180
d) 6
View Answer
Clarification: In terms of Venn Diagram, the LCM is given by the Union of two sets. So A U B gives the LCM. So product of all the terms is 180.
a) a + b
b) gcd (a-b, b) if a>b
c) lcm (b, a)
d) a – b
Clarification: Since the LCM function is commutative, so lcm (a, b) = lcm (b, a).
a) 122
b) 12*2
c) 3
d) 6
Clarification: The LCM of 48, 18, 6 is 144 and 122 is 144.
a) True
b) False
Clarification: Coprime numbers have GCD 1 and LCM is the product of the two given terms. So 9 and 28 are coprime numbers.
a) lcm (a, b, c)
b) a*b*c
c) a + b + c
d) lcm (lcm (a, b), c)
Clarification: Since LCM function follows associativity, hence lcm (a, lcm (b, c) is equal to lcm (lcm (a, b), c).
a) True
b) False
Clarification: The lcm function is an associative function as lcm (a, lcm (b, c) is equal to lcm (lcm (a, b), c).
a) |a*b|
b) a + b
c) a – b
d) a / b
Clarification: The lcm is closely related to gcd as lcm (a, b) * gcd (a, b) = |a*b|.
a) a
b) b
c) a*b
d) a + b
Answer: a
Clarification: Since the lcm function follows absorption laws so lcm (a, gcd (a, b)) equal to a.
a) Euler’s Algorithm
b) Euclid’s Algorithm
c) Chebyshev Function
d) Partial Division Algorithm
Answer: b
Clarification: The most efficient way of calculating the lcm of a given number is using Euclid’s algorithm which computes the lcm in much lesser time compared to other algorithms.