Lecture01 ADT DS Algorithm Analysis
Lecture01 ADT DS Algorithm Analysis
2018 - 2019
Overview
1 Course organization
3 Pseudocode
4 Algorithm Analysis
Course Organization I
Guiding teachers
Lecturer PhD. Oneţ-Marian Zsuzsanna
Lecturer PhD. Lupsa Dana
PhD Student Miholca Diana
PhD Student Mihai Andrei
Activities
Lecture: 2 hours / week
Course Organization II
Email: [email protected]
Rules I
Rules II
You have to come to the lab and the seminar with your
(semi)group (we will consider the official student lists for the
groups from the faculty’s web page).
Rules III
Rules IV
You will have a partial exam in the 5th seminar. More details
about this exam will be given in the 4th seminar (and in
Lecture 8).
Course Objectives
The study of the concept of abstract data types and the most
frequently used abstract data types.
The study of different data structures that can be used to
implement these abstract data types and the complexity of
their operations.
Bibliography I
Bibliography II
ADT - Example I
ADT - Example II
Container ADT I
Container ADT II
Python - Collections
Data Structures I
Data Structures II
Pseudocode I
Pseudocode II
Pseudocode III
if condition then
@instructions
else
@instructions
end-if
Pseudocode IV
Pseudocode V
Pseudocode VI
Pseudocode VII
Pseudocode VIII
Pseudocode IX
Array:
n: Integer
elems: T[]
Pseudocode X
Specifications I
Specifications II
Order of growth
O-notation I
O-notation
For a given function g (n) we denote by O(g (n)) the set of
functions:
O(g (n)) = {f (n) : there exist positive constants c and n0 s. t.
0 ≤ f (n) ≤ c · g (n) for all n ≥ n0 }
O-notation II
Graphical representation:
O-notation III
Figure taken from Corman et. al: Introduction to algorithms, MIT Press, 2009
Alternative definition
f (n)
f (n) ∈ O(g (n)) if lim
n→∞ g (n)
is either 0 or a constant (but not ∞).
Ω-notation I
Ω-notation
For a given function g (n) we denote by Ω(g (n)) the set of
functions:
Ω(g (n)) = {f (n) : there exist positive constants c and n0 s. t.
0 ≤ c · g (n) ≤ f (n) for all n ≥ n0 }
Ω-notation II
Graphical representation:
Figure taken from Corman et. al: Introduction to algorithms, MIT Press, 2009
Ω-notation III
Alternative definition
f (n)
f (n) ∈ Ω(g (n)) if lim
n→∞ g (n)
is ∞ or a nonzero constant.
T (n)
lim =∞
n→∞ n
Θ-notation I
Θ-notation
For a given function g (n) we denote by Θ(g (n)) the set of
functions:
Θ(g (n)) = {f (n) : there exist positive constants c1 , c2 and n0 s. t.
0 ≤ c1 · g (n) ≤ f (n) ≤ c2 · g (n) for all n ≥ n0 }
Θ-notation II
Graphical representation:
Figure taken from Corman et. al: Introduction to algorithms, MIT Press, 2009
Θ-notation III
Alternative definition
f (n)
f (n) ∈ Θ(g (n)) if lim
n→∞ g (n)
is a nonzero constant (and not ∞).