Course Review 15-211 Fundamental Structures of Computer Science Margaret Reid-Miller 29 April 2004.

Slides:



Advertisements
Similar presentations
EECS 4101/5101 Prof. Andy Mirzaian. Lists Move-to-Front Search Trees Binary Search Trees Multi-Way Search Trees B-trees Splay Trees Trees Red-Black.
Advertisements

Greedy Algorithms Amihood Amir Bar-Ilan University.
22C:19 Discrete Structures Trees Spring 2014 Sukumar Ghosh.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Analysis & Design of Algorithms (CSCE 321)
Jan Welcome to the Course of Advanced Algorithm Design (ACS-7101/3)
CSCE 210 Data Structures and Algorithms
Midterm 2 Overview Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
CS 206 Introduction to Computer Science II 04 / 29 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 12 / 10 / 2008 Instructor: Michael Eckmann.
1 Final (important!) details: Uphead & Downheap Java details see code provided for practical 9.
EE 220 (Data Structures and Analysis of Algorithms) Instructor: Saswati Sarkar T.A. Prasanna Chaporkar, Programming.
Data Structures, Spring 2004 © L. Joskowicz 1 DAST – Final Lecture Summary and overview What we have learned. Why it is important. What next.
The Design and Analysis of Algorithms
CSE 220 (Data Structures and Analysis of Algorithms) Instructor: Saswati Sarkar T.A. Dimosthenes Anthomelidis
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
EXAM REVIEW CSC 172 SPRING 2004 LECTURE 26. Want to TA for next semester?
Instructor: Dr. Sahar Shabanah Fall Lectures ST, 9:30 pm-11:00 pm Text book: M. T. Goodrich and R. Tamassia, “Data Structures and Algorithms in.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
CS223 Algorithms D-Term 2013 Instructor: Mohamed Eltabakh WPI, CS Introduction Slide 1.
CSCE350 Algorithms and Data Structure Lecture 17 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
Lecture 10: Class Review Dr John Levine Algorithms and Complexity March 13th 2006.
Midterm Review CSE 2011 Winter October 2015.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Course Review Midterm.
10/20/20151 CS 3343: Analysis of Algorithms Review for final.
Review for Final Andy Wang Data Structures, Algorithms, and Generic Programming.
+ Review CS302 Spring 2013 David Kauchak. + Admin Final posted on the course web page on Monday due Sunday at 11:59pm time-boxed (3-4 hours) You may use:
INTRODUCTION. What is an algorithm? What is a Problem?
CS Data Structures II Review & Final Exam. 2 Topics Review Final Exam.
Christopher Moh 2005 Competition Programming Analyzing and Solving problems.
CS 61B Data Structures and Programming Methodology July 21, 2008 David Sun.
+ David Kauchak cs312 Review. + Midterm Will be posted online this afternoon You will have 2 hours to take it watch your time! if you get stuck on a problem,
Review for Final Exam Non-cumulative, covers material since exam 2 Data structures covered: –Treaps –Hashing –Disjoint sets –Graphs For each of these data.
Week 10 - Friday.  What did we talk about last time?  Graph representations  Adjacency matrix  Adjacency lists  Depth first search.
Computer Sciences Department1.  Property 1: each node can have up to two successor nodes (children)  The predecessor node of a node is called its.
Midterm Review Fundamental Data Structures and Algorithms Margaret Reid-Miller 2 March 2004.
Course Info Instructor U.T. Nguyen Office: CSEB Office hours: Tuesday, 14:30-15:30 Thursday, 12:00-12:45 By.
Review I. Final exam Date TBD. Don ’ t be late! Open book, open notes No calculators or any electronics Worth 50% of final grade.
Data Structures and Algorithms in Java AlaaEddin 2012.
 Saturday, April 20, 8:30-11:00am in B9201  Similar in style to written midterm exam  May include (a little) coding on paper  About 1.5 times as long.
Course Review Fundamental Structures of Computer Science Margaret Reid-Miller 28 April 2005.
Principles of Imperative Computation Lecture 1 January 15 th, 2012.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
COMP 103 Course Review. 2 Menu  A final word on hash collisions in Open Addressing / Probing  Course Summary  What we have covered  What you should.
Course Review Fundamental Structures of Computer Science Ananda Guna May 04, 2006.
CSC 172 DATA STRUCTURES. MIDTERM REVIEW MIDTERM EXAM 75 min 6 – 10 questions a lot like the quiz questions.
Final Exam Review COP4530.
CSCE 210 Data Structures and Algorithms
Welcome to the Course of Advanced Algorithm Design
Data Structures and Algorithms
CSE 326: Data Structures: Advanced Topics
DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
Courtsey & Copyright: DESIGN AND ANALYSIS OF ALGORITHMS Courtsey & Copyright:
Cse 373 April 26th – Exam Review.
Data Structures and Algorithms
Review for Midterm Neil Tang 03/04/2010
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
Definition In simple terms, an algorithm is a series of instructions to solve a problem (complete a task) We focus on Deterministic Algorithms Under the.
Design and Analysis of Algorithms (07 Credits / 4 hours per week)
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
Final Exam Review COP4530.
CS 3343: Analysis of Algorithms
CMPT 438 Algorithms Instructor: Tina Tian.
CS 3343: Analysis of Algorithms
Design and Analysis of Algorithms (04 Credits / 4 hours per week)
COMP 122 – Design and Analysis of Algorithms
Presentation transcript:

