This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Homework #0 This homework will not be handed in or graded. 1. There is a class of n 1 students. Student A is a celebrity if every student knows A , and A does not know any other student. Student B is an observer if B knows every student, but no other student knows B . You are allowed to query any student i as to whether they know some other student j . Design an algorithm which identifies which students are celebrities and which students are observers , using as few queries as possible. Prove the correctness of your algorithm. Is it possible for a student to be both a celebrity and observer simultaneously? Give a formal proof of your answer. 2. A prime number is an integer p > 1 which is divisible only by itself and 1. Prove that there are an infinite number of primes. 3. Order the following functions in order from smallest asymptotic running time to great est. Additionally, identify all pairs of functions i and j where f i ( n ) = ( f j ( n )). Assume all logarithms have base2 unless otherwise specified. Justify all answers....
View
Full
Document
 Spring '06
 Shamsian
 Algorithms

Click to edit the document details