当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

Analysis of Algorithms(PPT讲稿)Data Structures and Data Management

资源类别:文库,文档格式:PPT,文档页数:43,文件大小:1.72MB,团购合买
• Analysis of Algorithms – worst case time and space complexity • Data Structures – stack, queue, linked list, tree, priority queue, heap, hash, and graph, • Searching algorithms – binary and AVL search trees; • Sorting algorithms – merge sort, quick sort, bucket sort and radix sort; (Reduce some contents) • Graph – data structure, depth first search and breadth first search. (add some interesting contents). • shortest path.
点击下载完整版文档(PPT)

CS2468: Data Structures and Data Management Lecturer: Lusheng Wang · office:B6422 Phone:34429820 E-mail cswangl @cityu. edu. hk TA ( Assignment Marking and Tutorial) Chao shen chaoshen 2-c@my cityu. edu. hk, phone 3442 2546 ZichengZHAOshinaiderzhao@gmail.com Welcome to ask questions at any time The course Website: Canvas Some」 ava source code http:/inEt3.datastructures.net/download.html The course website Text Book: Michael T goodrich and roberto tamassia Data Structure and Algorithms in Java, John Wiley Sons, Inc. 5th Edition Stacks

CS2468: Data Structures and Data Management • Lecturer: Lusheng Wang • Office: B6422 • Phone: 3442 9820 • E-mail cswangl@cityu.edu.hk • TA (Assignment Marking and Tutorial) – Chao SHEN chaoshen2-c@my.cityu.edu.hk , Phone: 3442 2546 – Zicheng ZHAO shinaider.zhao@gmail.com Welcome to ask questions at ANY time. • The course Website: Canvas • Some Java Source code: http://net3.datastructures.net/download.html • The course Website: Text Book: Michael T. Goodrich and Roberto Tamassia, Data Structure and Algorithms in Java, John Wiley & Sons, Inc. 5th Edition Stacks 1