Course Review Fundamental Structures of Computer Science Margaret Reid-Miller 29 April 2004

What was this course about? How to solve computing problems. Problem analysis, to abstract away details and divide into smaller subproblems. Mathematical foundations for precise formulations of problems and solutions. Data structures and algorithms to solve problems correctly and efficiently. Java programming and modular software construction for good implementations.

The science in CS Not “hacking”, but: Thinking about problems abstractly. Selecting good data structures and obtaining correct and fast algorithms. Implementing programs that are understandable and correct.

Topics Covered Simple list algorithms Solving simple recurrences Dictionaries: Binary trees, tries, hash tables Priority queues and binary heaps Data compression Sorting String matching

Topics Covered ctd.. Graphs Greedy algorithms Dynamic programming Game trees Client-server computing Equivalence relations and union find Computational geometry

Studying for the Final Exam Review all material first Lectures, programs, quizzes Do sample finals – under time restrictions Old Finals are in blackboard/assignments Types and difficulty of problems may be similar

List Algorithms List Interface Reversing a list rev(L) = L if |L|=1 rev(L) = append(first(L),rev(tail(L))) What is the complexity?

Solving Recurrences, Asymptotics Solve T(n) = 3 T(n/3) + 1 Prove the correctness By induction Or other methods Big-Oh, little-oh, Big-Omega, Theta

Binary Trees 1.Traverse the tree inorder 2.Do exactly two rotations so that the tree is balanced 3. Consider a binary tree of height h a.What are the max and min number of nodes? b.What are the max and min number of leaves? 4. Perfect, full, complete trees

AVL trees

Dictionaries

Hashing Describe why hashing a string to sum of its characters is not a good idea. Assume S = a 1 a 2 ….a n is a string Define H(S) =  a i 2 i-1 (i=1..n) Describe a way to efficiently calculate H(S)

Priority Queues and Heaps Suppose you implement a priority queue using following Unsorted array Linked list (smallest at front) Heap What is the complexity in each case for deleteMin insert

Binary heaps

Compression and Huffman’s

LZW compression

Data Compression Encode “I AM SAM SAM I AM SAM SAM” using Huffman compression LZW In each case calculate the compression ratio Is it possible to apply Huffman after applying LZW? If so apply Huffman to output generated by LZW above

Sorting and lower bounds

Sorting Insert the random set of numbers {10, 12, 5, 15, 8, 14,11,7} into a BST with AVL properties. Fred has suggested that he can sort a list using hash table. The idea is the following. Assume that there are n numbers in the set. He would find the max and min and create a hash table of size (max-min). Then Fred would simply run an iterator I from min to max and use the hash map H(I) = I mod (max-min) if I is in the set. He claims that this is a sorting algorithm of O(n). What can you tell Fred? Politely please.

String matching

Graphs What is breadth first traversal? What is depth first traversal? What data structures can be used to implement each one? Fred claims that if the degree of each node in an undirected graph of n nodes is (n-1), then graph has n(n- 1) edges. Can this statement be true?

Graphs

Greedy Algorithms Find the Shortest Path from Node 1 to every other node

Dynamic Programming Dependent subproblems, recursive solutions, memoizing, explicit tables. Knapsack Longest Common Subsequence Matrix Multiplication Floyd-Warshall-Kleene

Dynamic Programming Consider a sequence of n numbers, A = {a 1, a 2, a 3,..., a n }. A subsequence of a given sequence is just the given sequence with 0 or more of the elements removed. Let's find an algorithm that finds the subsequence, A' = {a i1, a i2, a i3,...a ik } of A that maximizes a i1 - a i2 + a i a ik (i.e. the sign alternates).

Game trees

Games 2-person, deterministic, complete information,... Backtracking MiniMax Alpha-beta pruning Heuristics, iterative deepening, move order, tricks,...

Client-Server Computing

Union-find

Computational Geometry

Points, lines, rays, line segments Intersection, turns Membership in region Jarvis' March Graham Scan Divide-and-Conquer (QuickHull,...) Lower Bound

Grades 1 “warmup”. 3 small homeworks. 3 large homeworks. 3 quizzes. Midterm exam. Final exam. TA discretion. 39 points. 50 points each. 100 points each. 20 points each. 125 points. 275 points. 50 points. SUBJECT TO CHANGE

Final Exam Tuesday, May 4, 5:30 – 8:30 pm McConomy (*not* in DH) Sugary stuff will be provided... Make sure not to be late.

Final Exam Closed book, no calculators, cell phones, pagers, IM, … You can bring 1 (one) page of notes.

Conclusion Review all material Do all sample quizzes and finals Good luck!!