Download presentation
Presentation is loading. Please wait.
Published byΤάνις Μελετόπουλος Modified over 5 years ago
1
Assignment 1: due 1/9/19 Geometric sum: Prove by induction on integers that Give a structured proof using the technique if S(n-1) then S(n). Include the following: base case setup inductive hypothesis application of inductive hypothesis with all algebra on RHS of equals
2
Assignment 2: due 1/10/19 Prove by induction on integers that recurrence T(2k) = 2 if k=1 T(2k) = 2T(2k-1) + 2k if k>1 has solution T(2k) = k2k What is the base case? What is the “setup” for if S(n-1) then S(n)? What is the inductive hypothesis? What is the application of the I.H.?
3
Assignment 3: due 1/14/19 Use Stirling’s approximation (Eq(3.18) text p57) to give an informal proof that lg(n!)=Q(nlgn). Show all steps.
4
Assignment 4: due 1/16/19 Ex text p52 If f(n) and g(n) are asymptotically non-negative, show by the definitions of big O and W and theorem 3.1 that max(f(n),g(n)) = Q(f(n)+g(n)). Note: at any n, max(f(n),g(n)) is the larger of f(n) and g(n) Address both inequalities in the definitions of big O and W Use given information to define n0 Use non-negative property of f(n) and g(n) to find constants in the definitions of big O and W
5
Homework Assignment 5: due 1/23/19 Use Stirling’ approximation, Eq(3.18) p 57, to show that n! = o(nn) and n! = w(2n)
6
Homework Assignment 6: due 1/25/19
ex A.1-3 p 1149 of text use derviatives on the geometric series to show that
7
Homework Assignment 7: due 1/30/19
1) Use integration to show that is bounded from above by a constant . 2)Find asymptotic upper and lower bounds on by bounding every term. Make your lower bound tighter than w(n).
8
Assignment 8: due 2/1/19 Prove by the substitution method that T(n) = T(floor(n/2)) + T(ceiling(n/2)) + Q(n) has T(n)=W(nlgn) as an asymptotic solution. Give a structured proof and show constraints on c and n.
9
Assignment 8: due 2/1/19 Prove by the substitution method that T(n) = T(floor(n/2)) + T(ceiling(n/2)) + Q(n) has T(n)=W(nlgn) as an asymptotic solution. Give a structured proof and show constraints on c and n.
10
Assignment 9: due 2/4/19 Prove by substitution that T(n)=8T(n/2)+Q(n2) has T(n) = W(n3) as an asymptotic solution. Give a structured proof and show constraints on c and n.
11
CptS 350 Spring 2018 Homework Assignment 10: due 2/6/19 Use a tree analysis to obtain an informal proof that T(n) = 4T(floor(n/2)) + cn, c>0 has the asymptotic solution T(n) = Q(n2)
12
CptS 350 Spring 2018 Homework Assignment 11: due 2/11/19 Perform structured imbalanced tree analysis on the recurrence T(n)=T(n/2)+T(n/4)+T(n/8)+n using the longest path to leaves to approximate tree size. Compare order of growth of cost of leaves and levels. Guess an asymptotic solution based on the lower order of growth. Find tight bounds (prove Q) on T(n) based on your guess using the substitution method.
13
CptS 350 Spring 2018 Homework Assignment 12: due 2/22/19 Find a tight asymptotic bound on the solution of recurence T(n) = T(n-1) + cn by tree analysis and informal proof.
14
Homework Assignment 13: due 2/25/19
Problems 4-1a, 4.1c and 4.1e on text p107 by structured Master-theorem method. Last assignment in Chapter 4: Quiz #3 Friday 3/1/19 Tree analysis and Master theorem Assignments 10-13
15
CptS 350 Spring 2019 Homework Assignment 14: due 3/8/19 Prove by structured substitution that T(n)=T(9n/10)+T(n/10)+Q(n) has asymptotic solution T(n)=Q(nlgn)
16
Cpt S 350 Spring 2019 Homework Assignment 15: due 3/20/19 Use indicator random variables to compute the expected value of the sum of faces showing when n fair dice are tossed. Give a structured solution.
17
What recurrences describe (a) and (b)?
Homework Assignment 16: due 3/22/19 Ex p 223: (a) Show that SELECT with groups of 7 has a linear worst-case runtime (b) Show that SELECT with groups of 3 does not have a worst-case linear runtime. What recurrences describe (a) and (b)?
18
Homework Assignment 17: due 3/25/19
Given a “black box” code that the finds the median in linear time, worst case: 1) Write a version of Partition (Good-Partition) that uses the median for the pivot. 2) Write a version of Quicksort by Partition (Good-Quicksort) that runs in O(nlgn), worst case. Write a recurrence relation for the runtime of Good-Quicksort and show that it has solution T(n)=O(nlgn). 3) Write a version of Select by Partition (Good-Select) that runs in O(n), worst case. Write a recurrence relation for the runtime of Good-Select and show that it has solution T(n)=O(n).
19
Homework Assignment 18: due 4/1/19
Ex p 601. (BFS example) Use alphabetical order to resolve ambiguity in order of discovery. Make a table of p[v] for all v. Draw Gp
20
Homework Assignment 19: due 4/3/19
Ex p 610 (DFS example) Use alphabetical order to resolve ambiguities in order of discovery of new vertecies and choosing new sources. Label all edges as tree, back, forward or cross Make a table of p[v] for all v. Draw Gp Add and label non-tree edges
21
Homework Assignment 20: due 4/5/19
Ex p614 Topo sort on DAG of Fig 22.8 p615 Perform a DFS using conventions listed in slide 20. Make a table of v and f[v] with f[v] in decreasing order.
22
Homework Assignment 21: due 4/8/19
Ex p 620 SCCs on graph in Fig 22.6 p611 Perform DFS using conventions on slide 22. Construct the transpose graph Find SCCs and draw Gscc
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.