INF2-IADS: Schedule and Course Materials for Semester 2 (Spring 2024)

Week (commencing)DateEventLecturerTopicReading 
 1   (15 Jan)Tue 16 JanLecture 1Aris 

Lecture 16a - Semester 2 Introduction

Lecture 16 - Greedy Algorithms: Interval Scheduling 

Lecture 16 - Greedy Algorithms: Interval Scheduling (.key file, better animations)

Kleinberg and Tardos 4.1 (online version from the library), 5.1. (printed version). 
Fri 19 JanLecture 2Aris

Lecture 17 - Greedy Algorithms: Dijkstra's algorithm for shortest paths

Lecture 17 - Greedy Algorithms: Dijkstra's algorithm for shortest paths (.key file, better animations) 

Recordings      
The algorithm      
Correctness      
Running Time

Kleinberg and Tardos 4.4 (online version from the library), 5.4. (printed version). 
2 (22 Jan)Tue 23 JanLecture 3Aris 

Lecture 18 - Dynamic Programming: Weighted Interval Scheduling

Lecture 18 - Dynamic Programming: Weighted Interval Scheduling (.pptx)

Kleinberg and Tardos 6.1 
Fri 26 JanLecture 4Aris

Lecture 19 - Dynamic Programming: Subset Sum and Knapsack

Lecture 19 - Dynamic Programming: Subset Sum and Knapsack (.key file, better animations)

Kleinberg and Tardos 6.4

Roughgarden 16.5 

 
 Mon 22 Fri 26 JanLab 6 

Lab Sheet 4: Greedy Algorithms

Solutions

  
3 (29 Jan)Tue 30 JanLecture 5Aris 

Lecture 20 - Dynamic Programming: The Bellman-Ford Algorithm for Shortest Paths

Lecture 20 - Dynamic Programming: The Bellman-Ford Algorithm for Shortest Paths (.key file, better animations)

Kleinberg and Tardos 6.8.(see also 6.10 if you are interested in how to find negative cycles, when they exist).     

CLRS 22.1.     

Roughgarden 18.1, 18.2.
 
Fri 2 FebLecture 6John

Lecture 21 - Context-Free Languages and Grammars

Pre-recorded video version (including song)

M. Sipser, Introduction to the Theory of Computation (3rd ed.), Section 2.1. Available online from UoE library.

Wikipedia article on Context-free grammar

Other resources as listed on Slide 21.

 
 Multiple datesTutorial 1 

Tutorial 6 - Greedy and Dynamic Programming

Solutions

  
4 (5 Feb)Tue 6 FebLecture 7John 

Lecture 22 - CYK Parsing for Context-Free Languages

Pre-recorded video version

  
Fri 9 FebLecture 8John

Lecture 23 - Predictive Parsing

Pre-recorded video version

  
 Multiple datesTutorial 2 

Tutorial 7 - Dynamic Programming

Solutions

  
 Mon 22 Fri 26 JanLab 6 

Lab Sheet 5: Dynamic Programming

Solutions

Bellman-Ford.txt

WIS.txt

  
5 (12 Feb)Tue 13 FebLecture 9Aris 

Lecture 24 - Introduction to NP-completeness

Lecture 24 - Introduction to NP-completeness (.key file, better animations)

Kleinberg and Tardos 8.1 (up to page 454), 8.4. 
Fri 16 FebLecture 10Aris

Lecture 25 - NP-completeness of Vertex Cover

Lecture 25 NP-completeness of Vertex Cover (.key file, better animations)

M. Sipser, Introduction to the Theory of Computation (3rd ed.), Section 7.5, proof of Thm 7.44. Available online from UoE library. 
6 (26 Feb)Tue 27 FebLecture 11Aris 

Lecture 26 - NP-completeness: A closer look

Lecture 26 - NP-completeness: A closer look (.key file, better animations)

Kleinberg and Tardos 8.3., 8.10.   

Roughgarden Chapters 19, 23 (read through). 
 
 Multiple datesTutorial 3 

Tutorial 8 - Parsing Algorithms and Polytime Reductions

Solutions

  
7 (4 Mar)Tue 5 MarLecture 12Aris 

Lecture 27 - Greedy Approximation Algorithms

Lecture 27 - Greedy Approximation Algorithms (.key file, better animations)

Kleinberg and Tardos 11.1  

Roughgarden 20.1

Williamson and Shmoys, The Design of Approximation Algorithms, 1.1, 2.3. Available online from UoE library. 

 
8 (11 Mar)Tue 12 MarLecture 13Aris 

Lecture 28 - (Fully) Polynomial-Time Approximation Schemes

