29227 - Foundations of Informatics T

Academic Year 2017/2018

  • Moduli: Sandro Manservisi (Modulo 1) Ruben Scardovelli (Modulo 2)
  • Teaching Mode: Traditional lectures (Modulo 1) Traditional lectures (Modulo 2)
  • Campus: Bologna
  • Corso: First cycle degree programme (L) in Energy Engineering (cod. 0924)

Learning outcomes

The aim of the course is to give the student a general overview about  computers and scientific computing. After this introductory part, the course is focused on the C language and on numerical methods  both at an elementary level.

Course contents

I. Computer architecture

From transistors to high-level languages. Instruction Set Architecture (ISA) and operating system. Fetch-decode-execute cycle. Pipelining, superscalar and parallel computers. Memory hierarchy: registers, cache, main memory (RAM) and secondary memory. Magnetic disks and CD-ROM. Addresses and buses.

Sources of errors: in input data, round-off, truncation, in the mathematical model (idealization). Absolute, relative and percentage errors. Numerical cancellation and error propagations. Machine precision and significant digits.

II. The C language

Binary numbers: integers and floating-point numbers (IEEE Standard 754), ASCII/UNICODE systems, RGB color palette.
An outline of Windows-XP and GNU-linux operating systems. Hard disk partitions. File system: its organization and permissions. Main commands for directories and files.

The function main, local declarations of variables, variable types. Assignment, arithmetic, relational and logical operators. Program blocks. Logical expressions. Flow control constructs: if-else if-else, switch, for, whiledo-while. Multidimensional arrays. Functions and recursive functions. Data structures ("struct"). Pointers. Arrays and pointers. Dynamic memory allocation. I/O functions in C. Examples.

III. Introduction to numerical methods

Function approximation: Lagrangian interpolation, Taylor polynomial and series.

Finite difference methods: approximation of the first, second and n-th derivative with backward and forward finite differences, with first and second order truncation error; approximation of the first, second and n-th derivative with centered finite differences. ODE of the second order.

Root-finding algorithms: solution of linear system with Gauss method. Non linear equation:   bisection,  Fixed point and  Newton-Raphson's (tangent) method. The secant method and Regula Falsi method.

Numerical integration: rectangle rule, trapezoidal rule, Simpson's formula. Richardson's extrapolation and Romberg's method. Gauss quadrature. Local and global truncation error and order of convergence.

Readings/Bibliography

Instructor lecture notes and lab tutorial (on AMS campus)

Additional books:
Bellini, Guidi. Linguaggio C. McGraw-Hill
Kelley, Pohl. C-Didattica e programmazione. Pearson
Ceri, Mandrioli, Sbattella. Informatica: arte e mestiere.  McGraw-Hill
Monegato. Fondamenti di calcolo numerico. Levrotto & Bella
Epperson. Introduzione all'analisi numerica. McGraw-Hil

Teaching methods

Class lectures and laboratory tutorials with Personal Computers

Tutor assistance

Assessment methods

Multiple choice test and written examination.

The grade is distributed as follows:

1.  Computer architecture multiple choice test : 0-9 score (sufficient if test score> 4.2)

-2. Programming written C language  test in lab with linux operating system: score 0-11 ( sufficient if test score> 5.12)

3.  Programming written numerical analysis test in  lab with linux operating system: score 0-12 (sufficient if test score> 5)

 

The total sum of the scores that are sufficient forms the final grade. Laude is given if you exceed the score of 30.

Teaching tools

Class lectures and computing laboratory tutorials

Office hours

See the website of Sandro Manservisi

See the website of Ruben Scardovelli