Credits
6
Types
Compulsory
Requirements
This subject has not requirements
, but it has got previous capacities
Department
CS
Teachers
Person in charge
- Enric Rodriguez Carbonell ( erodri@cs.upc.edu )
Others
- Albert Oliveras Llunell ( oliveras@cs.upc.edu )
Weekly hours
Theory
2
Problems
1
Laboratory
1
Guided learning
0
Autonomous learning
6
Competences
Technical competencies
Transversals
Basic
Generic
Objectives
-
Be aware of the limits of computation: to undertand the implications of the question "P=NP?", understand the statement of Cook-Levin's Theorem, recognize and identify several classic NP-complete problems.
Related competences: CG5, -
To know, explain, design, analyze, compare and implement exhaustive search algorithms using the backtracking technique.
Related competences: CE2, CB5, -
To learn the dynamic programming scheme, identify when it can be applied and how, and be familiar with some fundamental dynamic programming algorithms.
Related competences: CE2, -
To learn the scheme of greedy algorithms, identify when it can be applied and how, learn the most usual techniques for proving their correctness and be familiar with some fundamental greedy algorithms.
Related competences: CE2, -
To complete and modify implementations of several algorithms for solving problems of average difficulty in the Python programming language.
Related competences: CE2, CT6, -
Identify and propose solutions to possible problems of efficiency in programs written in the Python programming language.
Related competences: CE2, CT6, -
To develop projects of average size as as member of a team, learning how to divide a project into smaller parts, to distribute them amongst its members and act with responsability in a coordinated way for the successful accomplishment of the assigned tasks.
Related competences: CE2, CT4, CT5, CT6, CT7, CG1, CG2, -
To learn algorithms based on local search for solving untractable problems efficiently. To learn a variety of metaheuristics of different nature and to be able to identify when and how they can be applied on concrete computationally hard problems.
Related competences: CE2, -
To learn the foundations of finite automata and regular expressions to be able to use them in practice (search of patters in texts, etc.)
Related competences: CE7,
Contents
-
Tractability: classes of problems P and NP
Classes P and NP, Cook-Levin's Theorem, reductions, NP-completeness. -
Exhaustive search
Theoretical foundations: space of solutions, partial solutions, pruning. Examples: subsets, permutations, travelling salesman, subset sum. -
Dynamic programming
Top-down scheme (memoization). Bottom-up scheme (tabulation). Examples: Fibonacci, binomial numbers, knapsack, matrix sequence multiplication. -
Greedy algorithms
Theoretical foundations: general scheme of greedy algorithms. Examples: task scheduling, etc. -
Metaheuristics
Local search. Simulated Annealing, Tabu Search, GRASP, genetic algorithms. -
Finite automata and regular expressions
Alphabets, words, languages. Deterministic finite automata, non-deterministic finite automata, finite automata with lambda-transitions, equivalence between automata models, minimization of automata.
Regular expressions, equivalence with automata. Operations.
Activities
Activity Evaluation act
Theory
6h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
8h
Theory
4h
Problems
0h
Laboratory
4h
Guided learning
0h
Autonomous learning
8h
Theory
4h
Problems
0h
Laboratory
4h
Guided learning
0h
Autonomous learning
8h
Theory
4h
Problems
2h
Laboratory
2h
Guided learning
0h
Autonomous learning
8h
Theory
4h
Problems
0h
Laboratory
6h
Guided learning
0h
Autonomous learning
8h
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
8h
Teaching methodology
The syllabus is explained in a practical way, through the presentation of many examples.Theory lectures introduce all of the required concepts and techniques, which are put into practice in the problem and lab lectures by means of a collection of problems and exercices in an automatic judge.
The two hours of theory classes are taught weekly. The two hours of lab classes are taught every other week. The two hours of problem classes are taught every other week.
The project integrates the contents and competences of all the course.
Evaluation methodology
NPar = grade mid term examNFT = grade final theory exam
NFL = grade final lab exam
NPro = grade project
FINAL GRADE = max( 30%Npar + 30%NFT + 20%NFL + 20% NPro, 60%NFT + 20%NFL + 20% NPro)
The grade of the reevaluation exam, if there is any and is higher, replaces the grade of the theory final exam (NFT). The grades of mid term, project and lab (NPar, NPro, NFL) are preserved.
Bibliography
Basic
-
Introduction to algorithms
- Cormen, T.H [et al.],
MIT Press,
[2022].
ISBN: 9780262046305
https://research-ebsco-com.recursos.biblioteca.upc.edu/c/ik5pvi/search/details/lq2sgumirf?db=nlebk -
Computers and intractability: a guide to the theory of NP-Completeness
- Garey, M.R.; Johnson, D.S,
W.H. Freeman,
1979.
ISBN: 0716710447
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991000087999706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Foundations of algorithms
- Neapolitan, R.E,
Jones and Bartlett Learning,
2015.
ISBN: 9781284049190
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991004097269706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Metaheuristics
- Siarry, P. (ed.),
Springer,
2017.
ISBN: 9783319832845
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991004156469706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Llenguatges, gramàtiques i autòmats: curs bàsic
- Cases, R.; Màrquez, L,
Edicions UPC,
2003.
ISBN: 8483017288
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991002699299706711&context=L&vid=34CSUC_UPC:VU1&lang=ca
Complementary
-
Handbook of metaheuristics
- Gendreau, M.; Potvin, J.-Y,
Springer,
2018.
ISBN: 9783319910857
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991004151509706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Algorithms
- Dasgupta, S.; Papadimitriou, C.; Vazirani, U.,
Mc Graw Hill Higher Education,
2008.
ISBN: 9780073523408
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991003202339706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Algorithms
- Sedgewick, R.; Wayne, K,
Addison-Wesley,
2011.
ISBN: 9780321573513
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991004156419706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Algorithm design
- Kleinberg, J.; Tardos, É,
Pearson,
2014.
ISBN: 9781292023946
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991004001669706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Introduction to automata theory, languages, and computation
- Hopcroft, J.E.; Motwani, R.; Ullman, J.D,
Pearson/Addison Wesley,
2007.
ISBN: 0321462254
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991003933959706711&context=L&vid=34CSUC_UPC:VU1&lang=ca
Web links
- Jutge automàtic per les sessions de laboratori https://jutge.org/
Previous capacities
- Familiarity with the basic techniques of programming: iterations, alternatives, recursive functions, parameter passing, classes, objects, methods, ...- Knowledge of basic algorithmic concepts: efficiency of algorithms, asymptotic notation, graphs, graph traversal, data structures (lists, search trees, hash, heaps, ...)
- Basic knowledge of discrete mathematics, linear algebra and calculus
- Basic knowledge of probability theory and statistics