Homework #1 -- due Monday Wk 2

This homework involves topics that, for the most part, should have been covered in earlier courses (ICS 6D and ICS 46).

# required problems topic
1 CLR Exercise 3.1-1 on page 52
Let f(n) and g(n) be asymptotically nonnegative functions. Using the basic definition of θ-notation, prove that max( f(n), g(n) ) = θ( f(n)+g(n) ).
O-notation
2 CLR Problem 3-3(a) on pages 61-62
Rank the following functions by order of growth; that is, find an arrangement g1, g2, ..., g30, of the functions satisfying g1 = Ω(g2), g2 = Ω(g3), ..., g29 = Ω(g30). Partition your list into equivalence classes such that functions f(n) and g(n) are in the same class if and only if f(n) = θ(g(n)).
                                                                                                                       
lg(lg*n) 2lg*n (√2)lg n n2 n! (lg n)!
(3/2)n n3 lg2 n lg(n!) 22n n1/lg n
ln ln n lg* n n ⋅ 2n nlg lg n ln n 1
2lg n (lg n)lg n en 4lg n (n+1)! √(lg n)
lg*(lg n) 2√(2 lg n) n 2n n lg n 22n+1
O-notation
3 CLR Exercise C.3-3 on page 1200
A carnival game consists of three dice in a cage. A player can bet a dollar on any of the numbers 1 through 6. The cage is shaken, and the payoff is as follows. If the player's number doesn't appear on any of the dice, he loses his dollar. Otherwise, if his number appears on exactly k of the three dice, for k = 1, 2, 3, he keeps his dollar and wins k more dollars. What is his expected gain from playing the carnival game once?
expected value
4 CLR Exercise A.2-1 on page 1156
Show that ∑k=1 to n ( 1/k2 ) is bounded above by a constant.
bounding summations

# suggested problems topic
5 CLR Exercise 3.1-3 on page 53 O-notation
6 CLR Problem 3-4(d,e,f,g) on page 62 prove/disprove properties
7 Resolve the following questions, with proof:
  1. n log n = O(n2)?
  2. n/log n = O(n)?
  3. (log n)363 = O(n)?
  4. 2n = O(2n/2)?
  5. 3n = O(2n)?
O-notation
8 The following is known about functions f and g:
f(n) = θ(n) ; f(1) = 1 ;f(2) = 2
g(n) = θ(n3) ; g(1) = 1 ;g(2) = 8
Is f(3) < g(3)?     Explain why or why not.
O-notation
9 Prove by induction that, for all n > 6, the unit square
can be partitioned into n squares (not necessarily of identical size).
induction
10* CLR Exercise 3.2-4 on page 60 polynomially-bounded?
11* CLR Exercise C.2-9 on pages 1195-1196, explanation required probability


Dan Hirschberg
Computer Science Department
University of California, Irvine, CA 92697-3435
dan at ics.uci.edu
Last modified: Jul 1, 2013