
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Math 213 - Homework 4
Assigned: 9/12/
Due: 9/19/07 at the start of class.
Notation: Exercise a.b.c(d) stands for part (d) of Exercise c from Section a.b.
Problems:
(1) 4.2.2. (2) 4.2.6(a) and (c). (3) Show that if n is a positive integer, then n − bn 2 c = bn+1 2 c. [You don’t need induction here. Consider the cases when n is even and n is odd separately.] (4) Let g(n) denote the number of comparisons necessary to merge sort a list of length n. Show that g(1) = 0, g(2) = 1, and g(3) = 3. (5) Explain why
g(n) = g
(⌊n
2
n + 1 2
(6) Use strong induction to prove that for all n ≥ 1, g(n) ≤ g(n + 1). [The induction hypothesis here is that g(k) ≤ g(k + 1) for all k ≤ n.] (7) Prove by regular induction that g(2n) = (n − 1)2n^ + 1. (8) Show that g(n) = O(n log(n)). [For any n, there is some l with n ≤ 2 l^ ≤ 2 n. Then, by problem 6, g(n) ≤ g(2l). Use problem 7 and that l ≤ log(2n)]. (9) Show that if n ≥ 16, then n ≤ n 4 log(n). (10) Show that g(n) = Ω(n log(n)). [For any n, there is some l with n/ 2 ≤ 2 l−^1 ≤ n. Note that l ≥ log(n)].
1