33
CS5234 Combinatorial and Graph Algorithms Welcome!

CS5234 Combinatorial and Graph Algorithms Welcome!

Embed Size (px)

Citation preview

Page 1: CS5234 Combinatorial and Graph Algorithms Welcome!

CS5234Combinatorial and Graph Algorithms

Welcome!

Page 2: CS5234 Combinatorial and Graph Algorithms Welcome!

CS5234 Overview

Combinatorial & Graph Algorithmshttp://www.comp.nus.edu.sg/~cs5234/

Instructor: Seth GilbertOffice: COM2-204

Office hours: by appointment

Page 3: CS5234 Combinatorial and Graph Algorithms Welcome!

Combinatorial and Graph

Algorithms

Page 4: CS5234 Combinatorial and Graph Algorithms Welcome!

What is an algorithm?– Set of instructions for solving a problem

“First, wash the tomatoes.”

“Second, peel and cut the carrots.”

“Third, mix the olive oil and vinegar.”

“Finally, combine everything in a bowl.”

– Finite sequence of steps

– Unambiguous

– English, Chinese, pseudocode, Java, etc.

Algorithms

Page 5: CS5234 Combinatorial and Graph Algorithms Welcome!

Algorithms for

Combinatorial Optimization

Page 6: CS5234 Combinatorial and Graph Algorithms Welcome!

Optimization:Find the minimum/maximum…

Combinatorial Optimization

Page 7: CS5234 Combinatorial and Graph Algorithms Welcome!

Optimization:Find the minimum/maximum:

Discrete: a collection of items

Combinatorial Optimization

Page 8: CS5234 Combinatorial and Graph Algorithms Welcome!

Optimization:Find the minimum/maximum:

Discrete: a collection of items

Combinatorial: a collection of items

generated by counting, combining, and

enumerating.

Combinatorial Optimization

Page 9: CS5234 Combinatorial and Graph Algorithms Welcome!

Optimization:Find the minimum/maximum:

Discrete: a collection of items

Combinatorial: a collection of items

generated by counting, combining, and

enumerating.

Examples:Graphs

Matroids

Similar structures…

Combinatorial Optimization

Page 10: CS5234 Combinatorial and Graph Algorithms Welcome!

Find the “best” item in a large set of items:

Problem Set of items Size DifficultySearching List of integersLinear Easy

Shortest paths All paths in a graph Exponential Easy

Minimum spanning tree All spanning trees ExponentialEasy

Steiner tree All steiner trees Exponential Hard

Travelling salesman All possible tours Exponential Hard

Matching All possible matchings Exponential Easy

Bipartite vertex cover All possible covers Exponential Easy

Vertex cover All possible covers Exponential Hard

Maximum clique All possible subsets Exponential Very Hard

Combinatorial Optimization

Page 11: CS5234 Combinatorial and Graph Algorithms Welcome!

Find the “best” item in a large set of items:

Problem DifficultyMaintain student records Easy

Data compression Easy

Program halting problem Impossible

VLSI chip layout Hard

Exam timetable scheduling Hard

Job assignment problem Easy

Computer deadlock problem Easy

Finding patterns in a database Easy

Combinatorial Optimization

Page 12: CS5234 Combinatorial and Graph Algorithms Welcome!

Operations Research:How to make better decisions (e.g., maximize profit)

Project planning / critical path analysis

Facility location: where to open stores / plants

Floorplanning: layout of factory or computer chips

Supply chain management

Berth assignment problem (BAP): port management

Assignment problems (e.g., weapon target assignment)

Routing / transportation problems: buses, subways, trucking.

Airline ticket pricing

Combinatorial Optimization

Page 13: CS5234 Combinatorial and Graph Algorithms Welcome!

Algorithms for

Combinatorial Optimization

Page 14: CS5234 Combinatorial and Graph Algorithms Welcome!

Goals: Algorithmic

1. Design (problem solving)

2. Analysis (rigorous, deep understanding)

3. Implementation (able to put it to use)

Page 15: CS5234 Combinatorial and Graph Algorithms Welcome!

Goals: Algorithmic

1. Design (problem solving)

2. Analysis (rigorous, deep understanding)

3. Implementation (able to put it to use)

Page 16: CS5234 Combinatorial and Graph Algorithms Welcome!

“If you need your software to run twice as fast, hire better programmers.

But if you need your software to run more than twice as fast, use a better algorithm.”

-- Software Lead at Microsoft

Page 17: CS5234 Combinatorial and Graph Algorithms Welcome!

“... pleasure has probably been the main goal all along.

But I hesitate to admit it, because computer scientists want to maintain their image as hard-working individuals who deserve high salaries... ”

-- D. E. Knuth

Page 18: CS5234 Combinatorial and Graph Algorithms Welcome!

“... pleasure has probably been the main goal all along.

But I hesitate to admit it, because computer scientists want to maintain their image as hard-working individuals who deserve high salaries... ”

