CSC 282/482 – Algorithms
CSC 282/482 – Algorithms
lectures are automatically recorded by ECM
lectures will be
available on
blackboard
lectures are not broadcast (no zoom)
slides will be annotated and made available
on blackboard
CSC 282/482 – Algorithms
instructor: Daniel Stefankovic
TAs: Colby Crews, Dylan McKellips, Seif Mohamed,
Yekai Pan, Joe Saber, Boan Tian
5 topics
* dynamic programming (7)
* linear programming (4)
* graph algorithms (8)
* divide and conquer (3)
* NP-completness (3)
CSC 282/482 – Algorithms
Course webpage:
http://www.cs.rochester.edu/~stefanko/Teaching/24CS282/
Piazza discussion board
Blackboard
previous exams and solutions, major homework
links to gradescope, zoom (for office hours)
Gradescope
all homework submitted on gradescope
CSC 282/482 – Algorithms
instructor: Daniel Stefankovic
TAs: Colby Crews, Jinfa Huang, Dylan McKellips, Seif Mohamed,
Yekai Pan, Joe Saber, Boan Tian
Blackboard
Instructor – Monday, Wednesday 8:00pm-9:00pm on Zoom
CSC 282/482 – Algorithms
instructor: Daniel Stefankovic
TAs: Colby Crews, Dylan McKellips, Seif Mohamed,
Yekai Pan, Joe Saber, Boan Tian
Course webpage:
http://www.cs.rochester.edu/~stefanko/Teaching/24CS282/
readings
homework dates (homework on blackboard)
future exam/homework dates
problem session dates
office hours:
Instructor – Monday, Wednesday 8:00pm-9:00pm
homework/test rules, grading, academic honesty
CSC 282/482 – Algorithms
Problem sessions (only in weeks with exams or
when homework is due):
Monday 6:15pm - 7:15pm in Hylan Building Room 202
Tuesday 6:15pm - 7:15pm in Goergen Hall Room 109
Wednesday 6:15pm - 7:15pm in Gavett Hall Room 310
Wednesday 7:40pm - 8:40pm Hutchison Hall Room 473
upcoming problem sessions
Sep. 9,10,11 - for homework due Sep. 12
Sep. 16,17,18 - for exam #1 on Sep. 19
CSC 282/482 – Algorithms – books
``Algorithms’’
http://jeffe.cs.illinois.edu/teaching/algorithms/
``Algorithms’’
~300 pages, $40 on Amazon
``Introduction to Algorithms’’
~1300 pages, $82 on Amazon
Grading
homework + exam grade
homework (5 major assignments)
(10 minor assignments)
(20%)
exams (3 in-class exams):
Sep 19 (DP, greedy)
Nov 7 (graph algorithms, LP)
Dec 5 (NP, D&C, FFT)
(26%)
(26%)
(26%)
Homework collaboration policy
Please, discuss the homework with your
classmates (you can learn a lot).
Feel free to look around.
But: write your solutions separately without
any written aid.
Submitting homework
Homework submitted on Gradescope, before 11am on
the due date.
You should have received an email from Gradescope.
The homework must be typeset (for example, you can
use LaTeX, word, powerpoint (of course, any openoffice
or google variants are fine), etc).
Prerequisites: CSC 162 or CSC 172 or MTH 172
asymptotic notation:
f,g: N R+
f(n) = O(g(n))
(C) ( n) f(n) C g(n)
def
f(n) = (g(n)) g(n)=O(f(n))
def
f(n) = (g(n)) f(n)=O(g(n)) g(n)=O(f(n))
Q1:
Q2:
Q3:
Q4:
log
log
Q5: 3
2
Q6: 2
3
Q7:
Q8: 2
+1
2
Q9: If
Q10: If
and
and ℎ
ℎ
then
then
ℎ
+ℎ
Q11: If
+
max{
,
}
Coin change problem
coins of values 1,2,5,10
unlimited supply of each coin
INPUT: amount A
OUTPUT: a way of paying A that uses the smallest number of coins
Greedy algorithm
Greedy algorithm – proving correctness
Greedy algorithm – proving correctness
A proof of correctness of a greedy
algorithm is usually showing that
the optimal solution must agree with
the output of the greedy algorithm.
Coin change problem
coins of values 1,3,5,10
unlimited supply of each coin
INPUT: amount A
OUTPUT: a way of paying A that uses the smallest number of coins
Greedy algorithm
Greedy algorithm – proving correctness
Greedy algorithm – proving correctness
A proof of correctness of a greedy
algorithm is usually showing that
some (well chosen) optimal solution
must agree with the output of the
greedy algorithm.
Coin change problem
coins of values 1,5,7,10
unlimited supply of each coin
INPUT: amount A
OUTPUT: a way of paying A that uses the smallest number of coins