hbs3bis - or end times but the start time and end time of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 473 HBS 3.5 Spring 2009 CS 473: Undergraduate Algorithms, Spring 2009 HBS 3.5 1. Say you are given n jobs to run on a machine. Each job has a start time and an end time. If a job is chosen to be run, then it must start at its start time and end at its end time. Your goal is to accept as many jobs as possible, regardless of the job lengths, subject to the constraint that the processor can run at most one job at any given point in time. Provide an algorithm to do this with a running time that is polynomial in n . You may assume for simplicity that no two jobs have the same start
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: or end times, but the start time and end time of two jobs can overlap. 2. Describe and analyze an algorithm that chooses one element uniformly at random from a data stream, without knowing the length of the stream in advance. Your algorithm should spend O ( 1 ) time per stream element and use O ( 1 ) space (not counting the stream itself). 3. Design and analyze an algorithm that return a permutation of the integers { 1,2,. .., n } chosen uniformly at random. 1...
View Full Document

This note was uploaded on 01/22/2012 for the course CS 573 taught by Professor Chekuri,c during the Fall '08 term at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online