Chapter 4
4.1-6 Show T (n) = 2T ( n) + 1. Follow the method on p.57 for changing variables. Let n = 2k . Then Let S(m) = T (2k ). Then S(m) = 2S(m/2) + 1. Solve this using the Master Theorem (case 1
FALL 2002
CS5329
MIDTERM
C. HAZLEWOOD
1
Write your name on this paper. Answer all questions on this paper. Write on the back if you need more space. 1. Circle a location for each class day: a. Locatio
FALL 2001
CS5329
MIDTERM
C. HAZLEWOOD
Write your name on this paper. Answer all questions on this paper. Write on the back if you need more space. 1. Asymptotic Notation. (a) Show 3n2 - 10n + 6 is (n)
Chapter 9 9.1-1 Conduct a tournament to find the smallest of n numbers. Compare numbers in pairs. The smaller number in each pair 'wins'. (The larger cannot be the min.) Now compare these winning numb
SPRING 2003 1. Quickies.
CS5329
FINAL EXAM
C. HAZLEWOOD
(a) Asymptotic Notation. i. The average-case complexity of Matrix-Chain, is (n3 ). If the problem size is doubled, what happens to the run-time?
Chapter 23 23.2-4 Kruskal's algorithm requires O(E lg E) time: O(V ) to initialize O(E lg E) to sort the edges by weight O(E(E, V ) to process the edges If all edge weights are integers in the range 1
Chapter 3
3.1-1 If f and g are asymptotically non-negative, show max(f (n), g(n) = (f (n) + g(n). Let h(n) = f (n) g(n)
if f (n) g(n) if g(n) f (n)
Choose n0 so f (n) 0 and g(n) 0 for n n0 . Then, for
CMPT 765 LECTURE NOTES
Taken by: Hoda Akbari
Routers and Routing Algorithms
Router: a network device working in the network layer; it receives packets, puts them in a queue and
dispatches the packets