Sie sind auf Seite 1von 16

DATA STRUCTURES

AND
ALGORITHMS
Syllabus
Administrative Information
2
Catalog Description:
Introduction to Data structure and
algorithms.
Analysis of algorithms.
Abstract data structures and their
implementations: list, stack, queue hashing.
Tree structures: binary trees, AVL trees,
priority queues.
Tree traversal algorithms.
Graphs and algorithms: shortest paths,
minimum spanning trees.
Sorting algorithms.
3
Educational Objectives:
This course aims to introduce you some basic
data structures and algorithms which are to
be used as tools in designing solutions to
problems. You will become familiar with the
specification, usage, implementation and
analysis of these data structures and
algorithms. By the end of this course you
should be able to :
Design algorithms to solve real-life
problems using the tools introduced,
Analyze your solution,
Efficiently implement your solution.
4
Books
Textbook:
Elliot Koffman, Paul Wolfgang, Objects,
Abstraction, Data Structures and Design Using
C++, Wiley, 2005.
Other Books:
M. A. Weiss, Data Structures and Algorithm
Analysis in C++, Addison Wesley, 2006.
Cormen, Leiserton, Rivest, Introduction to
Algorithms, MIT Press, 2001.
Sahni, Data Structures, Algorithms and
Applications in C++, McGraw-Hill, 1998.
Horowitz, Sahni, Rajasekaran, Computer
Algorithms, Computer Science Press, 1998.
5
Grading Policy:
10% Projects
40% Final Exam
40% 2 Midterm Exams
10% Homeworks
If your Midterm and Final average is less than 40 out of
100, your letter grade might be less that what your overall
average suggests.
If your Midterm and Final average is less than 20 out of
100, you will get a grade of F whatever your overall
average is.
6
Attendance Policy:
Class attendance is mandatory. You will not be able to
take the final exam if you miss more than 4 classes.
You are responsible for all material covered in class, even
when you arent there!
Attendance for tests and the final exam is mandatory. If it
is impossible for you to be present for a scheduled test or
exam, you must let us know BEFORE the test, so a
make-up test can be scheduled.
Please be considerate of your classmates during class.
Students are expected to show courtesy and respect toward their
classmates.
Please do not carry on side discussions with other students during
lecture time
When you have a question, please raise your hand and ask the
question so that everyone may benefit from it.
Please try to make sure that your cellular phone and/or pager does
not interrupt during lecture time, and especially during test time.
7
Homeworks:
Homework assignments will be announced through our web site.
All homeworks should be submitted on paper before the specified deadline.
You should also submit programming questions electronically before
midnight of the deadline day.
Late homework assignments will not be accepted.
You should submit at least 80% of the homeworks and collect at least 40
out of 100 from the homeworks. Otherwise, you will automatically fail.
Homeworks will be graded by Teaching Assistants. Assignments will be
graded on the basis of
correctness,
quality of design,
documentation, and
style.
Programming will be done using C++ programming language
8
Honor Code:
Unless stated otherwise, all homeworks are individual
assignments and are expected to be your own work.
TAKE PRIDE IN THE WORK YOU DO!!! DON'T CHEAT.
You may seek help in identifying syntax and run-time errors
and engage in general discussions regarding the solutions,
But giving and receiving major sections of code will be
considering cheating
All parties (giving or receiving) will be punished
At least they will get -100 grade.
9
Tentative Schedule:
MIDTERM I 8
Hashing
Hash Function
Collision
Separate Chaining
Open Addressing
Rehashing
7
Trees
AVL Trees
Tree Traversals
6
Trees
Binary Trees
Binary Search Trees
5
Stacks and Queues
ADTs
Implementations
Applications
4
Link Lists
ADT
Implementations
3
Algorithm Analysis
Notations: O (.), Omega, Teta, o (.)
Algorithm analysis rules with example: maximum subsequence problem
2
Software Engineering 1
Topics Week
10
Sorting
Problem Definition
Insertion Sort
Shellsort
14
MIDTERM II 13
Sorting
Heap Sort
Mergesort
Quick Sort
Bucket Sort
12
Graphs Algorithms
Graph Data Structures and Related Definitions
Topological Sort
Shortest Path Problem (Dijkstra Algorithm)
Minimum Spanning Tree (Prim`s and Kruskal Algs)
11
Priority Queues
d-Heaps
Leftist Heaps
10
Priority Queues
Model and implementations
Binary Heap
Applications
9
Tentative Schedule:
11
What is a Data Structure ?
Definition :
A representation and organization of data
representation
data can be stored variously according to their type
signed, unsigned, etc.
example : integer representation in memory
organization
the way of storing data changes according to the organization
ordered, inordered, tree
example : if you have more then one integer ?
12
Properties of a Data Structure ?
Efficient utilization of medium
Efficient algorithms for
creation
manipulation (insertion/deletion)
data retrieval (Find)
A well-designed data structure use less
resources
Computational: execution time
Spatial: memory space
13
What is An Algorithm ?
Definition :
A finite, clearly specified sequence of
instructions to be followed to solve a
problem.
14
What is An Algorithm ?
int Sum (int N)
PartialSum 0
i 1
foreach (i > 0) and (i<=N)
PartialSum PartialSum +
(i*i*i)
increase i with 1
return value of PartialSum
int Sum (int N)
{
int PartialSum = 0 ;
for (int i=1; i<=N; i++)
PartialSum += i * i * i;
return PartialSum;
}
Problem : Write an algorithm to calculate

=
N
i
i
1
3
15
Properties of an Algorithm
Effectiveness
simple
can be carried out by pen and paper
Definiteness
clear
meaning is unique
Correctness
give the right answer for all possible cases
Finiteness
stop in reasonable time
16
The Process of Algorithm Development
Design
divide&conquer, greedy, dynamic
programming
Validation
check whether it is correct
Analysis
determine the properties of algorithm
Implementation
Testing
check whether it works for all possible cases

Das könnte Ihnen auch gefallen