CS 332: Algorithms: Proof by Induction Asymptotic Notation
CS 332: Algorithms: Proof by Induction Asymptotic Notation
CS 332: Algorithms: Proof by Induction Asymptotic Notation
Introduction
Proof By Induction
Asymptotic notation
• Grading policy:
▪ Homework: 30%
▪ Exam 1: 15%
▪ Exam 2: 15%
▪ Final: 35%
▪ Participation: 5%
• Prerequisites:
▪ CS 202 w/ grade of C- or better
▪ CS 216 w/ grade of C- or better
▪ CS 302 recommended but not required
o Who has not taken CS 302?
• Format
▪ Three lectures/week
▪ Homework most weeks
o Problem sets
o Maybe occasional programming assignments
▪ Two tests + final exam
• Suppose
▪ S(k) is true for fixed constant k
o Often k = 0
▪ S(n) =S(n+1) for all n >= k
• Then S(n) is true for all n >= k
• Worst case
▪ Provides an upper bound on running time
▪ An absolute guarantee
• Average case
▪ Provides the expected running time
▪ Very useful, but treat with care: what is “average”?
o Random (equally likely) inputs
o Real-life inputs