This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: type Int_Array is array (Integer range <>) of Integer; procedure Measure (A : Int_Array ) is Sum : Integer := 0; begin for I in A'range loop for J in 1 . . I loop  only change to Ex 1 Sum := Sum + A(J); end loop ; end loop ; end Measure; The I value in the outer loop changes in every iteration with a maximum value of n. It cannot be expressed as a simple function in n. 4) Still muddy about coming up with T(n) equations from recurrence problems. Specifically unclear on how to solve for O(n) w/o Master method . When you are not using the master method, use iteration (Lecture 13 last semester) to solve the recurrence equation. If the T(n) is a homogeneous function in n (all the terms are functions of n), then find the most significant term to determine the BigO. See examples in both the Recitation 3 and Lecture 9 slides. 6) No mud, cool stuff, good lecture (6 students)...
View Full
Document
 Fall '05
 MarkDrela

Click to edit the document details