Fall 2001
Fundamental Algorithms
Professor Yap

Homework 1

Due: Mon September 24, in class

NOTICE:

	0) Some students have reasons for extensions -- either
	for compassionate reasons (especially related to the recent events),
	for religious holidays, or others.  Please come to see me for this.

	1) We suggest trying to going over the homework before
	recitation, so that you can ask relevant questions.

	2) In the following, we write all math equations within a matching
	pair of ``$''.  This is the TeX/laTeX convention.
	Other conventions:
	
		-- macros are indicated by a backslash
			(e.g. \alpha or \Theta are macros
			for Greek letters).

		-- superscript is indicated by "^" (caret)
			E.g., $n^2$ is "n square"

		-- subscript is indicated by "_" (underscore)
			E.g., $x_1$ is "x sub 1"

############################################################
QUESTIONS
############################################################

1. Question 3.1-2, page 50.

	Show that for real constants a, b (b>0),
	$(n+a)^b = \Theta(n^b)$.

	NOTE: You MUST solve this "from first principles".
	In particular, explicitly show the constants $c_1, c_2$
	and $n_0$ in the definition of the $\Theta$-notation.
	REMEMBER that $a$ can be negative!

2. Question 3-2, page 58.

	IMPORTANT: Only fill in the first, third and fifth columns.

	HINT:
	Use facts such as $\lg ^b (n) = O(n^a)$ for all $a>0$ (p.54).

3. Question 4.3-2, page 75.

4. Question 4-1.  Note that the last two parts are not Master recurrences.
	HINT:
	For part (h), use domain transform by taking logarithm.
	To show asyptotically tight results means to determine
	$T(n)$ up to $\Theta$-order.  If you invoke the Master theorem,
	be sure to justify its use.

############################################################
ADDITIONAL QUESTIONS
	(not graded, but we will sketch answers)
############################################################

1. Question 3.1-4, page 50.
2. Question 3.2-3, p.57.  
	Only prove equation (3.18), not the extra stuff.
	That is, $\log (n!) = \Theta(n\log n)$.
3. Question 4.3-1, p. 75.
	Master theorem applications.