- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- What is the GCD of a and b?

Q. |
## What is the GCD of a and b? |

A. | a + b |

B. | gcd (a-b, b) if a>b |

C. | gcd (a+b, a-b) |

D. | a – b |

Answer» B. gcd (a-b, b) if a>b | |

Explanation: as per euclid’s algorithm, gcd (a, b) = gcd (a-b, b) if a > b or gcd (a, b) = gcd (a, b-a) if b > a. |

View all MCQs in:
Design and Analysis of Algorithms

- If GCD of two number is 8 and LCM is 144, then what is the second number if first number is 72?
- If gcd (a, b) is defined by the expression, d=a*p + b*q where d, p, q are positive integers and a, b is both not zero, then what is the expression called?
- Who gave the expression for the probability and expected value of gcd?
- What is the computational complexity of Binary GCD algorithm where a and b are integers?
- Which of the following is also known as GCD?
- In terms of Venn Diagram, which of the following expression gives GCD (Given A ꓵ B ≠ Ø)?
- What is the GCD according to the given Venn Diagram?
- What is the GCD of 48, 18, 0?
- Is gcd an associative function.
- What is the following expression, lcm (a, gcd (a, b)) equal to?

Login to Continue

It will take less than 2 minutes

Report MCQ