 George Polya, a famous mathematician, is known for creating four steps for easy problem solving.  “Trying to solve problems, you have to observe and.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Programming Types of Testing.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Al-Karma Language School Computer Department Prep. 3.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Programming Fundamentals (750113) Ch1. Problem Solving
Chapter 1 Program Design
Chapter 3 Planning Your Solution
PRE-PROGRAMMING PHASE
Your Interactive Guide to the Digital World Discovering Computers 2012.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Programming Translators.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Problem Solving Methods. CSCE 1062 Outline Problem Solving Methods Problem solving steps The analytical method The algorithmic method The software engineering.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
Programming Lifecycle
Programming Concepts Chapter 3.
Chapter 3 Developing an algorithm. Objectives To introduce methods of analysing a problem and developing a solution To develop simple algorithms using.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
Software Development Cycle What is Software? Instructions (computer programs) that when executed provide desired function and performance Data structures.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
E.g.: MS-DOS interface. DIR C: /W /A:D will list all the directories in the root directory of drive C in wide list format. Disadvantage is that commands.
Developing an Algorithm. Simple Program Design, Fourth Edition Chapter 3 2 Objectives In this chapter you will be able to: Introduce methods of analyzing.
The Software Development Process
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
1 Program Planning and Design Important stages before actual program is written.
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
CS 100 Introduction to Computing Seminar September 21, 2015.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Principles of Programming CSEB134 : BS/ CHAPTER Fundamentals of the C Programming Language.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Computer Systems Architecture Edited by Original lecture by Ian Sunley Areas: Computer users Basic topics What is a computer?
Software Engineering Algorithms, Compilers, & Lifecycle.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
 Problem Analysis  Coding  Debugging  Testing.
Visual Basic Programming Introduction to Computers Programming.
Computer Science Department
Lecture 1 Introduction Richard Gesick.
Algorithm and Ambiguity
A451 Theory – 7 Programming 7A, B - Algorithms.
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Unit 2.3 Robust Programs Lesson 2 - Testing Programs
Algorithm and Ambiguity
Unit# 8: Introduction to Computer Programming
Teaching Computing to GCSE
Designing and Debugging Batch and Interactive COBOL Programs
Problem Solving Techniques
Problem Solving General Problem Solving Concepts
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Algorithm and Ambiguity
Programming Fundamentals (750113) Ch1. Problem Solving
Software Development Process
Programming Fundamentals (750113) Ch1. Problem Solving
Basic Concepts of Algorithm
CHAPTER 6 Testing and Debugging.
Presentation transcript:

 George Polya, a famous mathematician, is known for creating four steps for easy problem solving.  “Trying to solve problems, you have to observe and to imitate what other people do when solving problems and, finally, you learn to do problems by doing them.”

 Polya’s steps are: 1. Define what the problem is 2. Plan what the solution will be 3. Implement the solution to the problem 4. Look back  Sound familiar…

 Define the problem: When we’re required to solve a problem it’s important that we firstly need to define what it is. We must also make sure that we’re able to define that we’re looking at the correct problem.  Plan the solution: Next we need to consider the steps to be undertaken. The technical term for these steps is an “algorithm”. The term algorithm can be applied to almost any daily activity. In computing planning a solution is designing an algorithm.

 Implement the solution: Implementation means describing the algorithm design in a language the computer understands. Such a description is called a program, the language is known as a programming language. Once a program is written we have then to get the computer to execute the program. It is wise to document the steps taken so that it is easier to revise or improve at a later time.  Look back: The final stage we look back to ensure that the process carried out corresponds with the task we set out. From here we can look to see how we can improve on earlier steps.

 An algorithm is a description of how to carry out a process. The agent who carries it out is known as the processor. So a computer is a processor.  Algorithms can be any daily event that requires a series of steps and an agent to carry them out.

ProcessExpression of algorithm Processor Knitting a jumper Knitting a pattern Human being or knitting machine Baking breadRecipeBaker Building a model car Assembly instructions Hobbyist

 In all of these cases the processor is a person who processes simple skills and who is equipped with simple tools. Provided that the algorithm is followed and implemented the processor will produce the desired result.  Many processes need to interact with their environment, accepting input and developing output. In the examples input could have been wool, flour, water, plastic parts etc.  The specification of input and output is an integral part of an algorithm description. Should the input be invalid there may be an inability to process or undesirable output. For example putting soap powder in bread mix would produce inedible bread.

 All the processes undertaken eventually end. The jumper is completed, the bread baked and the car finished. Some will continue however: e.g. keeping healthy  Similarly this will happen with computer processes with an indefinite termination point: e.g. controlling traffic lights, keeping satellite communications functioning

 There are three types of errors you will confront.  Syntax errors are errors in the expression or syntax of an algorithm that makes it unintelligible to the processor. These are generally spelling mistakes, misnaming objects or symbols that cannot be processed.

 A run time error is encountered when it is impossible for the processor to carry out an instruction. For example if you were instructed to pour two litres of milk into a container that could only hold one. Although it could be correct in syntax it may be impossible to carry out.  Logic errors are the hardest to detect, although there may be no other errors incorrect results may be returned. Test data needs to be applied to an algorithm to check the correctness of its logic.

 What are the four steps Polya defines?  What is an algorithm?  Can you name a programming language?  Why is it important to look back when solving a problem?  Baking a cake is an example of a process. A) In what form is the appropriate algorithm usually expressed? B) What’s an example of simple steps carried out in the algorithm? C) What is the input? D) What is the output? E) How would we look back?  Which of these processes can be expected to terminate? Which won’t and why? A) Mixing bread dough B) Using a manual method to write 3/11 as a decimal C) The search for the loch ness monster D) Cooking stir-fry vegetables

 Describe what invalid input would be for these processes: A) Building a model aeroplane B) Making a pot of tea C) Logging on to a computer network D) Operating a public telephone E) Dividing one whole number by another  What is: A) Syntax Error B) Logic Error C) Runtime error