Things you think computers are good at Calculations Processing Data Following Instructions Not making mistakes Doing the same thing many many times Searching.

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

CSED101 INTRODUCTION TO COMPUTING GREEDY APPROACH, DIVIDE AND CONQUER Hwanjo Yu.
2.3 Recursion do automated demo of towers of hanoi before class
Problem definition The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can.
Recursion Lecture 18: Nov 18.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
Text Chapters 1, 2. Sorting ä Sorting Problem: ä Input: A sequence of n numbers ä Output: A permutation (reordering) of the input sequence such that:
Chapter 2 Recursion: The Mirrors. © 2005 Pearson Addison-Wesley. All rights reserved2-2 Recursive Solutions Recursion is an extremely powerful problem-
Chapter 2: Algorithm Discovery and Design
New Mexico Computer Science For All Introduction to Algorithms Maureen Psaila-Dombrowski.
3-2 Solving Inequalities Using Addition or Subtraction
The Fundamentals: Algorithms, the Integers & Matrices.
1 Shortest Path Calculations in Graphs Prof. S. M. Lee Department of Computer Science.
Recursion Chapter 7 Copyright ©2012 by Pearson Education, Inc. All rights reserved.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved ADT Implementation:
1 Chapter 24 Developing Efficient Algorithms. 2 Executing Time Suppose two algorithms perform the same task such as search (linear search vs. binary search)
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition.
Invitation to Computer Science, Java Version, Second Edition.
Chapter 15: Advanced Topics: Introducing Data Structures and Recursion Visual Basic.NET Programming: From Problem Analysis to Program Design.
Data Structures & Algorithms Recursion and Trees Richard Newman.
By: Lokman Chan Recursive Algorithm Recursion Definition: A function that is define in terms of itself. Goal: Reduce the solution to.
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.
ALGORITHMS.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
Dynamic Programming.  Decomposes a problem into a series of sub- problems  Builds up correct solutions to larger and larger sub- problems  Examples.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Graphs and Paths Data Structures & Problem Solving Using JAVA Second Edition Mark Allen Weiss Chapter 14 © 2002 Addison Wesley.
UNIT 17 Recursion: Towers of Hanoi.
Recursion Chapter What is recursion? Recursion occurs when a method calls itself, either directly or indirectly. Used to solve difficult, repetitive.
Introduction to Algorithms: Brute-Force Algorithms.
Recursion Chapter 10 Carrano, Data Structures and Abstractions with Java, Second Edition, (c) 2007 Pearson Education, Inc. All rights reserved X.
Recursion Chapter 10 Slides by Steve Armstrong LeTourneau University Longview, TX  2007,  Prentice Hall.
1 Data Structures CSCI 132, Spring 2016 Notes 16 Tail Recursion.
Recursion To understand recursion, you first have to understand recursion.
Algorithm Analysis 1.
MA/CSSE 473 Day 15 Return Exam Student questions Towers of Hanoi
Introduction to Algorithms
Growth of Functions & Algorithms
Flow Charts Basic Flow Chart Symbols Few sample flowcharts Rules
Priority Queues Chuan-Ming Liu
Professor, Computer Science and Engineering Department
Unit 18: Computational Thinking
Games with Chance Other Search Algorithms
I206: Lecture 15: Graphs Marti Hearst Spring 2012.
My Country.
Copyright © Cengage Learning. All rights reserved.
Prepared by Chen & Po-Chuan 2016/03/29
Data Structures & Algorithms
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
Fundamentals of Programming
RET is funded by the National Science Foundation, grant # EEC
Discrete Mathematics CMP-101 Lecture 12 Sorting, Bubble Sort, Insertion Sort, Greedy Algorithms Abdul Hameed
Introduction to Algorithms and Programming
Implementation of neural gas on Cell Broadband Engine
The Hanoi Tower Problem
At least two sprites moving on the stage.
ITEC 2620M Introduction to Data Structures
Introduction to Algorithms
Lecture 3: Environs and Algorithms
Algorithm Design Methods
Puzzle A Puzzle B.
The N-Queens Problem Search The N-Queens Problem Most slides from Milos Hauskrecht.
Chapter 3 :Recursion © 2011 Pearson Addison-Wesley. All rights reserved.
Stefan Oßwald, Philipp Karkowski, Maren Bennewitz
DAA - Introduction Dr. Sashikala Mishra Associate Professor Department of Computer Engineering Hope Foundation’s INTERNATIONAL INSTITUTE OF INFORMATION.
Algorithms.
Recursive Thinking.
Alex Bolsoy, Jonathan Suggs, Casey Wenner
Presentation transcript:

Things you think computers are good at Calculations Processing Data Following Instructions Not making mistakes Doing the same thing many many times Searching Multitasking Worldwide communications Streaming video Storing Information Playing chess Word processing Solving algorithms Using electricity Editing graphics

Peter Denning’s article on Computation lists some of the things that computers find difficult to do in real time…. Entscheidungsproblem

The “3000 club” of problems includes… Finding the capacities of Internet links to avoid congestion Finding shortest shipping routes in a transportation system. Packing transistors on to a silicon wafer to minimize waste. Rendering a scene in a movie. Finding good algorithms for these problems is worth billions of dollars to the economy in resources not wasted by suboptimal solutions. (Denning PJ 2007)

Rucksack Problem (a well known computationally hard problem) 5 kg £5 12 kg £10 3 kg £3 10 kg £8 8 kg £12 Given a set of items, each with a cost and a value, determine the number of each item to include in a collection so that the total cost is less than some given cost and the total value is as large as possible. The problem is to fill the rucksack with no more than 20kg of weight, whilst giving the maximum value of the items possible,

Answer Put the yellow and the blue boxes into the rucksack only.

Simulations Multiplication of two numbers. Input – Process – Output sequence. Tower of Hanoi The rings from the left pole must be moved to the right pole. They must end up in the right order with the largest on the bottom and the smallest on the top. Once solved write down the moves they made then – write down the moves you would make for a four-peg towers of Hanoi puzzle. Finally – can you abstract the problem sufficiently to write a general algorithm (in words) for the problem…

Answers Finding a solution is not essential, the process of abstracting to a general algorithm is very useful if you can do it. However, it is useful to have looked at this sort of problem as an introduction to the problem- solving aspect of Computing. The TOH puzzle can be solved iteratively or recursively. Solutions are on the www (wikipedia) or (Plus magazine)