Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CMSC 451 Homework 1 - Spring 2009: Algorithms and Complexity - Prof. Samir Khuller, Assignments of Computer Science

The spring 2009 edition of homework 1 for the cmsc 451: algorithms and complexity course taught by samir khuller. The homework includes five problems covering topics such as big o notation, induction, maximum contiguous sum, and recurrence relations.

Typology: Assignments

Pre 2010

Uploaded on 07/29/2009

koofers-user-1ng
koofers-user-1ng 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download CMSC 451 Homework 1 - Spring 2009: Algorithms and Complexity - Prof. Samir Khuller and more Assignments Computer Science in PDF only on Docsity! Spring 2009 CMSC 451: Homework 1 Samir Khuller Feb 5 Problem 1. For each pair of expressions (A,B) below, indicate whether A is O, o, Ω, ω, or Θ of B. Note that zero, one or more of these relations may hold for a given pair; list all correct ones. A B (a) n100 2n (b) 10n 100n (c) log (n!) n log n Problem 2. Prove by induction n ∑ k=1 k(k + 1) = n(n + 1)(n + 2) 3 . Problem 3. Assume that there are n numbers (some possibly negative) in a circle, and we wish to find the maximum contiguous sum on the circle. Give an efficient algorithm for solving this problem. What is its worst case running time? Problem 4. Solve the recurrence T (n) = { T (n/5) + 2 n > 1 3 otherwise assuming n is a power of 5. Show your calculations. Problem 5. A coin is tossed n times, each time with an independent probability p of coming up heads and 1 − p of coming up tails. Let H be the number of heads occurring. What is (a) E[H], the expected number of heads? (b) V [H], the variance of H? (c) the standard deviation of H? (d) the probability that H > 2? Show your calculations.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved