Professional Documents
Culture Documents
DSECCZG519
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
Parthasarathy
1
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
DSECCZG519 – CS#1
Introduction to DSAD & Analyzing
Algorithms
2
Agenda for CS #1
1) Introduction to DSECCZG519
o Courseware
o Books & Evaluation components
o How to make the most out of this course ?
2) Motivation & Synergies between Data Science & DSAD
3) Introduction to Algorithms
o Notion of an algorithm
o Properties of an algorithm
o Phases of program development
o Why do we have to analyze them ?
4) Quick check, Q&A
5) Analysis of algorithm efficiency
o Analysis Framework
o Pseudocode & Counting primitives
o Asymptotic Notations
6) Q&A!
3
Be Regular
Mentally present – Observe!! Listen!!
Interaction is key …
Use the Discussion Forum in Canvas effectively
Solve the exercises regularly!
Subjects doesn't know you are a working professional
Go an extra mile
Algorithm
An algorithm is a step-by-step procedure for solving a
problem in a finite amount of time.
Data Structures
Is a systematic way of organizing and accessing data, so
that data can be used efficiently
Algorithms + Data Structures = Program
Specification of Specification of
Algorithm
Input Output
10
11
Some steps like 5,6 can be interchanged but some like 3,8 cannot
be interchanged.
12
Design an algorithm
Position
number of the
element within
14
array c
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Data Structures
Hash Tables
Stack
Set with delete
operation specified
(LIFO)
Queue
Remove Insert
(FIFO) (Enqueue)
(Dequeue) front rear 15
Binary Tree
Heap
AVL Tree
16
17
Brute Force
Greedy Method
Knapsack
MST
Dijkstra’s
Divide & Conquer
Merge Sort
Quick Sort
Integer Multiplication Problem
Dynamic Programming
Matrix Chain Multiplication
Floyd – Warshall's
…
…
18
19
20
21
• Resources Used
– Running time ( Lesser the running time, better the algorithm)
– Space used (Lesser the space used, better the algorithm)
• Resource Usage
– Measured proportional to (input) size
22
Experimental Study
25
27
29
30
31
32
33
Running Time
80
certain data sets than on others. 60
to determine – why? 20
Sum(a,b)
{
Return a+b
}
35
Tsum of matrix
Y
Tsum of list
Tsum
36
X (n-input size)
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Time complexity Analysis-
Some General Rules.
37
38
O (Big Oh)
(Big Theta)
40
Big Oh
denotes the
worst case
complexity !!
41
42
Big Omega
denotes the
best case
complexity !!
43
Big Theta
denotes the
average case
complexity !!
45
1) Introduction to DSECLZG519
o Courseware
o Books & Evaluation components
o How to make the most out of this course ?
2) Motivation & Synergies between Data Science & DSAD
3) Introduction to Algorithms
o Notion of an algorithm
o Properties of an algorithm
o Phases of program development
o Outline of data structures & Algorithm design strategies
o Why do we have to analyze them ?
4) Analysis of algorithm efficiency
o Analysis Framework
o Pseudocode & Counting primitives
o Asymptotic Notations
5) Exercises, Q&A
47
48