Problems and Algorithms

Slides:



Advertisements
Similar presentations
College of Information Technology & Design
Advertisements

1. Find the cost of each of the following using the Nearest Neighbor Algorithm. a)Start at Vertex M.
Solving IPs – Cutting Plane Algorithm General Idea: Begin by solving the LP relaxation of the IP problem. If the LP relaxation results in an integer solution,
The Management Science Approach
Chapter 7 Graph Theory 7.1 Modeling with graphs and finding Euler circuits. Learning Objectives: Know how to use graphs as models and how to determine.
CS0007: Introduction to Computer Programming Array Algorithms.
Classic Math Problems with Distance, Rate, and Time
CPSC 171 Introduction to Computer Science More Efficiency of Algorithms.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Text Chapters 1, 2. Sorting ä Sorting Problem: ä Input: A sequence of n numbers ä Output: A permutation (reordering) of the input sequence such that:
1. The Role of the Algorithms in Computer Hsu, Lih-Hsing
Lecture 6 Divide and Conquer for Nearest Neighbor Problem Shang-Hua Teng.
Lecture 20: April 12 Introduction to Randomized Algorithms and the Probabilistic Method.
14.1 Statistics and Line Plots CORD Math Mrs. Spitz Spring 2007.
VAVLPVCTYMAUS PSABLADDERZSB EBSANTESHTICL RLDUDSKTTVSRA EDEARCENEAUOD CRFNORSASINTD TPEUUOCPTDATP UNRTMTRBEEXME MIEUSUULSNSNN USNMEMNISAIIT AESXSVPENNISI.
QPLNHTURBIOTS CADAIASOINCOS OSTPOSTLGVAGT AJRLFKLEROUEA CLARITYSOLSTB HTEAMVSRUVAHI INTERACTPELEL NAPKSOCIALIRI GSOCIOGRAMTST CONFORMITYYTY 14 WORDS ANSWERS.
1. The Role of the Algorithms in Computer Algorithms – 1/2 Algorithm: Any well-defined computation procedure that takes some value, or set of values,
7.5 SKM & PP 1 Systems of Equations. 7.5 SKM & PP 2 Word Problem Basics IDENTIFY your VARIABLES Write a COMPLETE SYSTEM Algebraically SOLVE the SYSTEM.
Chapter Algorithms 3.2 The Growth of Functions 3.3 Complexity of Algorithms 3.4 The Integers and Division 3.5 Primes and Greatest Common Divisors.
1 Dijkstra’s Algorithm Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
EXAMPLE 4 Solve a multi-step problem A business rents in-line skates and bicycles. During one day, the business has a total of 25 rentals and collects.
ALGORITHMS.
Example 3 In parts of New York City, the blocks between streets are called short blocks. There are 20 short blocks per mile. Blocks between avenues are.
Chapter 1. The Role of the Algorithms in Computer.
Edge as Integration Main Bicycle line Edge as Integration.
What does a “solution” look like? So, what’s the solution here?
Arnold Aerial Advertising can help you to Maximize your Marketing Campaign. The impact of airplane aerial advertising can deliver your aerial message.
Dynamic Programming - DP December 18, 2014 Operation Research -RG 753.
MAT 110 Workshop Created by Michael Brown, Haden McDonald & Myra Bentley for use by the Center for Academic Support.
Introduction to Computing Science and Programming I
Introduction Creating equations from context is important since most real-world scenarios do not involve the equations being given. An equation is a mathematical.
Sequences, Series, and Probability
FLOWCHARTS Part 1.
نظام التعليم المطور للانتساب
MA/CSSE 473 Day 13 Finish Topological Sort Permutation Generation
Computer Science Programming Chapter 1, Sections
Acceleration Physical Science.
Selection Structures (Part 1)
Functions CIS 40 – Introduction to Programming in Python
ALGORITHMS & FLOWCHARTING II
Topological Sort (topological order)
Lecture 2 Introduction to Computer Science (continued)
Introduction Creating equations from context is important since most real-world scenarios do not involve the equations being given. An equation is a mathematical.
The mileage of a certain car can be approximated by:
Maximum Flow Problem flow capacity Actual flow  capacity
Route Optimization Problems and Google Maps
Data Structures Review Session
Medians and Order Statistics
Advanced Analysis of Algorithms
Velocity and Acceleration
Algorithm Discovery and Design
Real-Time Airport Status Arrival/Departure Delays
Lesson 8-6 Solving Systems of Linear Equations by Graphing
Approximation Algorithms
Introduction to Structured Programming
4. Computational Problem Solving
Homework 0: Overview CSE 409R.
Solving Equations.
Gaming with conditionals
Nested If Statements While Loops
Getting to Know You.
POWER CHALLENGES Several Ways To Solve 7 CHALLENGES.
I believe the reason students have difficulty learning algebra and that most people have trouble doing math word problems is that although children are.
2.1 Using Problem Solving Strategies and Models
The Neighborhood Veto And Its Discontents.
2.1 Using Problem Solving Strategies and Models
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Data Structures and Algorithms
Analysis of Algorithms CS 477/677
Steps for Solving an Equations: Topic: Solving Complex Equations
Presentation transcript:

Problems and Algorithms Introduction to: Problem Algorithms Complexity

Problem: Get to NYC Need to travel from the Jersey Shore to New York City How would you do this?

Algorithm (Step-by-Step Solution) Drive in a car from Jersey shore to Miami Drive from Miami to Los Angeles Drive from Los Angeles to San Francisco Drive From San Francisco to New York Analysis Will this algorithm solve the problem? Is this a good algorithm to use? Best way? Gas? Toll? Mileage? Time?

Problem: Go from Jersey to San Fran Some choices for algorithms Walk the entire way Drive by car the entire way Drive to the nearest airport, fly to the nearest airport to San Fran, the rent a car and drive again

Problem: Go from class to the Gym Go from this classroom to the Gym

Algorithm: To get to the Gym Drive a car? Take a plane? Walk? Analysis: If planes are faster than cars, should you solve all travel problems by using a plane? Know how to use planes, cars, bicycles, and walk and use your head.

Problem: Find Max Instance: A collection of numbers Problem: Print out the maximum number of all numbers

Algorithm for Find Max Algorithm: Sort all the numbers Print out A[n-1] Analysis of the algorithm: How do we sort the numbers? How long does this take. Printing out the answer is simply the time it takes to print.

Algorithm for Find Max (cont) Suppose we sort the number by repeatedly Taking all permutations of the numbers Check if this is correctly sorted Stop if it is sorted Analysis of the algorithm How many permutations are there? N! 20! = 2.43 X 10^18 On a 1 gig processor would take approx. 76 years.

Better algorithm for Find Max? Suggestions? Best possible algorithm (a.k.a. Completeness) How do you know someone else will not come along later and come up with a better algorithm

Problem: Skyline Silhouette Instance: A collection of rectangular building (heights and widths) Problem: Print out the silhouette of the skyline from one point of view.

Skyline input and output building one     left 3 right 7 height 4 building two     left 11 right 20 height 8 building three   left 15 right 29 height 3          **********          *        *          *        *          *        *  *****   *        *  *   *   *   ***************  *   *   *   *    *         *  *   *   *   *    *        * ===============================  3   7   11   15 20     29      <---- left/right edge positions   The output should be the points (3, 0) (3, 4) (7, 4) (7, 0) (11, 0) (11, 8) (20, 8) (20, 3) (29, 3)  (29, 0)

Algorithm for Skyline problem Hints: Sort the building in some order Move buildings from one data structure to another Have a data structure that can always find the max and anytime