|
|
|
|
CSE373 Homework 2
Due at the beginning of class, Monday, Oct 15, 2007
No late assignments will be accepted.
Here are some questions on complexity and algorithm analysis.
You only need to turn in written solutions.
Problems
- Weiss, 2.1.
- Weiss, question 2.7. For parts (b) and (c), please turn in a printout of
your Java code, (no electronic submission required). Hints: you will
want to use assorted large values of n to get meaningful
experimental results. You may find the library function
System.nanoTime() to
be useful in timing code fragments.
- Weiss question 2.8(b).
- Weiss question 2.11.
- Weiss question 2.12.
- Show that the function 3n + 7n2 + 3 is O(n2).
(You will need to use the definition of O(f(n))
to do this.)
- Weiss question 2.27.
|