Professional Documents
Culture Documents
Introduction
SUTD ISTD 50.004 Algorithm
Chong Kai Fong Ernest
Cyrille Pierre Joseph Jegourel, Soh De Wen, Wang Yixiao
SUTD
Manager
Manager
You
SUTD ISTD 50.004 Algorithms 5
Why should we study algorithms?
Manager
Manager
You
SUTD ISTD 50.004 Algorithms 8
Why should we study algorithms?
Textbook
• Introduction to Algorithms
– by Cormen, Leiserson, Rivest, and Stein (CLRS)
• Very very useful, almost the whole world is using this
book
• For pre-reading and revision, I won’t go through the
book in class
• But most of my materials are all based on this book
• Highly recommend to read the whole chapter of the
course related topics.
SUTD ISTD 50.004 Algorithms 18
Grading
• 6 weekly homework: 15%
– Each homework will take at most 2 hours of your time.
• 2 Problem sets: 20%
– More difficult than homework sets, and will take at most 24
hours.
– due week 5 and week 11.
• 2 Tests: 30%
– The first test is in week 6.
• Project 2D: 5%
– For ISTD students only.
• Final Exam: 30%
– Week 14
• Course Evaluation Survey: Bonus 2%
SUTD ISTD 50.004 Algorithms 19
Closest deadlines:
• Homework Set 1 due next week (31 Jan, Monday, 1pm, online
submission).
• Homework Set 2 due following week (7 Feb, Monday, 1pm, online
submission).
• Soh De Wen
• Email: dewen_soh@sutd.edu.sg
• Wang Yixiao
• Email: yixiao_wang@sutd.edu.sg
Teaching Assistants:
Li Zihao (Masters): zihao_li@sutd.edu.sg
Anirudh Shrinivason (Undergraduate): anirudh_shrinivason@mymail.sutd.edu.sg
Daniel Low Yu Hian (Undergraduate): daniel_low@mymail.sutd.edu.sg
Huang He (Undergraduate): he_huang@mymail.sutd.edu.sg
Jin Ziqi (Undergraduate): ziqi_jin@mymail.sutd.edu.sg
Leong Yun Qin Melody (Undergraduate): melody_leong@mymail.sutd.edu.sg
Sun Kairan (Undergraduate): kairan_sun@mymail.sutd.edu.sg
input instance x
= Expo
f (x) = 21min
– For example
2n3 +100n2 + 5 = O(n3000000 )
– For example
2n 999999 +100n33 + 5 = W(n2 )
x + x(log x) = ?(x )
2 2 2
Intuition: I am g(n) and you are f(n). If I am faster than you, then
no matter how far I am behind you now, one day I will surpass you.
f (n) = W(g(n)) Û
$D > 0, n0 such that
f (n) ³ D g(n) for n ³ n0
Intuition: I am g(n) and you are f(n). If you are faster than me, then
no matter how far I am ahead of you now, one day you will surpass
me.
SUTD ISTD 50.004 Algorithms 42
Exact definitions
f (n) = Q(g(n)) Û
$D1, D2 > 0, n0 such that
D1 g(n) ³ f (n) ³ D2 g(n) for n ³ n0
D1=3
f (n) = 2n +100n -1000
2
D2=1
g(n) = n 2 𝑛0 = 100
so, f (n) = Q(g(n))
SUTD ISTD 50.004 Algorithms 46
Complexity of algorithms