Course 2018-2019 a.y.


Department of Decision Sciences

Course taught in English
Go to class group/s: 25
BEMACS (7 credits - I sem. - OB  |  INF/01)
Course Director:

Classes: 25 (I sem.)

Class-group lessons delivered  on campus

Mission & Content Summary


The course focuses on a few fundamental numerical optimization techniques, which are explained and analyzed during the theory parts, and learn how to translate them effectively into efficient Python code. In doing so, students learn programming patterns which go beyond the most basic ones, and more generally how to translate between theory and code while taking into account considerations of computational efficiency and coding best practices. Besides the value of the theoretical knowledge per se, which has immediately useful application in a wide range of contexts, this is a fundamental step for students in terms of acquiring the necessary skill set for working autonomously in real-life scenarios, in the context of data analysis and its use in decision-making. The optimization techniques presented in this course are complemented in an optional course by Linear Programming.


  • Introduction to Python's Numerical and Scientific libraries (numpy, scipy, matplotlib...). This is a must for real-life data analysis and numerical computing in Python.

  • Randomized algorithms: Monte Carlo methods for sampling and numerical integration, and the Simulated Annealing optimization algorithm. This is a simple but deep optimization strategy with wide applicability. Also allows the demonstration of the interface programming pattern.

  • Non-linear programming: Basic techniques for continuous optimization in the non-linear case: first- and second-order methods in one dimension, later extended to the multi-dimensional case. The "gradient descent" strategy is of particular importance in modern-day machine learning. Also, allows the demonstration of the use of multi-dimensional tensors in efficient numerical programming.

  • Dynamic programming: A wide range of discrete problems can be solved elegantly and efficiently by this "implicit enumeration" general scheme. This is an algorithmic pattern, and students learn from examples to recognize the applicability of this technique. This is a valuable general skill, and this particular case is extremely useful in practical settings. The coding techniques involved offer many opportunities to demonstrate how to write efficient numerical algorithms, and how to implement a general pattern adapting it to a particular situation.

Intended Learning Outcomes (ILO)


At the end of the course student will be able to...
  • Recognize discrete/continuous optimization problems and their class.
  • Express algorithms in vectorized form, e.g. leveraging numpy's broadcasting mechanism.
  • Master some intermediate programming patterns and paradigms, like interfaces and some functional programming.


At the end of the course student will be able to...
  • Translate an optimization problem in mathematical terms.
  • Having identified the most suitable solution technique among the ones presented during the course, write the corresponding code.
  • Identify suitable parameters for heuristic optimization algorithms, based on the knowledge of their properties and exploratory analysis.

Teaching methods

  • Face-to-face lectures
  • Exercises (exercises, database, software etc.)


Programming exercises are used after each practical session to guide the students into:

  • Autonomously extending the code functionality and/or adapting it  to modified situations.
  • Exploration of the properties of heuristic solvers.

Assessment methods

  Continuous assessment Partial exams General exam
  • Written individual exam (traditional/online)


The exam has two separate parts:

  • A theory part, written with open-ended questions, intended to assess all the theoretical learning objectives of the course.
  • A programming exam, held in the computer room, consisting in a series of programming assignments, intended to assess all the practical learning objectives of the course.

The two parts have an equal weight: each is worth 16 points. Each part individually has a minimum passing grade of 9. The sum of the two parts gives the final grade, with votes exceeding 30 corresponding to "30 cum laude".

Teaching materials



  • CORMEN, et al., Introduction to algorithms and data-structures, McGraw Hill.

Other references:

  • NOCEDAL, Wright, Numerical optimization, Springer.
  • FISHMAN, Monte Carlo: concepts, algorithms and applications, Springer.
  • Handouts, slides, example code and exercises are provided.
Last change 22/06/2018 09:31