Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rocky K. C. Chang September 11, 2018

Similar presentations


Presentation on theme: "Rocky K. C. Chang September 11, 2018"— Presentation transcript:

1 Rocky K. C. Chang September 11, 2018
What is computation? Rocky K. C. Chang September 11, 2018

2 Goals Understand how complex procedures can be developed from simple procedures. Understand three different ways of defining computations. Understand that problem solving involves (1) abstraction, (2) algorithm design, and (3) implementation.

3 A simple example: What is 53357 + 1897 + 764274 + …?

4 Let’s take a CS approach.

5 0. How to add 2 digits?

6 We start with an addition table.

7 PROC0 If we are given two digits (0, 1, …, 9), we look up the addition table to get the result which consists of two digits. The left digit is 0 if the result is less than 10.

8 1. How to add 3 digits?

9

10 Pseudocode

11 2. How to add two multidigit numbers?

12

13 Pseudocode

14 3. How to add any list of numbers?

15

16 Pseudocode

17 To be continued


Download ppt "Rocky K. C. Chang September 11, 2018"

Similar presentations


Ads by Google