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

Slides:



Advertisements
Similar presentations
A method for addressing any large problem. Carefully consider the problem. Define the problem. Ask yourself the following questions: What is it that I.
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.
1 Algorithms Algorithm A set of unambiguous instructions for solving a problem or subproblem in a finite amount of time using a finite amount of data Why.
Slides modified by Erin Chambers Problem Solving and Algorithm Design.
Chapter 7 Problem Solving and Algorithms. 2 Chapter Goals Describe the computer problem-solving process and relate it to Polya’s How to Solve It list.
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. 2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
Problem Solving and Algorithms
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.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Algorithms and Problem Solving-1 Algorithms and Problem Solving Mainly based on Chapter 6: “Problem Solving and Algorithm Design” from the Book: “Computer.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving
Chapter 2: Algorithm Discovery and Design
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Chapter 6 Problem Solving and Algorithm Design Nell Dale John Lewis.
Chapter 1 Program Design
Problem Solving and Algorithm Design
Chapter 2: Algorithm Discovery and Design
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Chapter 9 High-Level Programming Languages: C++. Chapter Goals Describe the expectations of high level languages Distinguish between functional design.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
CPS 120: Introduction to Computer Science
Simple Program Design Third Edition A Step-by-Step Approach
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition.
Invitation to Computer Science, Java Version, Second Edition.
Problem Solving and Algorithm Design. 2 Problem Solving Problem solving The act of finding a solution to a perplexing, distressing, vexing, or unsettled.
Chapters 7, 8, & 9 Quiz 3 Review 1. 2 Algorithms Algorithm A set of unambiguous instructions for solving a problem or subproblem in a finite amount of.
Program Development Life Cycle (PDLC)
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
CS 1308 Computer Literacy and The Internet Software.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
1 C++ Plus Data Structures Nell Dale Chapter 1 Software Engineering Principles Modified from the Slides made by Sylvia Sorkin, Community College of Baltimore.
CPS120 Introduction to Computer Programming The Programming Process.
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.
Chapter 6 Problem Solving and Algorithm Design Nell Dale John Lewis.
Chapter 6 Problem Solving and Algorithm Design. 2 Problem Solving Problem solving The act of finding a solution to a perplexing, distressing, vexing,
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Top-Down Design and Modular Development. The process of developing methods for objects is mostly a process of developing algorithms; each method is an.
Chapter 6 Problem Solving and Algorithm Design. 2 Chapter Goals Apply top-down design methodology to develop an algorithm to solve a problem Define the.
The Programming Process Define the problem* Make or buy software? Design the program * Code (write) the program Test (debug) the program Document the.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
Chapter 7 Problem Solving and Algorithms. 2 Problem Solving Problem solving The act of finding a solution to a perplexing, distressing, vexing, or unsettled.
Lecture 13: 10/10/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
2. Program Development Intro Programming in C++ Computer Science Dept Va Tech August 2001 ©2001 Barnette ND & McQuain WD 1 Top-Down Design:A solution method.
Software Engineering CS103 February 13, How Do You Solve Big Problems? Thousands of programmers Thousands of programmers Months or years of coding.
A little hardware; a little software CS 139 – 08/29/07.
CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles.
Chapter 6 Problem Solving and Algorithm Design. 2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
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.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
An Introduction to Programming with C++ Sixth Edition
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Chapter 2 Principles of Programming and Software Engineering.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science.
Problem Solving.  Similar to Solving Math Word Problem  Read the Problem  Decide how to go about Solving the Problem  Solve the Problem  Test the.
Low-Level Programming Languages, Pseudocode and Testing Chapter 6.
Algorithms Sept 4, Tuesday’s Lab You developed an algorithm Input – an 8 ½ x 11 inch piece of paper Audience – Fellow classmates Process – Instructions.
Problem Solving and Algorithms
Computational Thinking
Problem Solving and Algorithm Design
Problem Solving and Algorithm Design
The Programming Process
Programming We have seen various examples of programming languages
Presentation transcript:

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

6-2 Problem Solving G. Polya wrote How to Solve It: A New Aspect of Mathematical Method His How to Solve It list is quite general –Written in the context of solving mathematical problems –The list becomes applicable to all types of problems

6-3 Ask Questions... …to understand the problem –What do I know about the problem? –What is the information that I have to process in order the 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?

6-4 Look for Familiar Things You should never reinvent the wheel In computing, you see certain problems again and again in different guises A good programmer sees a task, or perhaps part of a task (a subtask), that has been solved before and plugs in the solution

6-5 Divide and Conquer Break up a large problem into smaller units that we can handle –Applies the concept of abstraction –The divide-and-conquer approach can be applied over and over again until each subtask is manageable

6-6 Algorithms An algorithm is set of instructions for solving a problem or subproblem in a finite amount of time using a finite amount of data The instructions are unambiguous

6-7 Pseudocode Uses a mixture of English and formatting to make the steps in the solution explicit Page 149

6-8 Following an Algorithm Preparing a Hollandaise sauce Figure 6.4

6-9 Following an Algorithm (cont.) Preparing a Hollandaise sauce Page 150

6-10 Developing an Algorithm The plan must be suitable in a suitable form Two methodologies that currently used –Top-down design –Object-oriented design

6-11 Top-Down Design Breaking the problem into a set of subproblems called modules Creating a hierarchical structure of problems and subproblems

6-12 Top-Down Design This process continues for as many levels as it takes to expand every task to the smallest details A step that needs to be expanded is an abstract step Figure 6.5 An example of top-down design

6-13 A General Example Planning a large party Figure 6.6 Subdividing the party planning

6-14 A Computer Example Problem –Create an address list that includes each person’s name, address, telephone number, and address –This list should then be printed in alphabetical order –The names to be included in the list are on scraps of paper and business cards

6-15 A Computer Example Page 156

6-16 A Computer Example Page 157

6-17 A Computer Example Page 158

6-18 A Computer Example Page 159

6-19 Top-Down Methodology Analyze the Problem Write the Main Module Write the Remaining Modules Re-Sequence and Revise as Necessary

6-20 Testing the Algorithm The process itself must be tested Testing at the algorithm development phase involves looking at each level of the top-down design

6-21 Testing the Algorithm Desk checking: sit at a desk with a pencil and paper and work through the design Walk-through: Manual simulation of the design by the team members –Take sample data values and simulate the design using the sample data Inspection: The design is handed out in advance, and one person (not the designer) reads the design line by line while the others point out errors