This preview shows page 1. Sign up to view the full content.
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
This note was uploaded on 02/01/2011 for the course MATH 171 taught by Professor R during the Spring '09 term at Stanford.
- Spring '09