Lecture 28- (Fully) Polynomial-Time Approximation Schemes(.key file, better animations)

Kleinberg and Tardos 11.8

Williamson and Shmoys, The Design of Approximation Algorithms, 3.1. Available online from UoE library. 

 
 Multiple datesTutorial 3 

Tutorial 9 - Approximation Algorithms

Solutions

  
 Mon 11 Fri 15 MarLab 7 

Lab Sheet 6: NP-completeness

Solutions

  
9 (18 Mar)Tue 19 MarLecture 14John Lecture 29 - Intro to Computability TheoryM. Sipser, Introduction to the Theory of Computation (3rd ed.), Chapter 3. Available online from UoE library 
10 (25 Mar)Tue 26 MarLecture 15John

Lecture 30 - Unsolvable Problems

Tutorial 10 - Register machines and computability

Solutions

  

 

 

MATERIAL FROM LAST YEAR

WeekDateEventLecturerTopicReading
 1

Tue 16 Jan

(2024)

Lecture 16Mary

Graphs III:  Dijkstra's Algorithm

video playlist, slides

  • CLRS Ed 3: 22.1, 24: (580-586), 24.3, 24.5  
  • CLRS Ed 4: 20.1, 22.2, 22.3 and 24.5 
  • AIgs.Illum: 9.1, 9.2, 9.3 and 10.4, 10.5
Thu 18 JanLecture 17Mary

Introduction to Dynamic Programming

video playlist, slides

 2variesLab 6*

Lab sheet 4: Dynamic Programming in Python,

coin_changing.py, 

solutions: coin_changing_sol.py, editdist_sol.py

 
Tue 23 JanLecture 18Mary

Seam-Carving by Dynamic Programming

(with seam-carving demo video)

video playlist (parts 1-2), seam carving video, slides

CLRS 15.3, 15.4 (though they refer to problems we don't consider)   

GTG 13.3.2 (somewhat relevant)

The original "Seam Carving" paper is here.

Thu 25 JanLecture 19Mary

Edit distance by Dynamic Programming

video playlist (parts 3-5), slides

 
 3variesLab 7*Lab sheet 5: Dijkstra's algorithm in Python 
variesTutorial 6*

Dynamic Programming

solutions, slides, Edit Distance trick (Raul Garcia)

Jiaheng's slides part 1 (from 2022, please ignore Floyd), part 2 (knapsack)

 
Tues 30 JanLecture 20Mary

Probabilistic Finite State Machines and the Viterbi Algorithm

(last year's) video playlist, slides

 
Thu 1 FebLecture 21John

Context-free Languages and Grammars

last year's video playlistslides        
 

 
 4variesTutorial 7*

Dynamic programming (cont'd) and Context-free Grammars

solutions, slides, Jiaheng's 2022 slides

 
Tues 6 FebLecture 22John

Parsing for Context-free Languages: The CYK Algorithm 

last year's video playlist,  slides

 
Thu 8 FebLecture 23John

LL(1) Predictive Parsing 

last year's video playlist,  slides        
 

 
 5Tues 13 FebLecture 24Mary (CANCELLED due to strike)  
Thu 15 FebLecture 25Mary (CANCELLED due to strike)  
 FLW

Mon 19 -

Fri 23 Feb

  NO COURSE ACTIVITIES 
 6variesTutorial 8*


Parsing algorithms

Solutions, basic slides , Jiaheng's 2023 slides

 
Tues 27 FebLecture 24Mary

P and NP

video playlist (2020/21),, slides

CLRS 34 (intro), 34.1, 34.2, 34.3

OR "Algorithms Illuminated" Chap 19, Sects 22.1, 22.2

 7variesLab 9*Drop-in for coursework 2 
Tues 5 MarLecture 25Mary

Satisfiability and NP-completeness

video playlist (2020/21), slides

 CLRS 34.4, 34.5

OR "Algorithms Illuminated" Sects 22.3, 22.4, 22.5

 8variesLab 10*Drop-in for coursework 2 
variesTutorial 9*

NP-completeness and Approximation algorithms

Solutions, Jiaheng's 2023 slides        

 

 
Tues 12 MarLecture 28John

Introduction to Computability Theory

video playlist (2020/21),  slides

 
 9Tues 20 MarLecture 29John

Unsolvable Problems

 video playlist (2020/21),   slides

 
 10variesTutorial 10*


Register machines and computability

Solutions

 
Tues 27 MarLecture 30Mary

Revision Lecture

 

Sample paper and solutions

video playlist (from 2020/21), slides

 

 

License
All rights reserved The University of Edinburgh