University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
Homework 7, Due Wednesday, November 16, 2016
Problem 1 (10 points):
Page 312, Exercise 1.
Problem 2 (10 points):
Page 315, Exercise 4.
Problem 3 (10 points):
Page
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
Homework 9, Due Friday, December 2, 2016
Problem 1 (10 points):
Page 416, Exercise 6.
Problem 2 (10 points):
Page 419, Exercise 9.
Problem 3 (10 points):
Page 420
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
November 14, 2016
Homework 8, Due Wednesday, November 23, 2016
Problem 1 (10 points):
Page 312, Exercise 1.
Problem 2 (10 points):
Give an algorithm, which given
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
October 18, 2016
Homework 4, Due Wednesday October 26, 2015
Problem 1 (10 points):
Page 195, Exercise 14
Problem 2 (10 points):
Page 192, Exercise 10
Problem 3 (1
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
October 25, 2016
Homework 5, Due Wednesday November 2, 2016
Problem 1 (10 points):
Solve the following recurrences:
a) T (n) = 3T (n/2) + n3/2 for n 2; T (1) = 1;
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
September 27, 2016
Homework 1, Due Wednesday October 5, 2016
Problem 1 (10 points):
Page 22, Exercise 1.
Problem 2 (10 points):
Page 22, Exercise 2.
Problem 3 (10
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
November 1, 2016
Homework 6, Due Wednesday, November 9, 2016
Problem 1 (10 points):
Solve the following recurrences:
a)
(
T (n) =
T ( n2 ) T ( n2 )
2
if n 1
b)
(
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
October 11, 2016
Homework 3, Due Wednesday October 19, 2016
Problem 1 (10 points):
Page 110, Exercise 9.
Problem 2 (10 points):
Page 110, Exercise 10.
Problem 3 (
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
Homework 10, Due Friday, December 9, 2016
Problem 1 (10 points):
a. Page 505, Exercise 1 a.
b. Page 505, Exercise 1 b.
Problem 2 (10 points):
Page 505, Exercise 2
NP-Complete
P
CSE 421
Algorithms
Richard Anderson
Lecture 27
Survey of NP Complete Problems
Announcements
Final exam,
Monday, December 12, 2:30-4:20 pm
Comprehensive (2/3 post midterm, 1/3 pre
midterm)
Review session
TBD
Online course evaluations av
University of Washington
Department of Computer Science and Engineering
CSE 421, Autumn 2016
Homework 2, Due Wednesday October 12, 2016
Problem 1 (10 points):
Page 67, Exercise 2 parts b, d, e, f.
Problem 2 (10 points):
Page 67, Exercise 4.
Problem 3 (10
CSE 421 Algorithms
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Today
NP-completeness
Reductions Problem Thresholds Number problems What is NP? What we don't know about NP-completeness
Course summary Evaluations
NP-Completeness Reduct
Today's topics
Problem Reductions
CSE 421 Algorithms
Richard Anderson Lecture 24 Network Flow Applications
Undirected Flow to Flow Bipartite Matching Disjoint Path Problem
Circulations Lowerbound constraints on flows Survey design
Problem Reduction
Re
CSE 421 Algorithms
Richard Anderson Lecture 24 Network Flow Applications
Today's topics
Problem Reductions
Undirected Flow to Flow Bipartite Matching Disjoint Path Problem
Circulations Lowerbound constraints on flows Survey design
Problem Reduction
Re
Today's topics CSE 421 Algorithms
Richard Anderson Lecture 25 Open Pit Mining Open Pit Mining Problem Task Selection Problem Reduction to Min Cut problem
S, T is a cut if S, T is a partition of the vertices with s in S and t in T The capacity of an S, T c
CSE 421 Algorithms
Richard Anderson Lecture 25 Open Pit Mining
Today's topics
Open Pit Mining Problem Task Selection Problem Reduction to Min Cut problem
S, T is a cut if S, T is a partition of the vertices with s in S and t in T The capacity of an S, T
Today's topics
More network flow reductions
CSE 421 Algorithms
Richard Anderson Lecture 26 Network Flow Applications
Airplane scheduling Image segmentation Baseball elimination
Airplane Scheduling
Given an airline schedule, and starting locations for t
CSE 421 Algorithms
Richard Anderson Lecture 26 Network Flow Applications
Today's topics
More network flow reductions
Airplane scheduling Image segmentation Baseball elimination
Airplane Scheduling
Given an airline schedule, and starting locations for t
Announcements
Final Exam
CSE 421 Algorithms
Richard Anderson Lecture 27 NP Completeness
Monday, December 11, 2:30-4:20 pm
Closed book, closed notes
Practice final and answer key available
HW 9, due Friday, 1:30 pm This week's topic
NP-completeness R
CSE 421 Algorithms
Richard Anderson Lecture 27 NP Completeness
Announcements
Final Exam
Monday, December 11, 2:30-4:20 pm
Closed book, closed notes
Practice final and answer key available
HW 9, due Friday, 1:30 pm This week's topic
NP-completeness R
Today
NP-completeness
CSE 421 Algorithms
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Reductions Problem Thresholds Number problems What is NP? What we don't know about NP-completeness
Course summary Evaluations
NP-Completeness Reduct
NP-Complete
P
CSE 421
Algorithms
Richard Anderson
Lecture 29
Complexity Theory
Announcements
Final exam,
Monday, December 14, 2:30-4:20 pm
Comprehensive (2/3 post midterm, 1/3 pre
midterm)
Review session
Today, 2:30-4:30 pm. Lowe 101
Online course e
CSE 421
Algorithms
Richard Anderson
Autumn 2016
Lecture 4
Announcements
Reading
Chapter 2.1, 2.2
Chapter 3 (Mostly review)
Start on Chapter 4
Homework Guidelines
Prove that your algorithm works
A proof is a convincing argument
Give the run time fo
CSE 421
Algorithms
Richard Anderson
Autumn 2016
Lecture 8 Greedy Algorithms II
Announcements
Midterm exam, October 31, 2016
In class, closed book
Greedy Algorithms
Solve problems with the simplest possible
algorithm
The hard part: showing that somethi
CSE 421
Algorithms
Richard Anderson
Lecture 12, Autumn 2016
Recurrences
Announcements
Midterm
Monday, Oct 31, in class, closed book
Through section 5.2
Divide and Conquer
Recurrences, Sections 5.1 and 5.2
Algorithms
Fast Matrix Multiplication
Count
CSE 421
Algorithms
Richard Anderson
Lecture 17
Dynamic Programming
Optimal linear interpolation
Optimal linear interpolation with K
segments
Error = S(yi axi b)2
Notation
Points p1, p2, . . ., pn ordered by
x-coordinate (pi = (xi, yi)
Ei,j is the least
CSE 421
Algorithms
Richard Anderson
Autumn 2016
Lecture 6
Announcements
Reading
Start on Chapter 4
Stable Matching Results
Averages of 5 runs
Much better for M than W
Why is it better for M?
What is the growth of mrank and w-rank as a
function of n?
CSE 421
Algorithms
Richard Anderson
Autumn 2016
Lecture 5
Announcements
Reading
Chapter 3 (Mostly review)
Start on Chapter 4
Graph Theory
G = (V, E)
V vertices
E edges
Undirected graphs
Edges sets of two vertices cfw_u, v
Directed graphs
Edges o
CSE 421
Algorithms
Autumn 2015
Lecture 11
Minimum Spanning Trees (Part II)
Minimum Spanning Tree
Undirected Graph
G=(V,E) with edge
weights
15
t
a
6
9
14
3
10
13
s
17
1
e
c
11
20
2
5
7
b
u
4
8
12
16
v
g
f
22
Greedy Algorithms for Minimum
Spanning Tree
[P