Faculdade de Ciências e Tecnologia da Universidade NOVA de Lisboa

LEI · Faculdade de Ciências e Tecnologia da Universidade NOVA de Lisboa

Theory of Computation

TCCourse Page
  • 6 ECTS
  • 2nd Semester
  • Exam: Optional
Overall
5
0
4
2
3
3
2
2
1
1
2.8
★★★★★
8 ratings
Workload
Very light
0
Light
0
Moderate
7
Heavy
1
Very heavy
0
Moderate8 ratings

Feedback

2025/2026
★★★★★
Workload:Moderate

4 months ago

Professor rigoroso mas pouco claro de como funciona a cadeira, critérios de avalição nos testes não são esclarecidos e não correspondem com as aulas práticas, slides irrelevantes para os testes, com apenas a presença e aplicação nas aulas práticas é possível passar sem problemas

★★★★★
Workload:Moderate

4 months ago

Importante não deixar muito para trás, começa um pouco confuso mas fácil de apanhar.

Cuidado com o professor ravara, reclamem quando acharem incorreto algo...

★★★★★
Workload:Moderate

4 months ago

A cadeira é fácil, principalmente o segundo teste. É preciso estudar, claro, para ter prática. Os testes costumam seguir o mesmo modelo então vejam testes anteriores. Embora não tenha gostado muito das aulas teóricas, aprendia tanto nas práticas que nem precisava de ir às outras, as práticas eram muito boas

★★★★★
Workload:Moderate

4 months ago

A cadeira de Teoria da Computação foi, na minha opinião, uma unidade curricular importante para perceber melhor as bases teóricas da informática. Apesar de ser uma cadeira mais abstrata do que outras do curso, acaba por ser útil porque ajuda a desenvolver raciocínio lógico e a compreender melhor conceitos como linguagens, autómatos, gramáticas e computabilidade.

A carga de trabalho foi moderada a pesada. A matéria não é impossível, mas exige acompanhamento regular, porque alguns conceitos podem parecer confusos no início. O mais importante é não deixar acumular, especialmente nos tópicos de autómatos, expressões regulares, gramáticas e máquinas de Turing, porque são matérias que precisam de prática para se tornarem naturais.

O método de ensino ajudou sobretudo quando a matéria era acompanhada por exemplos e exercícios resolvidos. Nesta cadeira, perceber apenas a teoria não chega; é essencial praticar diferentes tipos de exercícios para ganhar intuição sobre como construir autómatos, transformar expressões regulares, trabalhar com gramáticas e justificar corretamente os raciocínios.

Em relação à avaliação, a melhor estratégia é resolver muitos exercícios e exames de anos anteriores. A cadeira exige algum rigor, principalmente nas justificações, por isso é importante não decorar apenas métodos, mas perceber o motivo pelo qual cada construção funciona. Muitas vezes, a dificuldade está em interpretar bem o enunciado e escolher a abordagem certa.

Relativamente aos materiais, os slides são úteis para acompanhar os conceitos principais, mas o verdadeiro progresso acontece ao praticar. Fazer exercícios variados ajuda bastante, porque existem padrões que se repetem e, com treino, começa-se a perceber mais rapidamente que tipo de solução aplicar.

Algumas dicas para futuros alunos:

  • Não deixem a matéria acumular, porque os conceitos vão ficando ligados uns aos outros.
  • Pratiquem bastante autómatos, expressões regulares e gramáticas.
  • Tentem perceber o raciocínio por trás das construções, em vez de decorar apenas exemplos.
  • Resolvam exames de anos anteriores para se habituarem ao estilo das perguntas.
  • Tenham atenção às justificações, porque em TC não basta apresentar o resultado final.
  • Quando um exercício parecer abstrato, tentem começar por exemplos simples da linguagem.
  • Façam esquemas, estados, tabelas ou árvores sempre que isso ajudar a visualizar o problema.

No geral, considero que TC é uma cadeira exigente a nível de raciocínio, mas bastante importante para a formação em Engenharia Informática. Pode parecer abstrata no início, mas com prática torna-se mais clara. Quem acompanha a matéria e resolve muitos exercícios acaba por desenvolver uma boa base lógica e uma melhor capacidade de pensar formalmente sobre problemas de computação.

★★★★★
Workload:Moderate

4 months ago

É semelhante a LC. Tem uns conceitos um bocado teóricos, mas que indo às aulas práticas e usando as fichas práticas como elemento de estudo, faz com que os testes pareçam acessíveis. A parte negativa desta cadeira é o regente, que demonstra uma grande frustração nos bons resultados dos alunos e isso acaba por ser um pouco desmotivante. Como conselho, se desfocarem um pouco da questao do professor e estudarem, vai correr bem.

★★★★★
Workload:Moderate

