+ 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:

Slides:



Advertisements
Similar presentations
David Luebke 1 6/7/2014 CS 332: Algorithms Skip Lists Introduction to Hashing.
Advertisements

CS Section 600 CS Section 002 Dr. Angela Guercio Spring 2010.
CS 206 Introduction to Computer Science II 02 / 27 / 2009 Instructor: Michael Eckmann.
Greedy Algorithms.
AVL Trees1 Part-F2 AVL Trees v z. AVL Trees2 AVL Tree Definition (§ 9.2) AVL trees are balanced. An AVL Tree is a binary search tree such that.
Dynamic Programming.
CSE 373 Graphs 1: Concepts, Depth/Breadth-First Search
MAX FLOW APPLICATIONS CS302, Spring 2013 David Kauchak.
Design and Analysis of Algorithms Maria-Florina (Nina) Balcan Lecture 1, Jan. 14 th 2011.
CSCE 210 Data Structures and Algorithms
CS 206 Introduction to Computer Science II 10 / 14 / 2009 Instructor: Michael Eckmann.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
CS 206 Introduction to Computer Science II 11 / 05 / 2008 Instructor: Michael Eckmann.
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.
Two Discrete Optimization Problems Problem #2: The Minimum Cost Spanning Tree Problem.
Recursion Chapter 7. Chapter 7: Recursion2 Chapter Objectives To understand how to think recursively To learn how to trace a recursive method To learn.
1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter.
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.
MAX FLOW CS302, Spring 2013 David Kauchak. Admin.
1 Decrease-and-Conquer Approach Lecture 06 ITS033 – Programming & Algorithms Asst. Prof. Dr. Bunyarit Uyyanonvara IT Program, Image and Vision Computing.
Recursion Chapter 7. Chapter Objectives  To understand how to think recursively  To learn how to trace a recursive method  To learn how to write recursive.
Course Web Page Most information about the course (including the syllabus) will be posted on the course wiki:
10/20/20151 CS 3343: Analysis of Algorithms Review for final.
CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.
LARGE MARGIN CLASSIFIERS David Kauchak CS 451 – Fall 2013.
INTRODUCTION. What is an algorithm? What is a Problem?
December 4, Algorithms and Data Structures Lecture XV Simonas Šaltenis Aalborg University
CS Data Structures II Review & Final Exam. 2 Topics Review Final Exam.
Greedy algorithms David Kauchak cs161 Summer 2009.
Search by partial solutions.  nodes are partial or complete states  graphs are DAGs (may be trees) source (root) is empty state sinks (leaves) are complete.
MA/CSSE 473 Day 28 Dynamic Programming Binomial Coefficients Warshall's algorithm Student questions?
+ 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,
Dynamic Programming David Kauchak cs302 Spring 2013.
MAX FLOW APPLICATIONS CS302, Spring 2012 David Kauchak.
CSE373: Data Structures & Algorithms Lecture 22: The P vs. NP question, NP-Completeness Lauren Milne Summer 2015.
Final Exam Review CS Total Points – 60 Points Writing Programs – 50 Points Tracing Algorithms, determining results, and drawing pictures – 50.
CS223 Advanced Data Structures and Algorithms 1 Review for Final Neil Tang 04/27/2010.
Provinci summer training 2010 June 17: Recursion and recursive decent parser June 24: Greedy algorithms and stable marriage July 1: Holiday July 8: Math.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Recurrences David Kauchak cs161 Summer Administrative Algorithms graded on efficiency! Be specific about the run times (e.g. log bases) Reminder:
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
1 BIM304: Algorithm Design Time: Friday 9-12am Location: B4 Instructor: Cuneyt Akinlar Grading –2 Midterms – 20% and 30% respectively –Final – 30% –Projects.
NP-Complete problems.
+ 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,
Dynamic Programming. Many problem can be solved by D&C – (in fact, D&C is a very powerful approach if you generalize it since MOST problems can be solved.
Course Review Fundamental Structures of Computer Science Margaret Reid-Miller 29 April 2004.
CS4710 Algorithms. What is an Algorithm? An algorithm is a procedure to perform some task. 1.General - applicable in a variety of situations 2.Step-by-step.
Design and Analysis of Algorithms (09 Credits / 5 hours per week) Sixth Semester: Computer Science & Engineering M.B.Chandak
Dynamic Programming David Kauchak cs161 Summer 2009.
CSE 340: Review (at last!) Measuring The Complexity Complexity is a function of the size of the input O() Ω() Θ() Complexity Analysis “same order” Order.
Week 15 – Wednesday.  What did we talk about last time?  Review up to Exam 1.
David Luebke 1 2/5/2016 CS 332: Algorithms Introduction to heapsort.
CES 592 Theory of Software Systems B. Ravikumar (Ravi) Office: 124 Darwin Hall.
Week 15 – Friday.  What did we talk about last time?  Student questions  Review up to Exam 2  Recursion  Binary trees  Heaps  Tries  B-trees.
Course Review Fundamental Structures of Computer Science Margaret Reid-Miller 28 April 2005.
Final Exam Review CS Total Points – 20 Points Writing Programs – 65 Points Tracing Algorithms, determining results, and drawing pictures – 50.
Graphs + Shortest Paths David Kauchak cs302 Spring 2013.
MA/CSSE 473 Day 16 Combinatorial Object Generation Permutations.
Amortized Analysis and Heaps Intro David Kauchak cs302 Spring 2013.
Main Index Contents 11 Main Index Contents Graph Categories Graph Categories Example of Digraph Example of Digraph Connectedness of Digraph Connectedness.
CS 116 Object Oriented Programming II Lecture 13 Acknowledgement: Contains materials provided by George Koutsogiannakis and Matt Bauer.
Graphs David Kauchak cs302 Spring Admin HW 12 and 13 (and likely 14) You can submit revised solutions to any problem you missed Also submit your.
1 COMP9007 – Algorithms Course page: + Blackboard link Lecturer: M.Reza Hoseiny M.Reza Hoseiny Level.
Data Structures and Algorithms
Summary of lectures Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture Slides Recurrence and Master Theorem (Chapter 4). Lecture Slides.
Data Structures and Algorithms
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
Presentation transcript:

+ 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: your book your notes the class notes ONLY these things Do NOT discuss it with anyone until after Sunday at 11:59pm

+ Test taking advice Read the questions carefully! Don’t spend too much time on any problem if you get stuck, move on and come back When you finish answering a question, reread the question and make sure that you answered everything the question asked Think about how you might be able to reuse an existing algorithm/approach Show your work (can’t give you partial credit if I can’ t figure out what went wrong) Don’t rely on the book/notes for conceptual things Do rely on the book for a run-time you may not remember, etc.

+ Where we’ve been 21 assignments 67 problems! 23 classes Number of slides? 1537!!! Hung out for: 27 hours

+ How far have we come… Describe the algorithm for a depth first search traversal Write a function f(a, b) which takes two character string arguments and returns a string containing only the characters found in both strings in the order of a. Write a version which is order N-squared and one which is order N. You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum in O(n) time. Write a routine in C for the above. Reverse a linked list Insert in a sorted linked list Write a function to find the depth of a binary tree

+ High-level approaches Algorithm tools Divide and conquer assume that we have a solver, but that can only solve sub- problems define the current problem with respect to smaller problems Key: sub-problems should be non-overlapping Dynamic programming Same as above Key difference: sub-problems are overlapping Once you have this recursive relationship: figure out the data structure to store sub-problem solutions work from bottom up (or memoize)

+ High-level approaches Algorithm tools cont. Greedy Same idea: most greedy problems can be solve using dynamic programming (but generally slower) Key difference: Can decide between overlapping sub-problems without having to calculate them (i.e. we can make a local decision) Flow Matching problems Numerical maximization/minimization problems

+ Data structures A data structure Stores data Supports access to/questions about data efficiently the different bias towards different actions No single best data structure Fast access/lookup? If keys are sequential: array If keys are non-sequential or non-numerical: hashtable Guaranteed run-time: balanced binary search tree Lots and lots of data: B-tree

+ Data structures Min/max? heap Fast insert/delete at positions? linked list Others stacks/queues extensible data structures disjoint sets

+ Graphs Graph types directed/undirected weighted/unweighted trees, DAGs cyclic connected Algorithms connectedness contains a cycle traversal dfs bfs

+ Graphs Graph algorithms cont. minimum spanning trees shortest paths single source all pairs topological sort flow

+ Other topics… NP-completeness proving NP-completeness reductions