CSc 445: Homework Assignment 1
Assigned: Wednesday Jan 23 2008, Due: 10:30 AM, Monday Feb 4th 2008
Clear, neat and concise solutions are required in order to receive full credit so revise your work carefully before submission, and consider how your w
CSc 445: Homework Assignment 5
Assigned: Wednesday March 31 2008, Due: 10:30 AM, Monday April 14 2008
Clear, neat and concise solutions are required in order to receive full credit. Revise your work carefully before submission, and consider how your
CSc 445: Homework 4 Solutions (rev 2)
April 1, 2008
1. Monthly Software Purchases Given n distinct growth rates c1 , . . . , cn , we sort the growth rates into descending order. This can be achieved using, say, Heapsort with a max heap. As we have a
CSc 445: Homework Assignment 4
Assigned: Wednesday March 12 2008, Due: 10:30 AM, Monday March 31 2008
Clear, neat and concise solutions are required in order to receive full credit. Revise your work carefully before submission, and consider how your
CSc 445: Homework 3 Solutions
March 3, 2008
1. Negabinary arithmetic. Solution a We can use the division method for converting decimal to binary. Here are the steps: Step 1 Step 2 Step 3 Step 4 the Divide the current number by -2, write the remaind
CSc 445: Homework Assignment 3
Assigned: Monday Feb 18 2008, Due: 10:30 AM, Monday March 3 2008
Clear, neat and concise solutions are required in order to receive full credit. Revise your work carefully before submission, and consider how your work
CSc 445: Homework 2 Solutions
February 20, 2008
1. Finding k [1.n] efficiently s.t A[1.k] is increasing and A[k + 1.n] is decreasing. Solution We use a fairly straightforward variant of the binary search. FindK(A, low, high) i = (low + high)/2 if
CSc 445: Homework Assignment 2
Assigned: Monday Feb 4 2008, Due: 10:30 AM, Monday February 18 2008
Clear, neat and concise solutions are required in order to receive full credit. Revise your work carefully before submission, and consider how your wo
CSc 445: Homework Assignment 1 Solutions
February 5, 2008
1. Consider the problem of determining whether an arbitrary sequence x1 , x2 , . . . , xn of n numbers contains repeated occurences of some number. (a) Design an efficient algorithm for the