-- D. E. Knuth

Page 19: CS5234 Combinatorial and Graph Algorithms Welcome!

Target students:– Beginning graduate students

– Advanced (4th year) undergraduates

– Anyone planning to do research in algorithmic design

Prerequisites: – CS3230 (Analysis of Algorithms), or

equivalent

– Mathematical maturity

Algorithms for Combinatorial Optimization

Page 20: CS5234 Combinatorial and Graph Algorithms Welcome!

You must already know these:• Data Structures (with analyses)

– Stacks, Queues, Lists,

– Binary search trees, balanced trees,

– Heaps and priority queues

• Algorithm Design Paradigms (with Analysis)– Standard sorting and searching algorithms

– Graph algorithms: DFS, BFS,

– Shortest Path Algorithms, MST Algorithms

– Greedy Algorithms, Divide-and-Conquer

Algorithms for Combinatorial Optimization

Page 21: CS5234 Combinatorial and Graph Algorithms Welcome!

You must already know these:• Analysis of Algorithms

– Expertise with Big-O, , notations

– Summation of series, Master Theorem

– Competent with Algorithmic Analysis:

Quicksort, Heapsort, Divide-and-Conquer algorithms

DFS, BFS, Shortest Path & MST algorithms

Algorithms for Combinatorial Optimization

Page 22: CS5234 Combinatorial and Graph Algorithms Welcome!

Mid-term exam

October 7 In class

Final exam

December 2 Exams will be graded and returned.

CS5234 Overview

Page 23: CS5234 Combinatorial and Graph Algorithms Welcome!

Grading

40% Problem sets

25% Mid-term exam

35% Final exam

Problem sets

– 6-7 sets (about every 1-2 weeks)

– A few may have programming components (C++).

CS5234 Overview

Page 24: CS5234 Combinatorial and Graph Algorithms Welcome!

Last problem set

Small project

Idea: put together some of the different ideas we have used in the class.

Time scale: last 2-3 weeks of the semester.

CS5234 Overview

Page 25: CS5234 Combinatorial and Graph Algorithms Welcome!

Problem sets released now

PS0: Covers background knowledge. Do not submit.

PS1: Routine problems --- easy practice. Do not submit.

Standard problems --- to be submitted.

Advanced problems --- for a challenge/fun. Do not submit.

CS5234 Overview

Page 26: CS5234 Combinatorial and Graph Algorithms Welcome!

Problem set grading

Simple scheme:

2 : excellent, near perfect answer

1 : mostly right

0 : mostly wrong / not handed in

-1 : utter nonsense

CS5234 Overview

Page 27: CS5234 Combinatorial and Graph Algorithms Welcome!

What to submit:

Concise and precise answers: Solutions should be rigorous, containing all necessary detail, but no more.

Algorithm descriptions consist of: 1. Summary of results/claims.

2. Description of algorithm in English.3. Pseudocode, if helpful. 4. Worked example of algorithm. 5. Diagram / picture. 6. Proof of correctness and performance analysis.

CS5234 Overview

Page 28: CS5234 Combinatorial and Graph Algorithms Welcome!

How to draw pictures?

By hand:

Either submit hardcopy, or scan, or take a picture with your phone!

Or use a tablet / iPad…

Digitally: 1. xfig (ugh) 2. OmniGraffle (mac) 3. Powerpoint (hmmm)4. ???

CS5234 Overview

Page 29: CS5234 Combinatorial and Graph Algorithms Welcome!

Policy on plagiarism:

Do your work yourself: Your submission should be unique, unlike

anything else submitted, on the web, etc.

Discuss with other students: 1. Discuss general approach and techniques.2. Do not take notes.

3. Spend 30 minutes on facebook (or equiv.).4. Write up solution on your own. 5. List all collaborators.

Do not search for solutions on the web:Use web to learn techniques and to review

material from class.

CS5234 Overview

Page 30: CS5234 Combinatorial and Graph Algorithms Welcome!

Policy on plagiarism:

Penalized severely: First offense: minimum of one letter grade

lost on final grade for class (or referral to SoC disciplinary committee).

Second offense: F for the class and/or referral to SoC.

Do not copy/compare solutions!

CS5234 Overview

Page 31: CS5234 Combinatorial and Graph Algorithms Welcome!

Introduction to Algorithms– Cormen, Leiserson, Rivest, Stein

– Recommended…

Textbooks

Page 32: CS5234 Combinatorial and Graph Algorithms Welcome!

Algorithm Design– Kleinberg and Tardos

– Recommended…

Textbooks

Page 33: CS5234 Combinatorial and Graph Algorithms Welcome!

Topics (tentative, TBD)

Introduction to combinatorial optimization Vertex cover, set cover, Steiner tree, TSP

Flows and matching Maximum flow, bipartite matching

Planar GraphsFaster algorithms…

Linear programming LPs, duality, relaxations, rounding

CS5234 Overview