{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ex1 - A.V.Gerbessiotis Exam 1 CIS 435 Spring03 Exam 1 Name...

This preview shows pages 1–3. Sign up to view the full content.

A.V.Gerbessiotis CIS 435 Spring03 Exam 1 2-13-03 Exam 1 Name: ................................................................. ID Number: ....................... Grade: 1: ..... 2: ..... 3: ..... 4: ..... Total: ........... Exam 1 Sections 435-002, 435-004, 435h Solve all the problems in the space provided. 45 minutes for 100 points Read the Problems CAREFULLY! There are 3 (THREE) pages this page included Formulae to remember n X i =1 i = n ( n + 1) 2 , n X i =1 i 2 = n ( n + 1)(2 n + 1) 6 , n X i =1 i 3 = n 2 ( n + 1) 2 / 4 , n ! n e n , a log b n = n log b a , For x 6 = 1, k - 1 X i =0 x i = ( x k - 1) / ( x - 1) k - 1 X i =0 ix i = kx k ( x - 1) - x k +1 + x (1 - x ) 2 InsertionSort(A[1..n]) MergeSort(A[1..n]) 1. for (j=2;j<=n;j++){ 1. MergeSort(A,1,n); 2. key= A[j]; 3. i=j-1; MergeSort(A,l,r) 4. while (i>0)&&(A[i] > key){ 1. if (l < r) { 5. A[i+1]= A[i]; 2. m=floor((l+r)/2); 6. i=i-1;} 3. Merge-Sort(A,l,m); 7. A[i+1]=key; 4. Merge-Sort(A,m+1,r); } 5. Merge(A,l,m,r); }

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Problem 1 (24 points) Replace ? with the TIGHTEST of ω, o, Θ that best describes the relationship between the two sides. If necessary, use the approximation n ! ( n/e ) n , where e = 2 . 71 . . . . (1) 3 2 n = ? (10 n ). (2) lg ( n !) = ? ( n lg n ). (3) 2 2 lg n = ? ( n lg n ). Problem 2 (36 points) TRUE or FALSE? Do not provide any justification.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

ex1 - A.V.Gerbessiotis Exam 1 CIS 435 Spring03 Exam 1 Name...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online