| Person in charge: | Conrado Martínez Parra (conrado |
| Others: | Amalia Duch Brown (duch Ana Edelmira Pasarella Sanchez (edelmira Carles Franquesa Niubo (carles.franquesa-niubo Gabriel Alejandro Valiente Feruglio (valiente Maria Teresa Abad Soriano (mabad |
| Credits | Dept. | Type | Requirements |
|---|---|---|---|
| 7.5 (6.0 ECTS) | LSI |
|
PRAP
- Prerequisite for DIE , DCSYS PRED - Prerequisite for DIE , DCSYS PS - Prerequisite for DCSFW |
| Person in charge: | Conrado Martínez Parra (conrado |
| Others: | Amalia Duch Brown (duch Ana Edelmira Pasarella Sanchez (edelmira Carles Franquesa Niubo (carles.franquesa-niubo Gabriel Alejandro Valiente Feruglio (valiente Maria Teresa Abad Soriano (mabad |
This subject provides students with basic algorithmic techniques in order for them to be able to develop correct and efficient programs for solving advanced problems. These basic techniques encompass theoretical and practical knowledge, skills, experience and a critical mindset, all of which are based on solid theories and techniques that have been proven and are well-established.
Estimated time (hours):
| T | P | L | Alt | Ext. L | Stu | A. time |
| Theory | Problems | Laboratory | Other activities | External Laboratory | Study | Additional time |
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 3,0 | 2,0 | 0 | 0 | 0 | 5,0 | 0 | 10,0 | |||
|
Mergesort
Quicksort Karatsuba Strassen Other examples |
||||||||||
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 7,0 | 8,0 | 0 | 0 | 0 | 15,0 | 0 | 30,0 | |||
|
Heaps
Heapsort Extended priority queues Hash tables Binary search trees Balanced binary search trees |
||||||||||
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 3,0 | 2,0 | 0 | 0 | 0 | 7,0 | 0 | 12,0 | |||
|
Representations
Paths Basic algorithms |
||||||||||
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 5,0 | 5,0 | 0 | 0 | 0 | 12,0 | 0 | 22,0 | |||
|
The principles underlying greedy algorithms
Minimum spanning trees: Kruskal, Prim Shortest paths: Dijkstra Optimal prefix codes: Huffman Other examples |
||||||||||
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 5,0 | 5,0 | 0 | 0 | 0 | 12,0 | 0 | 22,0 | |||
|
The principles underlying exhaustive search algorithms
Backtracking and branch and bound Examples Notions of complexity |
||||||||||
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 5,0 | 5,0 | 0 | 0 | 0 | 12,0 | 0 | 22,0 | |||
|
The principles underlying dynamic programming algorithms
The optimality principle Recursive solutions featuring memoization and iterative algorithms Shortest paths: Floyd Edit distance Other examples |
||||||||||
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 3,0 | 0 | 3,0 | 0 | 0 | 6,0 | |||
|
Introduction to C++ programming language, which will be used to describe algorithms throughout the course.
|
||||||||||
| Total per kind | T | P | L | Alt | Ext. L | Stu | A. time | Total |
| 33,0 | 32,0 | 3,0 | 0 | 3,0 | 73,0 | 0 | 144,0 | |
| Avaluation additional hours | 6,0 | |||||||
| Total work hours for student | 150,0 | |||||||
The subject will be set forth in a highly practical fashion and will be illustrated with many examples.
There will be three kinds of classes: theory sessions and problem sessions. On average, the number of contact hours a week will be split evenly between theory and practice classes.
The theory sessions take the form of lectures in which the teacher introduces new concepts or techniques, and examples illustrating them.
Practical classes focus on exercises and case studies
. Teachers set the problems to be solved
. The purpose of the exercises is to present and discuss fairly straightforward problems requiring little theory or technical knowledge
. As a rule, they cover exercises that illustrate the concepts introduced in the most recent theory sessions
. The problems posed in case studies are more complex than those put forward in exercises, and moreover cover various theoretical concepts that need to be drawn together to come up with a good solution.
Note: NP means that the student has not taken the corresponding exam
There are two mid-term exams (PAR1 and PAR2) and a final exam (FINAL). The final exam is for those students who don't want to take mid-term examinations or who obtain a grade less than 4 in the first mid-term exam (PAR1). The final exam covers all the syllabus of the course.
Additionally, students may get from 0 to 1 point for voluntary works (TV) under their professor's supervision; those works consist in small programming projects.
The first mid-term exam usually covers the first four chapters of the course.
For those not wanting to take mid-term examinations or who get a grade less than 4 in the first mid-term exam must take the final exam.
Those students with a grade greater or equal to 4 in the first mid-term exam may take
the final exam if they wish so, but in that case their PAR1 grade will be discarded.
The final grade of the course is computed as follows in those cases:
[if PAR1 < 4 or PAR1 = NP ] NF = min(FINAL + TV, 10)
Those with a grade greater or equal to 4 in the first mid-term exam, may choose to take
the second mid-term exam (PAR2) or the final exam.
The second mid-term exam typically covers chapters 5 to 7 of the course.
The final grade is in that case, according to whether they take PAR2 or FINAL,
[if PAR1 >= 4 and PAR2 != NP] NF = min((PAR1 + PAR2) / 2 + TV, 10)
[if PAR1 >= 4 and PAR2 = NP and FINAL != NP] NF = min(FINAL + TV, 10)
The second mid-term exam PAR2 is in the same day and time as the final exam, although its duration is shorter since it does only cover part of the syllabus.
All exams consist of problem solving exercices which allow to evaluate the level of acomplishment of the specific goals of the course. At least an 80% of the mark in all exams
comes from problems directly based upon those in the problem collection of the course, which is at the disposal of the students. There will be two editions of the problem collection each term, one at the beginning of the term (for PAR1) and the other around the middle of the term (for PAR2 and FINAL). There won't be any other changes in the collection during the term.
Mastery of object-oriented programming techniques:
- passing parameters,
- classes,
- objects,
- methods,
- pointers,
- dynamic memory,
- genericity,
- use of standard classes.
Mastery of at least one object-oriented language, preferably C++.
Recursiveness.
The ADT concept.
Sequential ADTs:
- stacks,
- queues,
- lists with Points of Interest (POI),
- lists with iterators.
Use and internal implementation of sequential ADTs.
branched ADTs:
- binary tree,
- n-ary tree,
- general tree,
- paths.
Use and internal implementation of branched ADTs (Abstract Data Types).
Mathematical knowledge of graphs, sums, and limits. Discrete mathematics. Ability to reason mathematically and to follow mathematical reasoning.
Rudimentary knowledge of statistics and probability: probability space, events, distribution functions, random variables, expectation.