lecture13

# lecture13 - Administration COMPUTER SCIENCE 51 Spring 2009...

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

3/19/2009 1 COMPUTER SCIENCE 51 Spring 2009 cs51.seas.harvard.edu Prof. Greg Morrisett Prof. Ramin Zabih Administration Midterm exam is in class on 3/19 Closed book/notes Much of it will resemble PS5 More details today at 5PM! Thanks for the survey Nice to hear about what you liked Helpful to hear about what you don’t like Greg and I will try to improve things Today: reductions The Zune problem Vague definition, and more precise one CODE! Two apparently unrelated facts From advanced CS courses Proving Zune problem hardness Solving Zune problem efficiently Zune problem J. Allard wants to make the Zune popular by using Facebook He can scrape up some free Zunes Question: who gets them? This is not a precise ‘problem’ Compare: “sort these numbers” Most problems are like this Let’s just write some code! Levels of specification Informal problem statement: find the best people on Facebook to give a limited supply of objects to Precise problem statement: find the set of K nodes on the graph that is best, in some well-defined sense Algorithm description: fast method to find this set of K nodes Program specification: module contract in Scheme Most influential nodes Precise problem statement: Input: directed graph G, integer K Output: K nodes of the graph G Notation: for a set of nodes S, let nbrs(S) be the set of nodes who are neighbors some node in S. Output is S of size K with biggest nbrs(S) In Facebook: group of people of size K with the most total friends Note: no double-counting

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

View Full Document
3/19/2009 2 Idea: don’t think, just code We can just write some code for this Maybe handle a few special-cases we thought of by hand Try it, add some more special cases Maybe have some “rules of thumb” Example: try to grab big cliques When it doesn’t work completely, add more heuristics End up with big file “hack.scm” Last line in hack.scm What can you tell J? In general, you can’t say anything
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/26/2009 for the course COMPUTERSC CS51 taught by Professor Gregmorrisett during the Spring '09 term at Harvard.

### Page1 / 5

lecture13 - Administration COMPUTER SCIENCE 51 Spring 2009...

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

View Full Document
Ask a homework question - tutors are online