Unformatted text preview: Algorithm analysis, asymptotic notation September 27, 2010 Homework 1 Due Date: Tuesday, 5 October 2010 by end of lecture General comment: Whenever we ask you to design an algorithm, we always want to see three things: a description of the algorithm, a run-time analysis, and an explanation/proof that the algorithm does what you claim it does. Problem 1-1. (15pts) True/False: Can you say that the function f ( n ) = 2 √ log n is: O ( n )? O ( n 2 )? O (log n )? o ( n )? o (log n )? Ω( n )? Ω(1)? Ω(log n ) ? ω ( n )? ω (1)? Θ( n )? Θ( n 2 )? Θ(log n )? Problem 1-2. (20pts) Consider an instance of the Stable Matching problem discussed in class, in which there exists a man m and a woman w such that m is ranked first on the preference list of w and w is ranked first on the preference list of m . Is it true that in every stable matching for this instance, the pair ( m,w ) are always matched ? Prove that the statement is correct or give a counterexample. Assume all preferences arealways matched ?...
View Full Document
- Spring '09
- Data Structures, Big O notation, Analysis of algorithms, 15pts, 20pts