aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
Multiple choice

Let m and n be the integers and A(m,n) be a recursively defined function A(m,n)= 5
if m<n = A(m-n, n+2) if m ≥ n What is the value of A (2, 7)?

  1. 2

  2. 7

  3. 5

  4. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A(2, 7): 2 < 7, so the result is 5 by the base case definition.

Keep practicing — related questions

  • Let Gcd (m,n) be a recursively defined function as given below Gcd (n,m) m<n Gcd (m,n) = m n=0 Gcd(n,m%n) o...
  • Let n be the integer and L(n) be a function defined as L(n) = 0 if n = 1 L(én/2ù) + 2 if n>1 What is the va...
  • Which of the following statements is/are true? A. The dihedral angle between the H-atoms in staggered confo...
  • Which three are methods of the Object class? 1. notify(); 2. notifyAll(); 3. isInterrupted(); 4. synchroniz...
  • Which among the following are glucogenic intermediates? 1. Pyruvate 2. α-ketoglutarate 3. Succinyl-CoA 4. F...
  • A, B and C were partners sharing profits in the ratio 5 : 4 : 1. 'A' retired and new ratio was decided as 3...
  • A Go-Back-N ARQ uses a window of size 7. How many bits are needed to define the sequence number?
  • The value of expression 5n - 2, when n= -2 is
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy