SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 23 Oct 2017 My Price 10.00

Determine the initial conditions and recurrence equation.

Need help with the following 2 questions:

 

3. Draw the recursion tree when = 8, where represents the length of the array, for the following recursive method:

   int sum(int[] array, int first, int last){
       if (first == last)
         return array[first];
       int mid = (first + last) / 2;
       
       return sum(array, first, mid) + sum(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-O for memory?

 

4. Using the recursive method in problem 3 and assuming 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.

Attachments:

Answers

(5)
Status NEW Posted 23 Oct 2017 07:10 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)