algoritms

enivxnagv1615
timer Asked: Apr 22nd, 2014

Question Description

daa-2.pdf 

Unformatted Attachment Preview

CSE 630 Homework 2 1. Use our shell diagram to classify the following functions in relation to each other. n! (n + 1)! 2n 2n+1 22n nn √ n n nlogn 2. Define a recurrence relation WITH BOUNDARY CONDITIONS which satisfies the number of STATEMENTS executed by the following procedure. Find a closed form for the recurrence relation. Procedure Scramble(A[lo . . . hi]) begin if lo ≥ hi then return(A) else begin mid := (lo + hi)/2; for (i = 0; i < (hi − lo)/2; i + +) begin temp := A[lo + i]; A[lo + i] := A[hi − i]; A[hi − i] := temp; end Scramble(A[lo . . . mid]); Scramble(A[mid + 1 . . . hi]); return(A); end; end. 3. Use a recurrence relation to show that n X i=0 i2 = 2n3 + 3n2 + n . 6 4. Find a closed form for the following recurrence relation. T (0) = a T (n) = bT (n − 1) + cn + d. 5. Find a closed form for the following recurrence relation. T (1) = a n T (n) = bT ( ) + cn. b
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors