Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 107 - Programming for Science Lecture 3: Simulations & Program Lifecycle.

Similar presentations


Presentation on theme: "CSC 107 - Programming for Science Lecture 3: Simulations & Program Lifecycle."— Presentation transcript:

1 CSC 107 - Programming for Science Lecture 3: Simulations & Program Lifecycle

2 Problem of the Day Why are manhole covers round? It is the only shape that guarantees that the cover can not fall in.

3 Solving Problems Problem solving key to science & engineering  Physics -- How does an atom work?  Engineering -- Will the bridge collapse?  Biology -- What is crawling up my leg? Computer science investigates how computers can be used to solve problems

4 Etter’s Problem Solving Method 1. State the problem clearly Will splitting an atom cause unstoppable explosion? 2. Describe input and output information Input: E = mc 2 ; U 235 Output: 3. Work problem by hand or with calculator for simple set of data Physicists at Manhattan Project did this!

5 Etter’s Problem Solving Method 4. Develop solution and convert to computer program Classified by Dept. of Energy 5. Test solution with variety of data Currently happening in Iran & North Korea

6 Programming For Science This course considers all 5 steps  All needed for success with computers What kind of problems are good for computers?

7 Bad Jobs Nuclear Weapon Tester Hurricane Spotter New Medicine Tester Economist Volunteers?

8 Problem Jobs may be dangerous or illegal, or require psychic abilities Experiments may be costly or unethical  Cannot vaccinate people without knowing side-effects Decisions may be irrevocable  Cannot undo an atomic explosion!

9 What is a Simulator? Emulate system in a way that enables observing the changes/outcomes  System could be: single subatomic particle E. coli bacteria Earth’s weather Elevators in Old Main Galaxies

10 Simulation Example

11

12 Simulator Accuracy Off by almost 100 miles only 24 hours in advance

13 What went wrong? Real-world systems are very complex  Equations have too many variables than we can write in a program  Must simplify world to generate results in timely manner  May overlook important variables

14 Your Turn Get back into groups of 3 and complete the following (off-line) simulation


Download ppt "CSC 107 - Programming for Science Lecture 3: Simulations & Program Lifecycle."

Similar presentations


Ads by Google