Presentation is loading. Please wait.

Presentation is loading. Please wait.

What's The Plan? Algorithmic Thinking Step-by-step directions for whatever someone, or the computer, needs to do © 2004 Lawrence Snyder.

Similar presentations


Presentation on theme: "What's The Plan? Algorithmic Thinking Step-by-step directions for whatever someone, or the computer, needs to do © 2004 Lawrence Snyder."— Presentation transcript:

1 What's The Plan? Algorithmic Thinking Step-by-step directions for whatever someone, or the computer, needs to do © 2004 Lawrence Snyder

2 Let’s Get Thinking. Activity: The Impossible Question  In groups you will write out the instructions for how to create a paper airplane. After you finish your instructions you will test them with another group. You will turn in: Instructions: Role Documentation: Test Results. –FOUR ROLES »QUESTIONER: Write down all questions asked or problems posed »ASSUMER: Write down all assumptions made. »DOCUMENTER: Write down the algorithm. »RESEARCHER: Gather information for your group Test Result Reflection: –Were all members of the group able to follow your instructions –Did you have any unexpected results

3 Instructions on how to build a paper airplane

4 Review: Paper Airplane Activity: Paper Airplane How did the paper airplane activity go? What did you learn? Are specific instructions easy to give? Did you re-write your algorithm between user tests?

5 Algorithm A precise, systematic method for producing a specified result In real life we do this all the time: What is a task that you complete daily where you do the same each time? 10-5

6

7

8

9

10 Five Essential Properties of Algorithms 1.Input specified  Data to be transformed during the computation to produce the output  Must specify type, amount, and form of data 2.Output specified  Data resulting from the computation— intended result  It is possible to have no output 10-10

11 Five Essential Properties (cont'd) ‏ 3.Definiteness  Specify the sequence of events  Details of each step, including how to handle errors 4.Effectiveness  The operations are doable 5.Finiteness  Must eventually stop 10-11

12 Let’s Get Thinking Activity: Creating a plan  In groups of 4 you will get an algorithmic task. Some of these tasks were used as interview questions. We are concerned with the process you follow to arrive at your solution. –FOUR ROLES »QUESTIONER: Write down all questions asked or problems posed »ASSUMER: Write down all assumptions made. »DOCUMENTER: Write down the algorithm. »RESEARCHER: Gather information for your group

13 An Example: Directions What is an algorithm for getting to the closest McDonald’s?  Input?  Output?  Definiteness?  Effectiveness?  Finiteness?

14

15 WEATHER WHETHER

16 Context Matters Program can fulfil five properties of an algorithm, be unambiguous, and still not work right because it is executed in the wrong context  e.g., last name in Western countries means family name; in Asian countries it may mean given name Context matters: Driving instructions  "From the Bothel Everett Highway go to Starbucks and turn right."  Assumes you are traveling in a specific direction. If you are not, the directions will fail. 10-16

17 Language in Algorithms Natural language  For people, we use a natural language like English  Ambiguity is common in natural language Programming Language  Formal languages designed to express algorithms  Precisely defined; no ambiguity 10-17

18 Driving vs. Driverless http://www.youtube.com/watch?v= yDVLUiJfpPwhttp://www.youtube.com/watch?v= yDVLUiJfpPw

19 Program vs. Algorithm A program is an algorithm that has been customized to  solve a specific task under a specific set of circumstances –using a specific language Algorithm is a general method; program is a specific method 10-19


Download ppt "What's The Plan? Algorithmic Thinking Step-by-step directions for whatever someone, or the computer, needs to do © 2004 Lawrence Snyder."

Similar presentations


Ads by Google