0% found this document useful (0 votes)
33 views

Homework 1 (Due September 8 in Class) No Late Submissions

This document outlines the problems for Homework 1 of the CS 401: Computer Algorithms course. It includes 5 mandatory problems: 1) finding an exact solution to a recurrence relation, 2) sorting 8 functions by asymptotic complexity, 3) analyzing the running time of two algorithms, 4) describing an O(n log n) algorithm to compute the intersection of 3 sets, and 5) proving properties about operators and asymptotic notation. Students are directed to guidelines for written homework assignments.

Uploaded by

Shivam Agarwal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Homework 1 (Due September 8 in Class) No Late Submissions

This document outlines the problems for Homework 1 of the CS 401: Computer Algorithms course. It includes 5 mandatory problems: 1) finding an exact solution to a recurrence relation, 2) sorting 8 functions by asymptotic complexity, 3) analyzing the running time of two algorithms, 4) describing an O(n log n) algorithm to compute the intersection of 3 sets, and 5) proving properties about operators and asymptotic notation. Students are directed to guidelines for written homework assignments.

Uploaded by

Shivam Agarwal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CS 401: Computer Algorithms

Fall 2011

Homework 1 (Due September 8 in Class) No Late Submissions


Read the Guidelines for Written Homework: http://compbio.cs.uic.edu/~tanya/teaching/cs401/howtohw.html The rst four problems are mandatory

1. 2.

Find an exact solution to the following recurrence: 2 an = 2an1 + 3an2 + n 2n + 5, with a0 = a1 = 1 3 Sort the following 8 functions from asymptotically smallest to asymptotically largest, indicating ties if there are any. You do not need to turn in proofs (in fact, please dont turn in proofs), but you should do them anyway just for practice. 1 n2 lg n n!

nlg n (lg n)n (lg n)lg n e + O(1/n) To simplify notation, write f (n) g(n) to mean f (n) = o(g(n)) and f (n) g(n) to mean f (n) = (g(n)). For example, the functions n2 , n, n , n3 could be sorted either 2 n as n n2 n n3 or as n n2 n3 2 2

3. 4. 5.

The running time of an algorithm A is described by the recurrence T (n) = 7T ( n ) + n2 . 2 A competing algorithm A has a running time of T (n) = aT ( n ) + n2 . What is the 4 largerst integer value for a such that A is asymptotically faster than A? Suppose you are given three n-element sets A, B, and C Describe an O(n log n)-time algorithm1 for computing a A B C. Extra Credit Problem. (a) Prove that the operators (E a)(E b) and E2 (a + b)E + ab have the same eect on every sequence. (b) Prove that if f = (h) and g = (h) then f + g = (h).

Since youve read the Homework Guidelines, you know what the phrase describe and algorithm means. Right?

1-1

You might also like