120 likes | 369 Views
Data Structures 資料結構. Instructor: 顏嗣鈞 E-mail: yen@cc.ee.ntu.edu.tw Web: http://www.ee.ntu.edu.tw/~yen Time: 9:10-12:00 AM, Thursday Place: EE 106 Office hours: by appointment Class web page: http://www.ee.ntu.edu.tw/~yen/courses/ds03.html. PREREQUISITES.
E N D
Data Structures 資料結構
Instructor: 顏嗣鈞 E-mail: yen@cc.ee.ntu.edu.tw Web: http://www.ee.ntu.edu.tw/~yen Time: 9:10-12:00 AM, Thursday Place: EE 106 Office hours: by appointment Class web page: http://www.ee.ntu.edu.tw/~yen/courses/ds03.html
PREREQUISITES Familiarity in PASCAL, C, C++, or JAVA.
Required textbook: Data Structures & Algorithm Analysis in C++(2nd Ed.), Mark Weiss, Addison Wesley.
TOPICS lPRELIMINARIES: Introduction. Algorithm analysis. lABSTRACT DATA TYPES: Stacks. Queues. Lists. List operations. List representations. List traversals. Doubly linked lists. lTREES: Tree operations. Tree representations. Tree traversals. Threaded trees. Binary trees. AVL trees. 2-3 trees. B-trees. Red-black trees. Binomial trees. Splay trees, and more. lHASHING: Chaining. Open addressing. Collision handling. lPRIORITY QUEUES: Binary heaps. Binomial heaps. Fibonacci heaps. Min-max heaps. Leftist heaps. Skew heaps. lSORTING: Insertion sort. Selection sort. Quicksort. Heapsort. Mergesort. Shellsort. Lower bound of sorting. lDISJOINT SETS: Set operations. Set representations. Union-find. Path compression. lGRAPHS: Graph operations. Graph representations. Basic graph algorithms. lAMORTIZED ANALYSIS. Binomial heaps, Skew heaps. Fibonacci heaps. lADVANCED DATA STRUCTURES: Tries. Top-down splay trees, and more.
Grading Homework + Prog. Assignments 25% Midterm exam.: 35% Final exam.: 40%
Goal • Learn to write efficient and elegant software • How to choose between two algorithms • Which to use? bubble-sort, insertion-sort, merge-sort • How to choose appropriate data structures • Which to use? array, vector, linked list, binary tree
Why should you care? • Complex data structures and algorithms are used in every real program • Data compression uses trees: MP3, Gif, etc… • Networking uses graphs: Routers and telephone networks • Security uses complex math algorithms: GCD and large decimals • Operating systems use queues and stacks: Scheduling and recursion • Many problems can only be solved using complex data structures and algorithms
What this course is NOT about • This course is not about C++ • Although we will use C++ to implement some of the concepts • This course is not about MATH • Although we will use math to formalize many of the concepts • Competency in both math and C++ is therefore welcomed. • C++: inheritance, overloading, overriding, files, linked-lists, multi-dimensional arrays • Math: polynomials, logarithms, inductive proofs, logic
The Big Idea • Definition of Abstract Data Type • A collection of data along with specific operations that manipulate that data • Has nothing to do with a programming language! • Two fundamental goals of algorithm analysis • Correctness: Prove that a program works as expected • Efficiency: Characterize the run-time of an algorithm
The Big Idea • Alternative goals of algorithm analysis • Characterize the amount of memory required • Characterize the size of a programs code • Characterize the readability of a program • Characterize the robustness of a program