Module page
Laboratorio di programmazione e calcolo
academic year: | 2013/2014 |
instructor: | Stefano Finzi Vita |
degree course: | Mathematics - DM 270/04 (triennale), I year |
type of training activity: | affine e integrativa |
credits: | 9 (72 class hours) |
scientific sector: | MAT/08 Analisi numerica |
teaching language: | italiano |
program: | I-Z |
period: | I sem (30/09/2013 - 17/01/2014) |
Lecture meeting time and location
Presence: highly recommended
Module aims: The main goal is to introduce the students to a constructive approach to mathematics also by means of personal computers. In this respect, the course complements other courses of the first year where the logic/deductive point of view is more emphasized. A major part of this course will be devoted to problem solving, to the analysis of basic algorithms and to their implementation in C.
Module subject: The main topics are:
- Introduction to the C++ language: structure of a C++ program, types of variables, commands of the pre-compiler, arithmetic and logic operators, pointers, mathematical functions. Input/output. Cicles: for, while, do-while. Alternatives: if-else, switch. Matrix and vectors in C. Functions. Graphics commands.
- Number and functions on a computer. Floating point representation, rounding and truncation errors. Logic operations, Boolean algebra. Basic operations on sets. Polynomials, Horners algorithm. Taylor expansion. Numerical derivatives.
- Linear maps in the plane. Linear systems. Gauss method, Jacobi method. Algorithms for computing the determinant and the inverse matrix.
- Sequences and series. Limit approximation, stopping rule and error. Recursive sequences, fixed point theorem.
- Root finding. Bisection, Newtons and secant algorithms. Convergence and a priori error estimates. Order of convergence of Newtons method.
- Polynomial interpolation. Error estimates for linear and quadratic interpolation. Composite Lagrange interpolation.
- Quadrature formulas. Rectangle, trapezoid and Simpsons rules. Geometric interpretation. Error estimates.
Detailed module subject: Programma settimanale degli argomenti svolti a lezione (versione finale)
Suggested reading: On-line material given by the instructors
Issues:
- Brevissima introduzione al C++ (M. Marfurt)
- Note per l'utilizzo del compilatore C con Linux
- Analisi dell'errore propagato (M. Marfurt)
- Lucidi della prima lezione introduttiva
- Esempio di un semplice programma C++
- C++ su Macintosh
- Lucidi della seconda lezione introduttiva
- Breve nota sulle successioni per ricorrenza e l'algoritmo di Erone
- Sulle diverse definizioni di media in statistica (v. Wikipedia): link
- Risoluzione numerica di sistemi di equazioni lineari (M. Marfurt)
- Un manualetto per GNUPLOT
- Ricerca degli zeri: un po' di teoria
- Alcune istruzioni per l'uso di Gnuplot da C (N.B.: sotto Windows per lanciare Gnuplot va individuato il path dell'eseguibile sul proprio computer, sotto Mac o Linux non serve, e basta l'istruzione: system("gnuplot -persist comandi.txt"); , dove comandi.txt è il file di comandi di gnuplot generato dal vostro programma C)
- Problemi, algoritmi e programmi di matematica elementare (note per la prima parte del corso)
Type of course: standard
Exercises:
- Foglio di esercizi n. 1
- Foglio di esercizi n. 2
- Foglio di esercizi n. 3
- Foglio di esercizi n. 4
- Foglio di esercizi n. 5
- Foglio di esercizi n. 6
- Foglio di esercizi n. 7
- Foglio di esercizi n. 8
- Foglio di esercizi n. 9
- Foglio di esercizi n. 10
- Foglio di esercizi n.11
Examination tests:
- Testo della prova in itinere del 13 novembre 2013
- Vecchi testi di prove di esonero di LPC (A.A. 2011/12 e 2010/11)
- Testo della prova in itinere del 15 gennaio 2014
- Testo della prova scritta del 3 febbraio 2014
- Testo della prova scritta del 24 febbraio 2014
- Testo della prova scritta del 2 luglio 2014
- Testo della prova scritta del 21 luglio 2014
- Testo della prova scritta del 19 settembre 2014
Useful links:
- Form per la registrazione ai canali di LPC (entro il 18.10.2013) : Link
- Per approfondire le successioni per ricorrenza: Iterata iuvant. Modelli matematici discreti e applicazioni (note della Scuola estiva 2013 del PLS per studendi delle superiori): link
Knowledge and understanding: Successful students will be able to have a basic knowledge of programming and of the mathematical properties of simple algorithms. They will also achieve some fundamental notions about convergence, order of convergence, errors and complexity for elementary algorithms.
Skills and attributes: Successful students will be able to write a simple C code for scientific purposes and to manage elementary numerical algorithms to solve problems. They will be able to choose the appropriate algorithm for simple problems like finding the root of an equation, computing an integral or solving a linear system. During the laboratory sessions they will learn how to use PCs, graphic tools and a LAN network.
Personal study: the percentage of personal study required by this course is the 65% of the total.