Professional Documents
Culture Documents
01 Introduction To Algorithms
01 Introduction To Algorithms
Course Teacher:
C T h Md.Md Khairul
Kh i l Hasan
H (P i )
(Paris)
Contact: Provided in Google Classroom
Introduction to Algorithms
Third Edition
by Thomas H. Cormen, Leiserson, Rivest & Stein
2
Paris
Hope/Assumption: Topics Covered
in Previous Semesters
3
Paris
Algorithm: Definition
Algorithm Program
Written at Design time Written at Implementation time
He who has Domain Knowledge
g Programmer
g
Written in any language Written in Programming Language
H/W and S/W independent H/W and S/W dependent
C Analyze
Can A l C Test
Can T t
6
Paris
Algorithm: Effectiveness/ Why
efficient algorithm needed (1)
Computer A takes, 2
2*(10
(107)2 / 1010 = 20,000 sec
= more than 5.5 hours
[ 1010 instructions -------- 1 sec
1 instruction -------- 1 / 1010 sec
2*(107)2 instructions -------- 2*(107)2 / 1010 sec ]
Computer B takes, 50*(107) lg 107 / 107) = 1163 sec
= less than 20 minutes
B runs more than 17 times faster than A
8
Paris
Practice for Exam
Exercises:
Cormen ((Page
g - 14):
) 1.2-2,, 1.2-3
Problem:
Cormen (Page - 14): 1-1
9
Paris
Next Class
Topic:
y of Insertion Sort
Analysis
Prerequisite:
Insertion Sort Algorithm
10
Paris
Thank You
11
Paris
Stay Safe
12
Paris