Enlarging letters   Home   Information   Contacting   Map
Català   Castellano

Analysis and Design of Algorithms (ADA)

Credits Dept. Type Requirements
7.5 (6.0 ECTS) LSI
  • Compulsory for DIE
  • Compulsory for DCSFW
PRAP - Prerequisite for DIE , DCSYS
PRED - Prerequisite for DIE , DCSYS
PS - Prerequisite for DCSFW

Instructors

Person in charge:  Conrado Martínez Parra (conrado@lsi.upc.edu)
Others:Amalia Duch Brown (duch@lsi.upc.edu)
Ana Edelmira Pasarella Sanchez (edelmira@lsi.upc.edu)
Carles Franquesa Niubo (carles.franquesa-niubo@upc.edu)
Gabriel Alejandro Valiente Feruglio (valiente@lsi.upc.edu)
Maria Teresa Abad Soriano (mabad@lsi.upc.edu)

General goals

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.

Specific goals

Knowledges

  1. Analysis of algorithms: efficiency, costs, cases, asymptotic notation, solution of simple recurrences.
  2. Data structures: Priority queues, dictionaries, graphs.
  3. Algorithm schemes: Divide and conquer algorithms, greedy algorithms, exhaustive search algorithms, dynamic programming.
  4. Basic algorithms: Ordering, shortest paths, tree expansion.

Abilities

  1. Familiarisation with some of the basic techniques for designing and analyzing algorithms and data structures.
  2. Acquire the methodology for drawing up a specification and identifying ADT use, design and ADT implementation.
  3. Know-how in the use of various efficient data-structuring techniques.
  4. Knowledge of generic ADT techniques, and how to use and modify them to yield the solutions required.
  5. Know-how in checking the correctness and efficiency of ADT implementations and the algorithms which they employ.
  6. Criteria for choosing the most appropriate design and implementation options during the specification stage, and the ability to set forth a reasoned argument for the choices made.
  7. Knowledge of some of the classic algorithms for dealing with basic problems.
  8. Knowing how to adapt general algorithmic schemes to solve problems.

Competences

  1. Critical, logical-mathematical reasoning.
  2. Ability to solve problems through the application of scientific and engineering methods.
  3. Ability to design systems, components and processes meeting certain needs, using the most appropriate methods, techniques and tools in each case.
  4. Ability to think in abstract terms. Ability to tackle new problems by consciously using strategies that have proved useful in solving previous problems.
  5. Know-how to apply the solution cycle to common scientific and engineering problems: specification, coming with ideas and alternatives, design solution strategies, carrying out the strategy, validation, interpretation and evaluation of results. Ability to analyse the process on completion.
  6. Ability to study various sources, recognise that the information obtained in class is insufficient, and to seek the supplementary information required.
  7. Ability to relate and structure information from various sources and thus integrate ideas and knowledge.

Contents

Estimated time (hours):

T P L Alt Ext. L Stu A. time
Theory Problems Laboratory Other activities External Laboratory Study Additional time

1. Analysis of algorithms
T      P      L      Alt    Ext. L Stu    A. time Total 
5,0 5,0 0 0 0 10,0 0 20,0
Time and space costs.



Worst case, best case, and middle case.



Asymptotic notation.



Calculating the cost of iterative and recursive algorithms.

2. Divide and Conquer algorithms
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

3. More Data Structures
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

4. Graphs
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

5. Greedy 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

6. Exhaustive search 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 exhaustive search algorithms



Backtracking and branch and bound



Examples



Notions of complexity

7. Dynamic programming 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 dynamic programming algorithms
The optimality principle
Recursive solutions featuring memoization and iterative algorithms
Shortest paths: Floyd
Edit distance
Other examples

8. Lab C++
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

Docent Methodolgy

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.

Evaluation Methodgy

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.

Basic Bibliography

  • R. Sedgewick Bundle of Algorithms in CPP, Parts 1-5: Fundamentals, Data Structures, Sorting, Searching, and Graph Algorithms (3rd Edition), Addison-Wesley, 2001.
  • M.A. Weiss Data Structures and Algorithm Analysis in CPP (2nd Edition), Addison-Wesley, 1999.
  • T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein Introduction to Algorithms, Second Edition, MIT Press, 2001.
  • Brassard, Bratley Fundamentos de Algoritmia, Prentice Hall, 1997.

Complementary Bibliography

  • M.A. Weiss Data Structures and Problem Solving Using CPP (Second Edition), Addison-Wesley,, 2000.
  • Ian Parberry and William Gasarch Problems on Algorithms, 2a edició disponible online a http://hercule.csci.unt.edu/ian/books/poa.html, 2002.
  • N. Martí, Y. Ortega, J.A. Verdejo Estructuras de datos y métodos algorítmicos - Ejercicios resueltos, Prentice Práctica, 2003.

Web links

(no available informacion)

Previous capacities

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.



 
logo FIB © Barcelona school of informatics - webmaster@fib.upc.edu - RSS RSS