Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Mathematically show that if d(n) is O(f(n)) and e(n) is O(g(n)), then the product d(n)e(n) is O(f(n)g(n)) . Consider f(n) 3n2 +2n -1, mathematically
3. Mathematically show that if d(n) is O(f(n)) and e(n) is O(g(n)), then the product d(n)e(n) is O(f(n)g(n)) . Consider f(n) 3n2 +2n -1, mathematically show that f(n) is 0( ), (n2), and (n2) 5. For finding an item in a sorted array, consider "tertiary search" which is similar to binary search. It compares array elements at two locations and elminiates 2/3 of the array. To analyze the number of comparisons, the recur rence equations are T(n) -2+ T(n/3), T(2) -2, and T(1)-1, where n is the size of the array. Explain why the equations characterize "tertiary search" and solve for T(n) 6. To analyze the time complexity of the "brute-force" a gorithm in the programming part of this assignment, we possible multi-word would like to count the number of all hrases a) Explain the number of all possible phrases in terms of N (number of words in the input file) and L (length of a phrase; also known as palLength in the programming part) (b) Consider a computer that can process 1 billion phrases per second and N is 100, explain the num- ber of years needed to process all possible phrases of length (L) 10 (c) If we don't want the computer to spend more than 1 minute, explain the largest N the computer can process phrases of length (L) 10
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started