introduction to scienti c computing
play

Introduction to Scientic Computing Steve Marschner Cornell CS 322 - PowerPoint PPT Presentation

Numerics Mechanics Topics Introduction to Scientic Computing Steve Marschner Cornell CS 322 Cornell CS 322 Introduction to Scientic Computing 1 Numerics Mechanics Topics Outline Numerical Methods Course mechanics Course content


  1. Numerics Mechanics Topics Introduction to Scienti�c Computing Steve Marschner Cornell CS 322 Cornell CS 322 Introduction to Scienti�c Computing 1

  2. Numerics Mechanics Topics Outline Numerical Methods Course mechanics Course content Cornell CS 322 Introduction to Scienti�c Computing 2

  3. Numerics Mechanics Topics What CS 322 is about The title says �scienti�c computing.� The course catalog copy says �numerical analysis.� I'll often call it �numerical methods.� Cornell CS 322 Introduction to Scienti�c Computing 3

  4. Numerics Mechanics Topics �Scienti�c computing� Using computers for scienti�c, medical, and engineering applications. Some examples: • X-ray crystallography for protein structure • Structural analysis of machine parts • Analysis of data from a clinical study An application-focused description. Cornell CS 322 Introduction to Scienti�c Computing 4

  5. Numerics Mechanics Topics �Numerical analysis� Solving problems in analysis (i.e., with real numbers) by numerical, rather than symbolic means. Some examples: • Solving linear and nonlinear equations • Computing values of de�nite integrals • Solving differential equations A problem-focused description. Cornell CS 322 Introduction to Scienti�c Computing 5

  6. Numerics Mechanics Topics �Numerical methods� Algorithms (methods) for solving mathematical problems in the service of applications. Some examples: • The method of conjugate gradients for linear systems. • Gaussian quadrature for computing integrals. • The Runge-Kutta method for initial value problems. An algorithm-focused description. In reality this area encompasses all three: based on our application, we formulate some mathematical problem, and �nd an algorithm for it. Cornell CS 322 Introduction to Scienti�c Computing 6

  7. Numerics Mechanics Topics What are numerical methods? The application of computer science to solving math problems. • usually problems about real numbers ◦ linear algebra ◦ calculus/differential equations ◦ geometry • not always arising from problems with real numbers ◦ PageRank • computing using approximations ◦ most interesting NA problems cannot be computed exactly ◦ example of degree 5 polynomial Cornell CS 322 Introduction to Scienti�c Computing 7

  8. Numerics Mechanics Topics Floating point numbers Numerical programs almost always use �oating point arithmetic, and understanding how �oating point works is crucial. 3.624 x 10 6 mantissa exponent radix (base) • �xed precision in mantissa → too-close numbers can't be distinguished • limited range of exponent → too-small numbers can't be distinguished from zero → too-big numbers can't be represented Cornell CS 322 Introduction to Scienti�c Computing 8

  9. Numerics Mechanics Topics Numerical methods vs. �standard� CS Numerical methods: • Deal with �oating point approximations of real numbers • Implement calculus, linear algebra, etc. • Are approximate Many other programs: • Deal with integers and other discrete data • Implement logic, �nite algebra, etc. • Are exact Each is tricky to get right and has its own characteristic types of bugs. Numerical programming seems hard at �rst because the bugs are unfamiliar. Cornell CS 322 Introduction to Scienti�c Computing 9

  10. Numerics Mechanics Topics Numerical methods vs. �standard� CS an example Binary search: • Searching the phone book by binary search ◦ Start with whole array (�niteness helps) ◦ Compare search key with value at middle index (watch for off-by-one bugs) ◦ Move endpoint one past compared value ◦ Done when strings are equal or interval is empty • Searching for the zero of a function by binary search ◦ Start with bracketing interval (continuity helps) ◦ Check sign of function value at midpoint (watch for rounding errors) ◦ Move endpoint to midpoint ◦ Done when function value is small enough or interval is small enough Cornell CS 322 Introduction to Scienti�c Computing 10

  11. Numerics Mechanics Topics Course Mechanics See the web site for details on these topics. • Meetings • Homework • Projects • Grading system • Exams • Textbooks • Web site Cornell CS 322 Introduction to Scienti�c Computing 11

  12. Numerics Mechanics Topics What you will learn in CS 322 For each of the classes of problems we'll study, I hope you will learn: • How to recognize it ◦ so that you know where to look for methods to solve it • The workings of some basic methods to solve the problem ◦ so you can code them up for easy problems ◦ so you understand where the more advanced methods are coming from • What can go wrong ◦ so you know what to watch out for • How to tell whether you have a hard or easy problem ◦ so you know when you need a more advanced method ◦ so you know how to choose an appropriate method Cornell CS 322 Introduction to Scienti�c Computing 12

  13. Numerics Mechanics Topics What you will learn in CS 322 Along the way I hope you will absorb: • Debugging intuition for numerical code (like you already have for more discrete code) → the �red �ags� of �oating point numbers • Appreciation for working with numerical data → how to get a handle on it → how to explain it using plots and statistics • The culture of numerical computing (names for things, recurring algorithmic features) • Deeper understanding of the math Cornell CS 322 Introduction to Scienti�c Computing 12

  14. Numerics Mechanics Topics Course topics • Getting started ◦ linear systems I ◦ �tting I ◦ numerical programming ◦ data visualization • Low-dimensional methods ◦ interpolation and approximation ◦ root �nding ◦ quadrature • Larger-scale methods ◦ singular value decomposition ◦ statistics of �tting problems ◦ ordinary differential equations ◦ linear systems II ◦ �tting II Preliminary schedule is on the course web site. Cornell CS 322 Introduction to Scienti�c Computing 13

  15. Numerics Mechanics Topics What you won't learn in CS322 • How to implement advanced methods (really good implementation is subtle!) • Much about more advanced areas → optimization → partial differential equations → large-scale sparse problems Cornell CS 322 Introduction to Scienti�c Computing 14

  16. Numerics Mechanics Topics Lecture summary • Numerical methods: programs that compute with approximations of real numbers • Course content: innards of basic methods; using of numerical software • Course mechanics: homeworks and projects; 5 point scale; starred problems. Next time: applications of numerical methods, standard problem types, and what we want from our programs (never mind what they want from us). http://www.cs.cornell.edu/Courses/cs322/2007sp/ Cornell CS 322 Introduction to Scienti�c Computing 15

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