 Analysis Wrap-up. What is analysis?  Look at an algorithm and determine:  How much time it takes  How much space it takes  How much programming.

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

Greedy Algorithms.
Introduction to Algorithms Greedy Algorithms
CSCE 411H Design and Analysis of Algorithms Set 8: Greedy Algorithms Prof. Evdokia Nikolova* Spring 2013 CSCE 411H, Spring 2013: Set 8 1 * Slides adapted.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
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)
1 CSC 421: Algorithm Design & Analysis Spring 2013 See online syllabus: (also on BlueLine2) Course.
Midterm 2 Overview Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Greedy Algorithms. 2 2 A short list of categories Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Chapter 9: Greedy Algorithms The Design and Analysis of Algorithms.
CS333/ Topic 11 CS333 - Introduction CS333 - Introduction General information Goals.
Chapter 10: Algorithm Design Techniques
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 1 Introduction/Overview Wed. 9/5/01.
Minimum Spanning Network: Brute Force Solution
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Recurrences / HW: 2.4 Quiz: 2.1, 4.1, 4.2, 5.2, 7.3, 7.4 Midterm: 8 given a recursive algorithm, state the recurrence solve a recurrence, using Master.
Data Structures, Spring 2004 © L. Joskowicz 1 DAST – Final Lecture Summary and overview What we have learned. Why it is important. What next.
Two Discrete Optimization Problems Problem #2: The Minimum Cost Spanning Tree Problem.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
TK3043 Analysis and Design of Algorithms Introduction to Algorithms.
Analysis and Design of Algorithms An algorithm is a method of solving problem (on a computer) Problem example: –given a set of points on the plane –find.
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.
Genetic Algorithms and Ant Colony Optimisation
Bold Stroke January 13, 2003 Advanced Algorithms CS 539/441 OR In Search Of Efficient General Solutions Joe Hoffert
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
1 Converting Categories to Numbers for Approximate Nearest Neighbor Search 嘉義大學資工系 郭煌政 2004/10/20.
10/20/20151 CS 3343: Analysis of Algorithms Review for final.
CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.
알고리즘 설계 및 분석 Foundations of Algorithm 유관우. Digital Media Lab. 2 Chap4. Greedy Approach Grabs data items in sequence, each time with “best” choice, without.
December 4, Algorithms and Data Structures Lecture XV Simonas Šaltenis Aalborg University
1 CPSC 320: Intermediate Algorithm Design and Analysis July 9, 2014.
For Wednesday No reading No homework There will be homework for Friday, as well the program being due – plan ahead.
Honors Track: Competitive Programming & Problem Solving Optimization Problems Kevin Verbeek.
CSE373: Data Structures & Algorithms Lecture 22: The P vs. NP question, NP-Completeness Lauren Milne Summer 2015.
1 Genetic Algorithms and Ant Colony Optimisation.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
1 BIM304: Algorithm Design Time: Friday 9-12am Location: B4 Instructor: Cuneyt Akinlar Grading –2 Midterms – 20% and 30% respectively –Final – 30% –Projects.
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
Types of Algorithms. 2 Algorithm classification Algorithms that use a similar problem-solving approach can be grouped together We’ll talk about a classification.
1 Greedy Technique Constructs a solution to an optimization problem piece by piece through a sequence of choices that are: b feasible b locally optimal.
CSE 340: Review (at last!) Measuring The Complexity Complexity is a function of the size of the input O() Ω() Θ() Complexity Analysis “same order” Order.
CSE 326 Course Review David Kaplan Dept of Computer Science & Engineering Autumn 2001.
CES 512 Theory of Software Systems B. Ravikumar (Ravi) Office: 141 Darwin Hall Course Web site:
CES 592 Theory of Software Systems B. Ravikumar (Ravi) Office: 124 Darwin Hall.
Design and Analysis of Algorithms Introduction Instructors:1. B V Kiran Mayee, 2. A Madhavi
Course Review Fundamental Structures of Computer Science Margaret Reid-Miller 28 April 2005.
Team assignments in CS 322 “Data Structures & Algorithms II” Jey Veerasamy CIS Adjunct Faculty Baker College Online.
Approximation Algorithms
Genetic Algorithms and TSP Thomas Jefferson Computer Research Project by Karl Leswing.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms.
Data Structures and Algorithms
TK3043 Analysis and Design of Algorithms
Data Structures Lab Algorithm Animation.
Chapter 1 Introduction Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Courtsey & Copyright: DESIGN AND ANALYSIS OF ALGORITHMS Courtsey & Copyright:
Data Structures and Algorithms
Introduction to Algorithms
OVERVIEW 1-st Midterm: 3 problems 2-nd Midterm 3 problems
Advanced Analysis of Algorithms
Multi-Objective Optimization
Add Heuristic a b C D E Switch Cost
Design & Analysis of Algorithms Combinatorial optimization
Chapter 1 Introduction Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Presentation transcript:

 Analysis Wrap-up

What is analysis?  Look at an algorithm and determine:  How much time it takes  How much space it takes  How much programming manpower it takes  Choose wisely between multiple correct solutions

Problem-Solving  Brute Force  Iterate  Divide-and-Conquer  Greedy  Dynamic Programming

Model the world  Arrays & Linked Lists  Stacks & Queues  Priority Queues & Heaps  Graphs & Trees  Binary Search Trees  Hash tables

Famous (Efficient) Algorithms  Binary Search  Find the median  Sort  Graph Search  Topological Sort  Shortest Path  Minimum Spanning Trees  Knapsack Problem  Huffman’s Encoding

The Point  Know your problem-solving tools  Be able to choose the right tool for the job  Know the limits of your tools…

Back to Theory  Sets: NP, P, NP-Complete  Prove NP-Complete through reduction proofs.  But: some things are uncomputable, and this is different from NP-Complete.

What Next?  What do you do when you need to solve an NP-Complete problem?  Redefine the problem  Approximate a solution  Use AI techniques!

Intelligent Search  If I have to use brute force, I want to do it smartly.  Heuristics!  Add a “good enough” threshold so you can stop searching when you find an approximate solution.  One such technique is Genetic Algorithms…

Genetic Algorithms  Inspired by biology/evolution  Start with a random sample of possible solutions  Fitness Function: test how good each solution is  Make new solutions:  Make a small mutation to an existing solution  Cross-breed 2 existing solutions  Keep best solutions and discard the rest.  Iterate until you run out of time

Example: TSP  Trying to visit 5 cities: A, B, C, D, E  Randomly make some possible paths: BDECA, ABCED, …  Try them. Fitness Function?  Mutate: BD ECA -> DB ECA  Crossover: BD ECA + A B CE D = BDACE (First 2 of the first parent and rest of ordering from 2 nd parent.)

TSP Example: 30 Cities

Solution i (Distance = 941)

Solution j (Distance = 800)

Solution k (Distance = 652)

Best Solution (Distance = 420)

Overview of Performance