Você está na página 1de 16

AV 482 Data Structures and

DBMS
Instructor: B. S. Manoj
Lecture-1
These slides are the works of many people who own the copyright for their work.
You may use it for your class room purpose at IIST for AV 482 (Data Structures
And DBMS) in July-November 2016 semester. Any other form of commercial or
Non-commercial public distribution may require prior permissions in writing from the
Copyright owners.
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

Todays plan
Course overview
Course resources
Grading
Syllabus
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

Course overview
Introductory in nature
Data structures, algorithms and Database Management
Systems

Expected familiarity
Familiarity with programming
No knowledge in data structures or algorithms

Expected goals
To practice problem solving using a computer
To design and implement data structures for real-world
problems
To design and analyze algorithms for problem solving
To design, use, andIISToptimize
database systems for your
AV 482: Data Structures and DBMS
7/26/2016
applications
July-November 2016

Course resources
Text books, Lecture Slides, lecture notes
All slides will be provided through course website
Honor code will be required for electronic content

Online resources (whereever applicable)


Course website
https://172.20.14.51/
Self enrollment will be enabled
Key: Will be provided.
Try self-enrollment and if there are issues, contact me

Teaching Assistant
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

To be announced (sometimes not allocated)

Tentative Grading
Q1+Q2: 30%
Homework/Programming Assignment: 30%
Weekly homework
2-4 programming projects
Real-world projects/Challenge projects (Optional)

Finals: 40%
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

Programming Projects
Multiple programming projects
3-4 Small Programming Projects during the course

Practicing the implementation of Data structures,


algorithms or Databases
All C/C++/Python based implementations
Those who are still to learn C/C++/Python, this is
another opportunity

No Writeup!!
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

Books/Materials for the course


A. Aho, J. E. Hopcroft, and J. D. Ullman, Data
Structures and Algorithms, Addison-Wesley, 1999.
Mark Allen Weiss, Data Structures and Algorithm
Analysis in C, 2nd edition, Pearson Education, 1997.
Lecture Notes from IISc Bangalore
El Masri and Navathe, Fundamentals of DBMS, 4th
Edition, Pearson/Addison-Wesley.
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

Tentative Syllabus
Data structures, algorithms, and complexity analysis
Data Types, ADTs, Various types of ADTs such as List,
Set Ques, circular queue, trees, graphs etc
2-3 tree, red-black trees, binary trees, search trees, nary trees,
Graph traversals, searching on graph, BFS, DFS,
Spanning Tree, Minimum Spanning Tree, paths,
shortest paths, TSP
Binary heap, binomial and fibonacci heaps, skip lists,
Hashing, universal hashing,
Algorithm design: greedy, divide and conquer, dynamic
programming, branch and bound, randomized
algorithms
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

Syllabus (continued)
Database System Architecture, Data abstraction, Data
independence, Data definition and Data manipulation
languages
Database models, Entity-Relationship model, Network
models, Object Oriented Data Models, Integrity constraints
Query languages: Relational algebra, relational calculus,
Structured Query languages
Relational Database design, Data dependency, normal forms,
query processing and optimization, evaluation of relational
algebra expressions, Join strategies
Storage strategies, indices, B-trees, hasing, concurrency
control
Object oriented databases, object relational databases, web
databases,
distributedIISTdatabases,
data
AV 482: Data Structures and
DBMS warehouse, data
7/26/2016
9
July-November 2016
mining

Running time of Algorithms

7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

10

Running Time of an algorithm


Time taken by a computer to execute an
algorithm
Typically a function of the input size (e.g. N)
Adding two numbers (N=2)
Adding k numbers (N=k)
Sorting N numbers

When an algorithm takes fixed amount of time


irrespective of the input size
Fixed, constant, or O(1) time complex
7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

11

Time complexity analysis


Asymptotic notations
Used to represent time complexity, space
complexity, and growth rate
Help in estimating the time complexity of
algorithms in terms of the parameters of interest
Running time of an algorithm w.r.t the input size

Big Oh (O) notation


Time complexity of a function f(n) can be represented
as f(n) = O(g(n)) if and only if
There exists a positive real constant c > 0 and an integer
constant n0 1 such that f(n) c g(n) for every n n0

Big Theta () notation


IIST AV 482: Data Structures and DBMS
7/26/2016
Big Omega () notation
July-November 2016

12

Big-Oh notation
Running time

Examples

7n-2 is O(n)
2255 is O(1)
20n3+10n+5 is O(n3)
Axn+Bxn-1+Cxn-2++k is O(xn)

g(n)
f(n)

n0

Linear

Quadratic

Polynomial

Logarithmic

Exponential

O(n)

O(n2)

O(nk) (k 1)

O(log n)

O(kn) (k>1)

Sum rule

Product rule
7/26/2016

If f1(n) = O(g1(n)) and f2(n) = O(g2(n)) then f1(n)+f2(n) =


O(g1(n)+g2(n)) = O(Max[g1(n), g2(n)])
If f1(n) = O(g1(n)) and f2(n) = O(g2(n)) then f1(n)+f2(n) =
IIST AV 482: Data Structures and DBMS
O(g1(n)xg2(n))
July-November 2016

13

Dijkstras Shortest Path Algorithm: worst case time


complexity analysis
1 Initialization:
O(1)
2 N' = {u}
3 for all nodes v
if v adjacent to u
O(N) O(1) 4
O(1) 5
then D(v) = c(u,v)
O(1) 6
else D(v) =
7
8 Loop
O(N-1) 9 find k not in N' such that D(k) is a minimum
O(1) 10 add k to N'
11 update D(v) for all v adjacent to k and not in N' :
O(N-1)
D(v) = min( D(v), D(k) + c(k,v) )
O(1) 12
13 /* new cost to v is either old cost to v or known
O(N)
14 shortest path cost to k plus cost from k to v */
15 until all nodes in N'
O(1)+O(N)+ O(N)x [O(N-1)+O(1)+ O(N-1)xO(1)]
O(N)x [O(N-1)] = O(N2)
7/26/2016

IIST AV 482: Data Structures and

14

A comparison of Time Complexity


Comparison between two Algorithms A and B:
Running Time of Algorithm A: 5000N
Running Time of Algorithm B: 2N2

7/26/2016

Input Size

Algorithm A (O(N))

Algorithm B (O(N2))

5,000N

2xN2

10

50,000

200

100

500,000

20,000

1,000

5,000,000

2,000,000

1,000,000

5x109

2x1012

IIST AV 482: Data Structures and DBMS


July-November 2016

15

We covered
Course overview
Time complexity representation
Big Oh(.)

7/26/2016

IIST AV 482: Data Structures and DBMS


July-November 2016

16

Você também pode gostar