opicS to be covere Analysis of algorithms worst case time and space complexity Data structures stack, queue, linked list, tree, priority queue, heap, hash, and graph, Searching agorithms binary and avl search trees Sorting agorithms merge sort, quick sort, bucket sort and radix sort; (Reduce some contents Graph data structure depth first search and breadth first search ( add some interesting contents). shortest path Stacks 2

Topics to be covered • Analysis of Algorithms – worst case time and space complexity • Data Structures – stack, queue, linked list, tree, priority queue, heap, hash, and graph, • Searching algorithms – binary and AVL search trees; • Sorting algorithms – merge sort, quick sort, bucket sort and radix sort; (Reduce some contents) • Graph – data structure, depth first search and breadth first search. (add some interesting contents). • shortest path. Stacks 2

Why This Course? You will be able to evaluate the quality of program analysis of algorithms: Running time and memory space You will be able to write fast programs You will be able to solve new problems You will be able to give non-trivial methods to solve problems. (Your algorithm(program) will be faster than others. Stacks

Why This Course? • You will be able to evaluate the quality of a program (Analysis of Algorithms: Running time and memory space ) • You will be able to write fast programs • You will be able to solve new problems • You will be able to give non-trivial methods to solve problems. (Your algorithm (program) will be faster than others.) Stacks 3

Course evaluations · Course work:30% Final Exam: 70% Course Work Three assignments, 15% One quiz or lab test 3% One mid term exam 12% Stacks

Course Evaluations • Course work: 30% • Final Exam: 70% • Course Work: – Three assignments, 15% – One quiz or lab test 3% – One mid term exam 12% Stacks 4

OBL. Course Intended Learning Outcomes 1. Describe the functiona lity of a data structure as an abstract data type 2. Implement an abstract data type in a programming language 3. Implement and test data structures for common structures 4. Select an appropriate data structure from a given set of structures to solve a given problem 5. Design and implement data storage management with simple file structures Will be tested in quiz or assignment or midterm For each item you have to get 40%to pass

5 OBTL: Course Intended Learning Outcomes 1.Describe the functionality of a data structure as an abstract data type; 2.Implement an abstract data type in a programming language; 3.Implement and test data structures for common structures; 4.Select an appropriate data structure from a given set of structures to solve a given problem; 5.Design and implement data storage management with simple file structures. Will be tested in quiz or assignment or midterm. For each item, you have to get 40% to pass

Pre-requisites CS2360 Java Programming /or Not known java? Spend the rest of 8-10 days to study java Read textbook p1-p53 Design a class with two integers C1 and C2 and a method fo to calculate the average value of c1 and c2 If you cannot do that, you should worry Stacks 6

Pre-requisites: • CS2360 Java Programming /or • Not known java? – Spend the rest of 8-10 days to study Java. – Read textbook p1-p53 – Design a class with two integers C1 and C2 and a method f() to calculate the average value of c1 and c2. – If you cannot do that, you should worry… Stacks 6

Data structures a systematic way of organizing and accessing data No single data structure works well for ALl purposes Data stored operation on data Algorithms an effective method expressed as a finite list of well-defined instructions for calculating a function Algorithms are used for calculation, data processing and automated reasonIng In simple words an algorithm is a step-by-step procedure for calculations Stacks

• Data Structures – A systematic way of organizing and accessing data. --No single data structure works well for ALL purposes. – Data stored – operation on data • Algorithms – an effective method expressed as a finite list of well-defined instructions for calculating a function. – Algorithms are used for calculation, data processing, and automated reasoning. – In simple words an algorithm is a step-by-step procedure for calculations. Stacks 7

How to describe algorithm? Nature languages Chinese, english, etc Not accurate · Pseudo-code Codes close to computer languages Omits details that are not essential for human understanding Intended for human reading rather than machine reading Programs C/C++ programs, Java programs Pseudo-code is preferred Allow a well-trained programmer to be able to implement Stacks

How to describe algorithm? • Nature languages – Chinese, English, etc. – Not accurate. • Pseudo-code – Codes close to computer languages • Omits details that are not essential for human understanding – Intended for human reading rather than machine reading • Programs – C /C++ programs, Java programs. • Pseudo-code is preferred – Allow a well-trained programmer to be able to implement. – Allow an expert to be able to analyze the running time. Stacks 8

An Example of an algorithm Algorithm sorting(X, n Algorithm sorting(x, n) Input array X of n integers Input array X of n integers Output array X sorted in a non- Output array X sorted in a non- decreasing order ecreasing order for it0 to n-do forj←-计+ton-ldo for i fromo to n- do fori from i+l to n-1 do if (Xixlilthen if X/i is largerthan Xil S- swap(X/i,xn i/, return X return X lafter i-th round, the i-th smallest after i-th round, the i-th smallest number is at i-th position number is at i-th position Stacks

An Example of an Algorithm Algorithm sorting(X, n) Input array X of n integers Output array X sorted in a non￾decreasing order for i  0 to n − 1 do for j  i+1 to n-1 do if (X[i]>X[j])then { s=X[i]; X[i]=X[j]; X[j]=s; } return X // after i-th round, the i-th smallest number is at i-th position. Stacks 9 Algorithm sorting(X, n) Input array X of n integers Output array X sorted in a non￾decreasing order for i from 0 to n − 1 do for j from i+1 to n-1 do if X[i] is larger than X[j] swap(X[i], X[j]) return X // after i-th round, the i-th smallest number is at i-th position

Variables. Primitives a variable has its value a type is associated, E. g, int, boolean, float, long, etc A value is assigned to the variable The value is stored in the memory The size of the value is determined umbigously; 64 bit machine, int 8 bytes, double 8 bytes, etc Examples int y=50; char, ZA; Stacks

Variables, Primitives • A variable has its value – A type is associated, • E.g., int, boolean, float, long, etc. – A value is assigned to the variable • The value is stored in the memory • The size of the value is determined umbigously; 64 bit machine, int 8 bytes, double 8 bytes, etc – Examples • int x; • int y=50; • char c, z=‘A’; Stacks 10

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共43页,可试读15页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有