Docsity

Math 213 - Homework 4, Assignments of Discrete Mathematics

Toggle sidebar
bg1
Math 213 - Homework 4
Assigned: 9/12/07
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 nis a positive integer, then n− bn
2c=bn+1
2c. [You don’t need induction
here. Consider the cases when nis even and nis 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jn
2k+gn+ 1
2+ (n−1).
(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(nlog(n)). [For any n, there is some lwith n≤2l≤2n. 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
4log(n).
(10) Show that g(n) = Ω(nlog(n)). [For any n, there is some lwith n/2≤2l−1≤n. Note
that l≥log(n)].
1

Partial preview of the text

Download Math 213 - Homework 4 and more Assignments Discrete Mathematics in PDF only on Docsity!

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

  • g

n + 1 2

  • (n − 1).

(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