4 months ago

  • Os testes são corrigidos de uma maneira extremamente específica. Recomendo sempre verificar com o professor regente o modo de como resolver problemas para ter nota máxima.
  • Não confiar nas soluções das práticas a 100%, a menos que sejam dadas pelo regente.
  • A cadeira apresenta duas componentes de avaliação extraordinárias: presença nas aulas (presença na maioria das aulas = +1 valor) e um problema a resolver com o professor ao longo do semestre. Para o último, recomendo escolher a matéria com que te sintas mais confortável, de entre os três testes.
  • Os slides são decentes, bem como as notas. Recomendo usar ambos para maximizar as chances de perceber o conteúdo. A matéria também se encontra bem explicada no youtube ou outros recursos.
  • Não recomendo usar respostas de LLMs 1:1, dado o exposto no primeiro ponto.
★★★★★
Workload:Moderate

4 months ago

Compensa ir muito nas aulas práticas. O regente e muito chato nas correcções dos testes. Ha vários exercícios no clip que sao realizados em aula. Recomendo ter um estudo regular.

About the course

Objectives

Know the theoretical foundations of computation, the formal concept of algorithm, and the existence of undecidable problems. Know the classes of formal languages, associated computational models, and the relationship between them. Understand the concept of Turing universality. Recognise (semi-)decidable languages.****

Distinguish countable from non-countable sets. Model systems using finite automata, deterministic (DFA) and non-deterministic (NFA). Construct a finite automata from a regular expression and conversely. Construct a DFA equivalent to a NFA. Define context free languages using grammars. Construct LL and LR parsers. Recognise expressiveness limits of languages and (un)decidable computational problems.

Syllabus

**1. Set Theory **

Set cardinality, countable and uncontable sets, Cantor’s diagonalisation argument. Difference between function and algorithm. Decision problems and languages.

2. Machines, Automata and Specifications

What is a model of computation? Finite automata and regular expressions. Determinism and non-determinism in computation. Context Free languages and Stack machines. Parsing algorithms (LL and LR). Turing machines.

3. Computability

Turing universality. Church-Turing thesis. Undecidability of problems(e.g., termination) and (semi-)decidability of languages.

Something missing or out of date?

Assessment

This course has two evaluation components: A practical component (P) and a theoretical/practical component (T).

  • The P component, which is not mandatory, is divided in two sub-components, P1 and P2:

- The P1 component evaluates active participation in lab lectures (1 point out of 20, in direct proportion to the number of lectures in which the student actively participated). Students should present original solutions to some of the proposed exercises to the lecturer.

- The P2 component consists in the presentation to the head lecturer (in an oral discussion) of a detailed solution of an exercise proposed by the lecturer. Possible exercises are those used in evaluation tests in previous years. This assessment is solicited by the students and occurs during the teaching period. During the presentation the use of any auxiliary material or device is not allowed.

The final grade of this component is given by P = P1 + P2.

  • The T component consists of 3 individual in-person tests (T1 to T3), or an in-person exam (Ex). Students are allowed to use one side of an A4 handwritten sheet as help for each test - three in the exam (one for each part corresponding to a test). These sheets, identified with the student number, should be delivered with the answer book. All written evaluations in the T component will be graded in a 0-20 scale.

The grade for this component is the average of the tests grades converted to 0-18, i-e-, given by T = 0.9*(T1 + T2 + T3)/3 or T = 0.9*Ex. In order to obtain approval in the course, the T component must be at least 8.5.

Pre-registration is required for the tests. When the distribution of students across rooms is published, a room will be identified where students who did not register for the test might be able to take it, according to the following rule: if, 15 minutes after the actual start of the test, the number of unregistered students wishing to take the test can be accommodated in the indicated room, and if there are enough test papers available, these students may take the test, but they will not be given extra time; otherwise, if there is no space or test paper for all these students, none of them will take the test.

  • Final grade: The final grade (NF) is given by the following formula, where the P and T components are rounded to the nearest hundredth: NF = P + T. To aprove the course the minimum grade of NF is 9.5.

  • Improving grades: Only the T component may be improved. The grade obtained in the exam substitutes the grade obtained in this component.

Students who have obtained approval in the course in previous years must take the exam in full, and will keep the grades from the P and TP components from the previous year in which they obtained approval. In this case, the final grade is computed using the rules from last year.

  • No extra auxiliary material (besides the one referred above) nor electronic devices of any kind are permitted in written evaluations.

During an assessment, students may not have any electronic devices capable of accessing the internet or with Bluetooth connectivity (e.g., smartphones, smartwatches, smartglasses, tablets, laptops) with them, even if they are turned off. Violation of this rule results in immediate failure of the curricular unit by exclusion and will be reported to the Scientific Committee of the respective program.

Has the assessment changed, or is something missing?

Bibliography

Lecture notes for Theory of Computation (Luís Caires, 2015).

Lecture notes for Theory of Computation (João Ribeiro, 2024).

Christos Papadimitriou and Harry Lewis: “Elements of the theory of computation”, Prentice-Hall, 1982, second edition 1997.

Michael Sipser: "Introduction to the Theory of Computation", Cengage Learning, 2012, 3rd edition.

Missing a book or some materials?