{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# notes - CS130 A Data S tructure and Algorithm s s Focus of...

This preview shows pages 1–10. Sign up to view the full content.

1 CS 130 A: Data Structures and Algorithms CS 130 A: Data Structures and Algorithms Focus of the course: Data structures and related algorithms Correctness and ( time and space ) complexity Prerequisites CS 20: stacks, queues, lists, binary search trees, … CS 40: functions, recurrenceequations, induction, … CS 60: C , C++ , and UNIX

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Course Organization Course Organization Grading: See courseweb page Policy: No late homeworks. Cheating and plagiaris: F grade and disciplinary actions Onlineinfo: Homepage: www.cs.ucsb.edu/~cs130a Email: Teaching assistants: Seecourseweb page
3 Introduction Introduction A famous quote: Program = Algorithm + Data Structure. All of you haveprogrammed; thus havealready been exposed to algorithms and data structure. Perhaps you didn't seethem as separateentities; Perhaps you saw data structures as simple programming constructs (provided by STL--standard templatelibrary). However, data structures are quitedistinct from algorithms, and very important in their own right.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Objectives Objectives Themain focus of this courseis to introduceyou to a systematic study of algorithms and data structure. Thetwo guiding principles of the courseare: abstraction and formal analysis. Abstraction: Wefocus on topics that arebroadly applicableto a variety of problems. Analysis: We want a formal way to compare two objects (data structures or algorithms). In particular, we will worry about "always correct"-ness, and worst-casebounds on time and memory (space).
5 Textbook Textbook Textbook for thecourseis: Data Structures and AlgorithmAnalysis in C++ by Mark Allen Weiss But I will usematerial fromother books and research papers, so the ultimatesourceshould bemy lectures.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Course Outline Course Outline C++ Review (Ch. 1) Algorithm Analysis (Ch. 2) Sets with insert/delete/member: Hashing (Ch. 5) Sets in general: Balanced search trees (Ch. 4 and 12.2) Sets with priority: Heaps, priority queues (Ch. 6) Graphs: Shortest-path algorithms (Ch. 9.1 – 9.3.2) Sets with disjoint union: Union/find trees (Ch. 8.1–8.5) Graphs: Minimum spanning trees (Ch. 9.5) Sorting (Ch. 7)
7 130a: Algorithm Analysis 130a: Algorithm Analysis Foundations of Algorithm Analysis and Data Structures. Analysis: How to predict an algorithm’s performance How well an algorithm scales up How to compare different algorithms for a problem Data Structures How to efficiently store, access, manage data Data structures effect algorithm’s performance

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Example Algorithms Example Algorithms Two algorithms for computing theFactorial Which oneis better? int factorial (int n) { if (n <= 1) return 1; else return n * factorial(n-1); } int factorial (int n) { if (n<=1) return 1; else { fact = 1; for (k=2; k<=n; k++) fact *= k; return fact; } }
9 Examples of famous algorithms Examples of famous algorithms Constructions of Euclid Newton's root finding Fast Fourier Transform Compression (Huffman, Lempel-Ziv, GIF, MPEG)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 56

notes - CS130 A Data S tructure and Algorithm s s Focus of...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online