This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “GCD and LCM using Recursion – 2”.

1. Which of the following is an alias for LCM?

a) GCD

b) SCM

c) GCF

d) HCF

View Answer

Explanation: GCD (Greatest Common Divisor), GCF (Greatest Common Factor), HCF (Highest Common Factor) is not an alias for LCM while SCM means Smallest Common Multiple.

2. What is the LCM of 8 and 13?

a) 8

b) 12

c) 20

d) 104

View Answer

Explanation: 104 is the smallest positive integer that is divisible by both 8 and 12.

3. Which is the smallest number of 3 digits that is divisible by 2, 4, 8?

a) 100

b) 102

c) 116

d) 104

View Answer

Explanation: 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.

4. Which of the following is also known as LCM?

a) Lowest Common Divisor

b) Least Common Multiple

c) Lowest Common Measure

d) Highest Common Multiple

View Answer

Explanation: Least Common Multiple is also known as LCM or Lowest Common Multiple.

5. What is the LCM of two coprime numbers?

a) 1

b) 0

c) Addition of two coprime numbers

d) Multiplication of two coprime numbers

View Answer

Explanation: Coprime numbers have GCD 1. While LCM of coprime numbers is the product of those two coprime numbers.

6. In terms of Venn Diagram, which of the following expression gives LCM (Given A ꓵ B ≠ Ø)?

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

View Answer

Explanation: 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.

7. What is the LCM according to the given Venn Diagram?

a) 2

b) 3

c) 180

d) 6

View Answer

Explanation: 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.

8. What is the lcm (a, b)?

a) a + b

b) gcd (a-b, b) if a>b

c) lcm (b, a)

d) a – b

View Answer

Explanation: Since the LCM function is commutative, so lcm (a, b) = lcm (b, a).

9. What is the LCM of 48, 18, 6?

a) 12^{2}

b) 12*2

c) 3

d) 6

View Answer

Explanation: The LCM of 48, 18, 6 is 144 and 12

^{2}is 144.

10. Is 9 and 28 coprime number.

a) True

b) False

View Answer

Explanation: Coprime numbers have GCD 1 and LCM is the product of the two given terms. So 9 and 28 are coprime numbers.

11. What is the following expression, lcm (a, lcm (b, c) equal to?

a) lcm (a, b, c)

b) a*b*c

c) a + b + c

d) lcm (lcm (a, b), c)

View Answer

Explanation: Since LCM function follows associativity, hence lcm (a, lcm (b, c) is equal to lcm (lcm (a, b), c).

12. Is lcm an associative function.

a) True

b) False

View Answer

Explanation: The lcm function is an associative function as lcm (a, lcm (b, c) is equal to lcm (lcm (a, b), c).

13. Which is the correct term of the given relation, lcm (a, b) * gcd (a, b) =?

a) |a*b|

b) a + b

c) a – b

d) a / b

View Answer

Explanation: The lcm is closely related to gcd as lcm (a, b) * gcd (a, b) = |a*b|.

14. What is the following expression, lcm (a, gcd (a, b)) equal to?

a) a

b) b

c) a*b

d) a + b

View Answer

Explanation: Since the lcm function follows absorption laws so lcm (a, gcd (a, b)) equal to a.

15. Which algorithm is the most efficient numerical algorithm to obtain lcm?

a) Euler’s Algorithm

b) Euclid’s Algorithm

c) Chebyshev Function

d) Partial Division Algorithm

View Answer

Explanation: 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.

**Sanfoundry Global Education & Learning Series – Data Structures & Algorithms.**

To practice all areas of Data Structures & Algorithms, __here is complete set of 1000+ Multiple Choice Questions and Answers__.