Question

Is this recursive function?

Given two functions T1(n) = 20n and T2(n) = n2 +10n200 and assuming integer n > 0,

what is the minimum value of n such that T1(n) < T2(n)?

1 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

Answer:

T1(n) = 20n
T2(n) = n2 + 10n - 200

T1(n) < T2(n)
20n < n2 + 10n - 200
n2 - 20n - 200 > 0

(x - 27.32)(x + 7.32) > 0

SO, x > 27.32 or x > -7.32

But, since x > 0,
The minimum value of x for T1(n) < T2(n) is 27


answered by: Zahidul Hossain
Add a comment
Know the answer?
Add Answer to:
Is this recursive function?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • 1. (10 points) Write an efficient iterative (i.e., loop-based) function Fibonnaci(n) that returns the nth Fibonnaci...

    1. (10 points) Write an efficient iterative (i.e., loop-based) function Fibonnaci(n) that returns the nth Fibonnaci number. By definition Fibonnaci(0) is 1, Fibonnaci(1) is 1, Fibonnaci(2) is 2, Fibonnaci(3) is 3, Fibonnaci(4) is 5, and so on. Your function may only use a constant amount of memory (i.e. no auxiliary array). Argue that the running time of the function is Θ(n), i.e. the function is linear in n. 2. (10 points) Order the following functions by growth rate: N, \N,...

  • Suppose that we have two algorithms A1 and A2 for solving the same problem. Let T1(n)...

    Suppose that we have two algorithms A1 and A2 for solving the same problem. Let T1(n) be the worst-case time complexity of A1 and T2(n) be the worst-case time complexity of A2. We know that: T(1)=1 T1(n)=15*T1(n/2)+n^2, n>1 T2(1)=1 T2(n)=80*T2(n/3)+20n^3,n>1 a. Use the master method to decide T1(n) b. Use the master method to decide T2(n) c. Which algorithms is more efficient? Why?

  • Review Part A The position of a particle as a function of time is given by...

    Review Part A The position of a particle as a function of time is given by T (6.4i 24 j)t2 m, where t is in seconds What is the particle's distance from the origin at t = 0 s? Express your answer as an integer and include the appropriate units. Value Units Submit Part B the origin at t1-29s What is the particle's distance from t Express your answer to two significant figures and include the appropriate units. Value Units...

  • 2. The table below holds MIPS assembly code fragments with different branch instructions LOOP addi $s2....

    2. The table below holds MIPS assembly code fragments with different branch instructions LOOP addi $s2. $s2. 2 subi $t1. st1. 1 bne t1. 0. LOOP DONE: LOOP: it st2. $0. stl beq t2. 0. DONE addi $s2. Ss2. 2 LOOP DONE: For the loops written in MIPS assembly in the above table, assume that the register Şt1 is initialized to the value of 10. What is the value in register $s2 assuming that $s2 initially has a value of...

  • Using a programming language of your choice, write a complete and fully functional program that uses...

    Using a programming language of your choice, write a complete and fully functional program that uses reference and pointer types to swap two integer numbers. The two numbers are read in separately by the program’s user. Use a proper prompt for each number read in. a. Use one function that uses formal parameter reference type to swap the two numbers b. Use another function that uses formal parameter pointer type to swap the two numbers. c. In the main or...

  • Design algorithms for the following functions and describe them in pseudocode. If you use auxiliary functions,...

    Design algorithms for the following functions and describe them in pseudocode. If you use auxiliary functions, describe them in pseudocode as well. Evaluate the runtime efficiency of your algorithms and express it in O( ) notation. a. Union(T1.root, T2.root): T1.root and T2.root point to the roots of two B-trees. The function returns a pointer to the root of a B-tree containing every key contained in T1 or T2. b. Intersection(T1.root, T2.root): T1.root and T2.root point to the roots of two...

  • A) The following code fragment takes as input a number in t1 and produces a value...

    A) The following code fragment takes as input a number in t1 and produces a value in register $s2. Assume that initially $s2 equals zero. Line Loop: addi $t2, $zero, 10 2 Loop2: addi$s2, $s2, 2 3 subi $t2, $t2, 1 4 bne $t2, $zero, Loop2 5 subi $t1,$t1, 1 6 bne $t1, $zero, Loop For each of the following problems, justify your answers and show your calculations clearly. Final answers without justifications are not accepted. What is the final...

  • 7. [4] (Big-O-Notation) What is the order of growth of the following functions in Big-o notation?...

    7. [4] (Big-O-Notation) What is the order of growth of the following functions in Big-o notation? a. f(N) = (N® + 100M2 + 10N + 50) b. f(N) = (10012 + 10N +50) /N2 c. f(N) = 10N + 50Nlog (N) d. f(N) = 50N2log (n)/N

  • What is the order of the following growth function? t(n)= 5 nlog n + 20n +20...

    What is the order of the following growth function? t(n)= 5 nlog n + 20n +20 O(log n) Oin log n) o O(n2) 0(1)

  • Exercise 11.3 Consider the following duopoly model. There are two firms sup- plying a market where...

    Exercise 11.3 Consider the following duopoly model. There are two firms sup- plying a market where demand is given by p(Q)- a-bQ. Firm i produces qi units of output and so the total level of production is q1q2. Both firms face the same constant marginal cost, so the cost of producing qi for firm i įs cqỉ. Thus the profit functions of firms 1 and 2 respectively, are given by: (a) Suppose that each firm takes the output of the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT