problem solving algorithm design
play

Problem Solving & Algorithm Design 01-1 Problem solving The - PowerPoint PPT Presentation

Problem Solving & Algorithm Design 01-1 Problem solving The act of finding a solution to a perplexing, distressing, vexing, or unsettled question 01-2 How to Solve it Written by George Polya in 1945 01-3 How to Solve it


  1. Problem Solving & Algorithm Design 01-1

  2. Problem solving • The act of finding a solution to a perplexing, distressing, vexing, or unsettled question 01-2

  3. How to Solve it • Written by George Polya in 1945 01-3

  4. How to Solve it • Written by George Polya in 1945 » It is written in a mathematical context for mathematical problems 01-4

  5. How to Solve it • Written by George Polya in 1945 » It is written in a mathematical context for mathematical problems > With simple wording changes his list of suggestions are applicable to all types of problems 01-5

  6. Ask Questions • To understand a problem 01-6

  7. Ask Questions • To understand a problem » What do I know about the problem? 01-7

  8. Ask Questions • To understand a problem » What do I know about the problem? » What is the information that I have to process in order to find the solution? 01-8

  9. Ask Questions • To understand a 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? 01-9

  10. Ask Questions • To understand a 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? 01-10

  11. Ask Questions • To understand a 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? 01-11

  12. Look for Familiar Things » You should never “ reinvent the wheel” 01-12

  13. Look for Familiar Things » You should never “ reinvent the wheel” » In computing, you see certain problems again in different guises 01-13

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

  15. Divide and conquer » Break up a large problem into smaller units that can be handled more easily 01-15

  16. Divide and conquer » Break up a large problem into smaller units that can be handled more easily » Abstraction plays an important role 01-16

  17. Divide and conquer » Break up a large problem into smaller units that can be handled more easily » Abstraction plays an important role » The divide-and-conquer approach can be applied over and over 01-17

  18. Abstraction An explanation, idea or model that 
 removes complex details This is a key concept Abstraction will reappear 
 throughout the course 01-18

  19. Algorithm A technical term for a set of instructions for solving a problem or sub-problem 01-19

  20. Algorithm A technical term for a set of instructions for solving a problem or sub-problem Desirable Properties Use a finite amount of time 01-20

  21. Algorithm A technical term for a set of instructions for solving a problem or sub-problem Desirable Properties Use a finite amount of time Use a finite amount of data, material 01-21

  22. Algorithm A technical term for a set of instructions for solving a problem or sub-problem Desirable Properties Use a finite amount of time Use a finite amount of data, material Instructions are unambiguous 01-22

  23. Who writes algorithms? 01-23

  24. Who writes algorithms? Anyone who wants to write a set of instructions for solving a problem 01-24

  25. An Example Algorithm How to prepare Hollandaise sauce 01-25

  26. Algorithm Written in Pseudocode A mixture of English and formatting to make the steps in the algorithm explicit Put butter in a pot 
 Turn on burner (low heat) 
 Put pot on the burner 
 While (not bubbling) 
 Leave pot on the burner 
 Turn off burner 
 Put other ingredients in the blender 
 Turn on blender 
 While (more butter needed) 
 Pour butter into blender in a slow stream 
 Turn off blender 01-26

  27. Developing an Algorithm • Implementing an algorithm involves making it computer-readable 01-27

  28. Developing an Algorithm • Implementing an algorithm involves making it computer-readable » Must be in a suitable form for a computer 01-28

  29. Developing an Algorithm • Implementing an algorithm involves making it computer-readable » Must be in a suitable form for a computer • The methodology (set of working methods) used to make the plan must 01-29

  30. Developing an Algorithm • Implementing an algorithm involves making it computer-readable » Must be in a suitable form for a computer • The methodology (set of working methods) used to make the plan must » Begin with a problem statement 01-30

  31. Developing an Algorithm • Implementing an algorithm involves making it computer-readable » Must be in a suitable form for a computer • The methodology (set of working methods) used to make the plan must » Begin with a problem statement » Conclude with a plan that can be easily coded 01-31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend