DAA Lecture 1
DAA Lecture 1
Algorithms
Week-1
Instructor Information
• Name
– Zain Ul Islam Adil
• Contact information
– [email protected]
• Research field
– Network Security
Course Information
• Name
– Design and Analysis of Algorithm
• Course Code
– CSAA-242
• Lectures
– 16
• Quizzes
– 4
• Assignments
– 3
• Attendance
– 75%
What is course about?
The theoretical study of design and analysis of
computer algorithms
Basic goals for an algorithm:
• always correct
• always terminates
• performance
Performance often draws the line between
them
Design and Analysis of Algorithms
• Analysis: predict the cost of an algorithm in
terms of resources and performance
Compilers
Networking Computational Biology
Why is this course
required?
• Algorithms are fundamental to CS.
• Algorithms are useful.
Algorithms are useful
• As we get more and more
data and problem sizes get
bigger and bigger,
algorithms become more
and more important.
Algorithms
fast computers
efficient algorithms.
fast computers
efficient algorithms.
• [] https://www.youtube.com/watch?v=Z2AY-bWsezk
how ? log e x 2.303log10 x
ln( x) log e x
log10 x
log e x
log10 e
log10 x
log10 2.7182
log10 x
0.4342
2.303log10 x
Natural Log (ln) Examples
• Verify following output:
Natural Log (ln) Identities
Fast computers vs efficient algorithms
fast computers
efficient algorithms.
• [] https://www.cpp.edu/~ftang/courses/CS240/lectures/analysis.htm
• [] https://www.calculator.net/log-calculator.html?xv=4&base=e&yv=&x=23&y=15
Comparing Growth Rate
• Ideally, we would like our algorithms to run in linear or n-
log-n time. Algorithms with quadratic or cubic running
times are less practical, but algorithms with exponential
running times are infeasible for all but the smallest sized
inputs
• [] https://course.ccs.neu.edu/cs5002f18-seattle/lects/cs5002_lect9_fall18_notes.pdf