Algorithms Sept 4, 2006. Tuesday’s Lab You developed an algorithm Input – an 8 ½ x 11 inch piece of paper Audience – Fellow classmates Process – Instructions.

Slides:



Advertisements
Similar presentations
College of Information Technology & Design
Advertisements

Problem Solving and Algorithm Design
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Chapter 1 An Overview of Computers and Programming Languages.
Slides modified by Erin Chambers Problem Solving and Algorithm Design.
6-1 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer problem-solving process and relate it to Polya’s.
Problem Solving and Algorithm Design
Chapter 6 Problem Solving and Algorithm Design. 6-2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
Algorithms and Problem Solving-1 Algorithms and Problem Solving Mainly based on Chapter 6: “Problem Solving and Algorithm Design” from the Book: “Computer.
Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the five essential properties of an algorithm.
Chapter 10 What's The Plan?: Algorithmic Thinking.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS Dr. Zhizhang Shen Chapter 10: How to.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
CSE115/ENGR160 Discrete Mathematics 02/24/11 Ming-Hsuan Yang UC Merced 1.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Using Algorithms Copyright © 2008 by Helene G. Kershner.
Lecture 14 Go over midterm results Algorithms Efficiency More on prime numbers.
Algorithms and Problem Solving
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Chapter 6 Problem Solving and Algorithm Design Nell Dale John Lewis.
6-1 Problem Solving Problem solving is the act of finding a solution to a perplexing, distressing, vexing, or unsettled question.
Problem Solving and Algorithm Design
Design and Analysis of Algorithms
Sort an array - the selection sort algorithm. Selection Sort Selection sort a classic computer algorithm that is used to sort an array The selection sort.
Problem Solving and Algorithm Design. 2 Problem Solving Problem solving The act of finding a solution to a perplexing, distressing, vexing, or unsettled.
Introduction to problem solving. Introductory Discussion? What problems are you faced with daily? Do you think a computer can be designed to solve those.
Fundamentals of Algorithms MCS - 2 Lecture # 1
Some quotes…. I really hate this damned machine I wish that they would sell it. It never does quite what I want But only what I tell it. ~Anon These machines.
CS 1308 Computer Literacy and The Internet Software.
Introduction to Algorithms By Mr. Venkatadri. M. Two Phases of Programming A typical programming task can be divided into two phases: Problem solving.
Algorithms CS139 – Aug 30, Problem Solving Your roommate, who is taking CS139, is in a panic. He is worried that he might lose his financial aid.
Lecture 6 Problem Solving: Algorithm Design & Analysis.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Chapter 1: An Introduction to Control Structures Introduction to Programming with C++ Fourth Edition.
1 Section 2.1 Algorithms. 2 Algorithm A finite set of precise instructions for performing a computation or for solving a problem.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
What's The Plan? Algorithmic Thinking Step-by-step directions for whatever someone, or the computer, needs to do © 2004 Lawrence Snyder.
Data Structures Using C++ 2E
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
CS139 – Algorithm Development Aug 23, 2004 WELCOME!
A little hardware; a little software CS 139 – 08/29/07.
ALGORITHMS.
Chapter 10 Algorithmic Thinking. Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the.
Algorithms CS280 – 10/20/05. Announcement  Part 1 of project 2 due.  Read chapters 10, 7 for this unit  Tuesday we will also be in the classroom We.
Flowcharts C++ Lab. Algorithm An informal definition of an algorithm is: a step-by-step method for solving a problem or doing a task. Input data A step-by-step.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
Using Algorithms Copyright © 2008 by Helene G. Kershner.
Algorithm Algorithm is a step-by-step procedure or formula or set of instruction for solving a problem Its written in English language or natural language.
ALGORITHMS AND FLOWCHARTS
Using Algorithms Copyright © 2008 by Helene G. Kershner.
An Introduction to Control Structures
Introduction to Algorithms
Problem Solving and Algorithm Design
Problem Solving and Algorithm Design
Programming We have seen various examples of programming languages
Algorithms.
Chapter 10: Algorithm TECH Prof. Jeff Cheng.
Algorithms and Problem Solving
What's The Plan?: Algorithmic Thinking
An Introduction to Control Structures
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Algorithms File Systems Lab Environment.
More Functional Decomposition
What's The Plan?: Algorithmic Thinking
What's The Plan?: Algorithmic Thinking
Presentation transcript:

Algorithms Sept 4, 2006

Tuesday’s Lab You developed an algorithm Input – an 8 ½ x 11 inch piece of paper Audience – Fellow classmates Process – Instructions for making a particular type of airplane Output – A paper airplane that would fly

Problem Solving Problem solving is the act of finding a solution to a perplexing, distressing, vexing, or unsettled question.

A good algorithm – did your have these traits? Simple – Each step does one thing. No unnecessary steps. Precise – Unambiguous. Proper sequencing. Correct – The instructions told you to do the right things in the right order. Complete – Nothing was left out or left to your imagination. Abstraction – Probably not. A separate set of instructions that can be “substituted” in the algorithm. Ex. Fold = fold and crease.

Mnemonic S - Simple C - Complete R - coRrect A - has appropriate levels of Abstraction P - Precise

Problem solving Is about more than just writing an algorithm

Given a Problem Ask Questions... …to understand the problem – What do I know about the problem? – What is the information that I have to process in order to find the solution? – What does the solution look like? – What sort of special cases exist? – How will I recognize that I have found the solution?

Algorithms An algorithm is set of instructions for solving a problem or sub-problem in a finite amount of time using a finite amount of data

It has levels of Abstraction. From the Oxford English Dictionary, abstraction is defined as: – “The act or process of separating in thought, of considering a thing independently of its associations; or a substance independently of its attributes; or an attribute or quality independently of the substance to which it belongs.”

Or in other words The abstraction property lets us view an algorithm as a series of high level aggregate steps, with the detail hidden in a lower level.

Abstraction, cont. Instead of approaching a problem and worrying about each and every thing you must do to solve the problem, you can begin to look at the major steps. (Top down design) After the major steps, you can begin to fill in how you would accomplish the major step. That fill in may lead to the need for additional levels to fill in those details, etc.

Diagrammatically Drive the car to school Get directions Start the car Follow the directions Get parking pass Drive to the destination Turn left out of your driveway At the next light, turn right. At the intersection with I- 66, take the on-ramp for I-66 West … Level 1 Level 2 Level 3 Find a place to park Stop the car

Other algorithm attributes A good algorithm should be correct. A good algorithm should be complete. Shackelford again, “To be correct, an algorithm must produce results that are correct and complete given any and all sets of appropriate data.” And to be correct, an algorithm must proceed through to a conclusion.

Figure 6.3: The Interactions Between Problem-Solving Phases From Dale and Lewis website.

Let’s start refining our algorithms Precision involves unambiguous steps. Simplicity involves single steps in a correct sequence. Let’s look at a sample algorithm and follow it through. I am going to simulate a computer in this exercise, and you will do a similar exercise tomorrow in lab.