Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.
-
Upload
eugene-greer -
Category
Documents
-
view
216 -
download
1
Transcript of Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.
![Page 1: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/1.jpg)
Prof. Dan Ernst
Department of Computer Science
CS 170:Computing for the Sciences
and Mathematics
![Page 2: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/2.jpg)
Welcome to CS 170 !
Instructor Dan Ernst
Office: P 139 [email protected]
Course Web Site: http://www.cs.uwec.edu/~ernstdj/courses/cs170/ https://uwec.courses.wisconsin.edu
D2L - for grades
![Page 3: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/3.jpg)
Introductions
My background PhD Michigan, 2005,High-performance computer
architecture
Mentoring undergraduates Teach computer architecture and systems software Multiple collaborative research projects w/science and math Director, UWEC Center for Computational Science *
Outside Workshops for the Supercomputing Education Program and
National Computational Science Institute
![Page 4: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/4.jpg)
Your Turn
What is your name?
Where are you from?
What year you are in your studies?
What is your favorite use for computers?
![Page 5: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/5.jpg)
Course Website
http://www.cs.uwec.edu/~ernstdj/courses/cs170/
The web site is an integral part of the course
Website will provide Lab/assignment information and due dates Exam information, dates & times Lecture slides
be sure to take your own notes! Samples from class
![Page 6: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/6.jpg)
Getting Information
Read your e-mail! Class e-mail group will be used by the instructor Membership mandatory
I assume you read everything sent to this list!
![Page 7: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/7.jpg)
Getting Help:When you have questions
Regarding HELP with course materials and assignments Come to office hours – Phillips 139
Wednesday 1 – 3 pm Thursday 9:30 – 11:30 am OR by appointment (just e-mail or call my office)
Send me an e-mail: [email protected]
![Page 8: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/8.jpg)
What is CS 170?
An introduction to the application of computational resources to solving problems in the sciences and mathematics
Goals: Knowledge:
Understand the modeling process Work with some standard modeling techniques
Skills: Gain experience in working with computational tools
(Vensim, Maple, etc.)
![Page 9: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/9.jpg)
What This Course is About
This course is NOT about: Programming general applications (take CS 163/145) Making web pages – (take CS 318)
Ingredients of designing and writing software Computer programs A programming language (C++) Elementary programming concepts
Universal constructs Useful techniques
Producing (software) solutions to problems How to think about problems How to articulate solution in a precise way How to understand what a program is doing
![Page 10: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/10.jpg)
Textbooks
Required: Shiflet and Shiflet
Introduction to Computational Science: Modeling and Simulation for the Sciences.
![Page 11: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/11.jpg)
Overall Course Grading
Final Grade
: Exams (3): 40%
Weekly Assignments(10-12): 40%
Larger Projects(2): 20%
![Page 12: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/12.jpg)
Assignment Deadlines
Assignments On-Time: Always due by the beginning of class on the
due date specified No assignment will be accepted after the deadline,
unless given prior approval Exceptions granted only under the most extraordinary
circumstances Advice: PLAN for things to go wrong!
![Page 13: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/13.jpg)
CS 170 Academic Honesty
All work is to be done individually unless otherwise instructed We will do significant group work in this course as well
Discussing concepts is generally OK, exchanging or copying files or written work is NEVER OK
course materials provided by the instructor (textbook, handouts, project write-ups, course web pages, etc.) may be used freely in your work downloading code you found with google is NOT ok
Come see me for help if you have any uncertainty
![Page 14: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/14.jpg)
Computer Accounts & Software
Your UWEC account is all that is needed
Major Software Vensim PLE
Available to you (free) at all Windows lab computers on campus Free download - http://www.vensim.com/venple.html
Maple Available to you (free) at all Windows lab computers on campus
Supported Platforms: Windows your programs must run with the campus installation to be
graded
![Page 15: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/15.jpg)
Prof. Dan ErnstDepartment of Computer Science
CS 170:Computing for the Sciences
and Mathematics
![Page 16: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/16.jpg)
Science
What is Science?
(A) A set of facts (B) Something that professional scientists do (C) The underlying Truth about the Universe (D) None of the above
![Page 17: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/17.jpg)
(A) A set of facts … and (C)
We are constantly making new discoveries and collecting new data
Technology and experiments are changing
Old Theories are replaced by new Theories
Are any Theories not science? Even if they’re shown to be wrong later?
![Page 18: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/18.jpg)
(B) Something Professional Scientists Do…
What is a scientist?
Do you need a PhD?
Amateur Scientists play an important role in discovery
Being scientific DOES NOT require a Union Card
![Page 19: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/19.jpg)
Hanny’s Voorwerp
"Teacher finds new cosmic object", BBC, 5 August 2008
![Page 20: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/20.jpg)
What is the Scientific Method?
What are the steps in the scientic method? Take two minutes to write down the steps we use in science.
![Page 21: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/21.jpg)
Steps in Scientific Method
Characterization of existing data Current Theories
Formulation of a hypothesisDeduction - formulation of a predictive testExperimental testingError elimination and characterizationValidate or revise hypothesis
New Theories!
![Page 22: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/22.jpg)
Science – Old School
![Page 23: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/23.jpg)
Science – Newer Picture
![Page 24: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/24.jpg)
Why Simulate?
![Page 25: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/25.jpg)
Experimental Investigation
Record observations and make predictions
Example: Tycho Brahe (1546-1601) Observed and recorded the motions and
positions of the sun, moon, and Mars over a period of 20 years
Invented the sextant, mural quadrant, and portable ring armillary
Based on his records, he could predict future planetary positions
![Page 26: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/26.jpg)
Theoretical Investigation
Theory: logical, self-consistent model for explaining a natural or social behavior Attempts to explain why things happen
as they do using the language of mathematics
Examples: Isaac Newton's (1643 – 1727) law of
gravitational attraction: "The gravitation attraction force between two point masses is directly proportional to the product of their masses and inversely proportional to the square of their separation distance."
Einstein's theory of relativity: energy and mass are equivalent and transmutable
e = mc2
![Page 27: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/27.jpg)
Computational Investigation
Uses experimental and theoretical knowledge to create computational models of aspects of nature, then uses these models to simulate natural behavior and make predictions
Example: Johannes Kepler (1571 – 1630) Worked with Tycho Brahe's data Attempted to find patterns behind the data of planetary
motion that could be expressed mathematically
![Page 28: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/28.jpg)
Modeling
“Application of methods to analyze complex, real-world problems in order to predict what might happen with some course of action”
Notes:No mention of “Computers” or “Computation”No mention of “Science”!
Modeling is about mathematics
![Page 29: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/29.jpg)
Steps of Modeling Process
Analyze problemFormulate a modelSolve modelVerify and interpret model's solutionReport resultsMaintain/revise model
![Page 30: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/30.jpg)
Computational Investigation Approach:
1. Identify the problem Copernicus's theory of circular planetary orbits didn't fit the data
2. Pose the problem in terms of a mathematical model Kepler started by assuming circular orbits, but that the sun was NOT
at the center He then guessed at different equations using trial and error
3. Test the model using a computational method He did the calculations by hand and it took him 5 years…
4. Assess the results Does the solution make theoretical sense? Does the solution fit the data within a tolerable degree of error?
![Page 31: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/31.jpg)
Kepler's Findings:
1. Planetary motion is an ellipse with one focus at the sun
![Page 32: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/32.jpg)
Kepler's Findings:
2. The line between a planet and the sun sweeps out equal areas in equal times
![Page 33: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/33.jpg)
Kepler's Findings:
3. The square of a planet's orbital period is proportional to the cube of its average distance from the sun:
T2 = cr3
![Page 34: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/34.jpg)
Computational Investigation Approaches
Do the calculations by hand Time-consuming, error-prone
Use a digital computer Fast But only as good as the underlying model,
method, and implementation!
"If you put tomfoolery into a computer, nothing comes out but tomfoolery. But this tomfoolery, having passed through a very expensive machine, is somehow ennobled and no one dares criticize it." - Pierre Gallois
![Page 35: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/35.jpg)
Computational Science
![Page 36: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/36.jpg)
Classes of Models
Static Model Does not take time into account
Dynamic Model Models changes over time
![Page 37: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/37.jpg)
Classes of Models
Stochastic Model Some element of probability/chance involvedhttp://www.sfgate.com/cgi-bin/blogs/ybenjamin/detail?entry_id=71442 Need to run model many times with different random
values
Deterministic Model No probability/chance involved Run once
![Page 38: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/38.jpg)
Steps of Modeling Process
Analyze problem Be precise!
Formulate a model Gather data Make simplifying assumptions and document them Determine variables and units Establish relationships among variables and
submodels Determine equations and functions
![Page 39: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/39.jpg)
Steps of Modeling Process
Solve model
Verify and interpret model's solution verification determines if solution works correctly validation establishes if system satisfies problem's
requirements
![Page 40: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/40.jpg)
Steps of Modeling Process
Report on model Analysis of problem Model design Model solution Results and conclusions
Maintain model
![Page 41: Prof. Dan Ernst Department of Computer Science CS 170: Computing for the Sciences and Mathematics.](https://reader030.fdocuments.in/reader030/viewer/2022032612/56649f0d5503460f94c20fbf/html5/thumbnails/41.jpg)
HOMEWORK!
READ pages 3-10 in the textbookPerform the modeling process described there
With a partner
Problem: For a group of n people, how many pizzas do I need?
Factors to consider… Size of pizzas (radius), # of slices, shape of slices, crust style… Toppings, appetite, size of participants…
Steps you can mostly skip: 4 (mostly), 6Report on each step!
graph pizza vs. n for various parameters in step 3, etc.