08 - Five Representative Problems

# 08 Five - ∑ v i i ∈ F Earliest fnish time will not work(Greedy algorithms won’t work Solved by dynamic programming “Greedy stays ahead

This preview shows pages 1–3. Sign up to view the full content.

1/28/08 - Five Representative Problems Lecture: Five representative problems Reading: Chapter 1.2 Earliest Start Time with Pre-emption (1) Preprocess the input to remove jobs whose interval contains another job’s interval (2) Sort the remaining jobs by increasing start (fnish) time (3) t = 0 (4) while t < T fnd earliest start time s i t. Schedule job i. (among jobs starting at s i t, fnd the time with earliest t i ) t <- t i + 1 endwhile Lemma. A±ter pre-processing, there is a way to renumber the remaining jobs (s i , t i ), . .., (s k , t k ) such that 1 i < j k, s i s j , and t i t j Proo±. Let (s 1 , t 1 ), . .. , (s k , t k ) be the lexicographic (dictionary) ordering o± jobs (sort by s i , break ties using t i ) I± i < j then s i s j by construction. Suppose t i > t j Job i is thrown away in step 1. <=> 6-1 6

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Five Representative Problems (1) Interval Scheduling (greedy alg’s) (2) Weighted interval scheduling. Input: Jobs (s i , t i , v i ) v i 0 Output: Feasible schedule F maximizing
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ∑ v i i ∈ F Earliest fnish time will not work (Greedy algorithms won’t work) Solved by dynamic programming “Greedy stays ahead without the greediness.” ±or t = 0, 1, 2, . .., T fnd the best schedule ±or the subinterval end±or (3) Maximum Matching Input. A bipartite graph Output. A matching (a set o± edges with distinct vertices) o± maximum cardinality 6-2 Solution uses max-f ow (4) Maximum independent set Input: An undirected graph G = (GE) Output: An independent set oF max cardinality (set oF vertices with no edge between them) Brute ±orce: O(k 2 n 2 ) Best known O(n 0.79. ..k + O(1) ) Poly-time algo? Equiv’t P = NP (5) Competitive Facility Location: Input: A graph with vertex weights w i ≥ A: 15 + 10 B: 10 Does player B have a strategy that guarantees ≥ p points? PSPACE-hard 6-3...
View Full Document

## This note was uploaded on 10/02/2008 for the course CS 482 taught by Professor Kleinberg during the Spring '08 term at Cornell University (Engineering School).

### Page1 / 3

08 Five - ∑ v i i ∈ F Earliest fnish time will not work(Greedy algorithms won’t work Solved by dynamic programming “Greedy stays ahead

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online