1. Given the following two functions: f(n) = 6n +4n +2 g(n)=5n +9 Use L'Hopital's rule...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Given the following two functions: f(n) = 6n +4n +2 g(n)=5n +9 Use L'Hopital's rule and limits to prove or disprove each of the following: (g) 8 (f) 2. Rank the following functions from lowest asymptotic order to highest. List any two or more that are of the same order on the same line. 2n +10n +5 3n log n 4n + 10 3n 2" n + 6n } 2 log n 2n+n +6 3. Draw the recursion tree when n = 12, where n represents the length of the array, for the following recursive method: 4n log4n int sumSquares (int[] array, int first, int last) { if (first == last) return array[first] * array [first]; int mid (first + last) / 2; return sumSquares (array, first, mid) + sumSquares (array, mid+ 1, last); Determine a formula that counts the numbers of nodes in the recursion tree. What is the Big-O for execution time? Determine a formula that expresses the height of the tree. What is the Big- for memory? Write an iterative solution for this same problem and compare its efficiency with this recursive solution. 4. Using the recursive method in problem 3 and assuming n is the length of the array. Modify the recursion tree from the previous problem to show the amount of work on each activation and the row sums. . Determine the initial conditions and recurrence equation. . Determine the critical exponent. Apply the Little Master Theorem to solve that equation. Explain whether this algorithm optimal. 1. Given the following two functions: f(n) = 6n +4n +2 g(n)=5n +9 Use L'Hopital's rule and limits to prove or disprove each of the following: (g) 8 (f) 2. Rank the following functions from lowest asymptotic order to highest. List any two or more that are of the same order on the same line. 2n +10n +5 3n log n 4n + 10 3n 2" n + 6n } 2 log n 2n+n +6 3. Draw the recursion tree when n = 12, where n represents the length of the array, for the following recursive method: 4n log4n int sumSquares (int[] array, int first, int last) { if (first == last) return array[first] * array [first]; int mid (first + last) / 2; return sumSquares (array, first, mid) + sumSquares (array, mid+ 1, last); Determine a formula that counts the numbers of nodes in the recursion tree. What is the Big-O for execution time? Determine a formula that expresses the height of the tree. What is the Big- for memory? Write an iterative solution for this same problem and compare its efficiency with this recursive solution. 4. Using the recursive method in problem 3 and assuming n is the length of the array. Modify the recursion tree from the previous problem to show the amount of work on each activation and the row sums. . Determine the initial conditions and recurrence equation. . Determine the critical exponent. Apply the Little Master Theorem to solve that equation. Explain whether this algorithm optimal.
Expert Answer:
Related Book For
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi
Posted Date:
Students also viewed these algorithms questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
In a Hopfield neural network configured as an associative memory, with all of its weights trained and fixed, what three possible behaviours may occur over time in configuration space as the net...
-
The owner of a moving company typically has his most experienced manager predict the total number of labor hours that will be required to complete an upcoming move. This approach has proved useful in...
-
On July 1, 2016, the Southwest Forging Corporation arranged for a line of credit with the First National Bank (FNB) of Dallas. The terms of the agreement call for a $100,000 maximum loan with...
-
A commercial bakery' has recorded sales (in dozens) for three products during the last 15 workdays: a. Plot the three time series variables to determine their pattern. b. Forecast workday 16 sales...
-
Chicagos OHare Airport handled 67 million passengers last year. As the busiest airport in the world, Atlantas Hartsfield Airport handled 89 million passengers last year. For each pair of values, use...
-
Denton Equipment Inc. furnishes you with the following list of accounts. Accounts Payable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 66,000 Accounts Receivable . . ....
-
In a highly diverse workplace, a manager notices that employees from different backgrounds tend to socialize and form cliques with others who share similar backgrounds. This has resulted in...
-
On January 1, 2018, Masterwear Industries issued $700,000 of 12% bonds, dated January 1. Interest of $42,000 is payable semiannually on June 30 and December 31. The bonds mature in three years. The...
-
What role does empathetic communication play in fostering mutual understanding and collaborative problem-solving during contentious disputes involving deeply entrenched ideological positions?
-
In what ways can technology be harnessed to facilitate communication and foster mutual understanding among conflicting parties in the digital age?
-
Find f(x + h) - f(x) h f(x)=x-11 for the given function.
-
Organizational Hierarchies. Some theorists believe that computer-mediated communication will eventually eliminate the hierarchical structure of organizations, largely because CMC encourages...
-
A circular space station spins about its axis to simulate gravity in the living quarters located along its periphery. What is the direction of acceleration of a person standing at the periphery?
-
You have met with your clients a few times and are now ready to do their retirement needs analysis (RNA). The couple, filing Married Filing Jointly (MFJ), are both 39 years of age and expect to work...
-
(8%) Problem 6: A student attaches a f= 3.5 kHz oscillator to one end of a metal rail of length L = 25 m. The student turns on the oscillator and uses a piezoelectric gauge at the other end to...
-
(a) Find x in (Ug, ) where x 1, x 7 but x = x-1. (b) Find x in (U16, ) where x 1, x 15 but x = x-1. (c) Let k Z+, k 3. Find x in (U2k, ) where x 1, x 2k - 1 but x = x-1.
-
(a) For n 2, let V denote the vertices in Qn. For 1 k n, define the relation R on V as follows: If w, x V, then w R x if w and x have the same bit (0, or 1) in position k and the same bit (0,...
-
(a) Let G = (V,E) be a loop-free connected graph with | V | 11. Prove that either G or its complement must be nonplanar. (b) The result in part (a) is actually true for | V | 9, but the proof for |...
-
Stadler Corporations federal income tax rate is 34 percent. It reports $100,000 depreciation expense on its financial statements and deducts $140,000 depreciation expense on its tax return. How...
-
Which of the following items is not deductible? a. Dues for club used solely for business meetings b. Directly related business entertainment c. Business gift of less than $25 in value d. Dues for...
-
Probest Corporation (a calendar-year corporation) purchased and placed the following assets in service during the year All assets are used 100 percent for business. $100,000 of the cost of the...
Study smarter with the SolutionInn App