CS4234 - Optimisation Algorithms


Overview (from Dr Seth Gilbert's version of S1 AY 2015/16 - 2 years ago): This course focuses on algorithms for solving optimization (American spelling) or optimisation (British spelling) problems, particularly focusing on combinatorial optimization. These types of problems are ubiquitous, with applications in a multitude of domains. They are used by companies to manage supply chains, retail chains to decide where and when to open new stores, and ports to manage incoming and outgoing cargo containers. In this course, we will cover a variety of powerful techniques for solving these types of problems.

Official description: This module covers common algorithmic techniques for solving optimisation problems, and introduces students to approaches for finding good-enough solutions to NP-hard problems. Topics covered include linear and integer programming, network flow algorithms, local search heuristics, approximation algorithms, and randomized algorithms. Through analysis and application of the techniques to a variety of canonical problems, students develop confidence to (i) appropriately model a given optimisation problem, (ii) apply appropriate algorithmic techniques to solve the problem, (iii) analyse the properties of the problem and candidate algorithms, such as time and space complexity, convergence, approximability, and optimality bound.

Note: This introductory message will not be prominent the next time you visit this URL again. This behavior is normal. You can view it again by scrolling to the top of this page.

Course Registration

The expected number of CS4234 students for Semester 1 (S1) AY2017/2018 should be similar to the past 2 AYs: ~40 students.
After recess week, the final official number of students for S1 AY2017/2018 is 33 students.

Useful information that has been used by current students to decide on whether they should register for CS4234 (see CS4234 in nusmods.com, no review though) in S1 AY 2017/2018:

  1. It is Steven's second iteration. The first iteration went relatively well and many known weaker spots from the first iteration will be improved in the second iteration. Steven did his PhD thesis around this topic more than ~13 years ago (2004) and teaching the first iteration last year (2016) has refreshed his own knowledge of this topic. VisuAlgo is currently being enhanced to include some NP-hard/complete topics too by the TA of this module (Rais). Hopefully the second iteration will run at least equal or even better than the first iteration :).
  2. Teaching staffs:
    (Senior) Lecturer: Dr Steven Halim, the key man behind VisuAlgo that will be used with increasing importance in some of CS4234 lectures.
    His 'Dr' title was obtained after ~6 years working on NP-hard Combinatorial Optimization Problems (2004-2010)...

    Teaching Assistant (TA): Muhammad Rais Fathin Mudzakir, our main coder in recent ACM ICPC World Finals 2017.
    Machines, e.g. Mooshak, VisuAlgo, and Kattis will continue be used to help Steven run this module...

    Rating (out of 5.00) Aug-Nov 2017 (n=20/33) Aug-Nov 2016 (n=23/40)
    Module feedback 4.4 (above CS dept average) 4.00
    Module difficulty 4.1 (slightly harder than CS dept average, similar across 2 AY) 4.13
    Steven's teaching 4.6 (above CS dept average) 4.53


Steven will improve his second iteration of CS4234 with the following updated lesson plan (initially derived from Dr Seth Gilbert's version of S1 AY 2015/16 but has branched out since then):

  • Part 1 (about 4 weeks): Introduction to Combinatorial Optimization:
    1. Some NP-hard optimization problems: Min-Vertex-Cover (2 variants, both are available @ VisuAlgo), Max-Clique, Min-Set-Cover, Steiner-Tree (3 variants, the General-Steiner-Tree variant is available @ VisuAlgo), Traveling-Salesman-Problem (4 variants, one is available @ VisuAlgo), and a few others
    2. Current Approaches: Special Case(s), Small Instance/Parameterized Solution(s), Approximation Algorithm(s), and one more at Part 3
    3. Techniques Covered: (Clever) Brute Force/Complete Search, Dynamic Programming, Greedy Algorithm, Approximation Algorithm, Linear Programming, Integer Linear Programing (with relaxation)
  • Part 2 (about 4 weeks): Network Flows and Matching:
    1. Problem Definition and Basic Algorithm: The Ford Fulkerson's Algorithm
    2. Analysis of various Augmenting Path heuristics for Ford Fulkerson's Algorithm, some have Max Flow Visualization @ VisuAlgo
    3. The Push-Relabel Algorithm
    4. Graph Matching Algorithms, especially the Bipartite and Non-Bipartite Unweighted Matching Visualization @ VisuAlgo
  • Part 3 (about 4 weeks): (Meta-)Heuristics/(Stochastic) Local Search:
    1. Techniques Covered: Gradient Descent/Hill Climbing, Simulated Annealing, Tabu Search, Iterated Local Search, etc
    2. Trip to the Past: Discussing Steven's past PhD Thesis about Optimization Algorithms (2004-2010): SLS Design and Tuning Problem
  • Throughought this module:
    1. Lots of Proofs :O (but we will skip some complicated one-time proofs in class if they become too dry but the details are in the lecture notes)
    2. Implementation of (some of) these advanced optimization algorithms (via help of Online Judge) and their empirical analysis (especially for Part 3)

Course Registration Additional FAQ

If you have any important questions regarding this module, email stevenhalim at gmail dot com. Relevant answers will be posted here to reach wider audiences.

Q: Will this module be graded using Bell curve?
A: With just 33 students (7 lower than last AY), a rather weak Bell Curve system (or maybe none?) will be used :O.
Q: Will this module flocked by students who have (very) good CS3230 grades?
A: Not 100% true, but indeed many of the first iteration students have reasonably strong interest in algorithm (thus reasonably good CS3230 grades and also good grades on previous related algorithm modules).
Q: How different will your version be compared to last year (AY 2016/17) version?
A: The second iteration will improve on the relatively successful first iteration. However, as Steven teaches about 'local search' in this module that emphasizes minor changes if the (local) search is already near a local (not necessarily global) optima, he will only do these minor local changes: (Slightly) less coding, (slightly) better proof presentation, (slightly) less competitive than the first iteration.
Q: Will there be some form of coding in this course?
A: The lecturer is (or was?) a competitive programmer. So yes, there will be implementation side of the various optimization algorithms that we discuss in class. You will implement real algorithms to attack real NP-hard optimization problems throughout this module.
Q: Do I have to buy any textbook for this course?
A: My Competitive Programming book, the CP3.17b edition (actually for CS3233) can be a good book for a small subset of the topics (especially the implementation side). But in CS4234, we will also discuss NP-hard problems that do not have efficient solutions (started to be covered a bit in CP3.17b edition and will be expanded a bit more by CP4). Introduction to Algorithms (by CLRS, the typical textbook used in CS3230) and Algorithm Design (by Kleinberg and Tardos) are also recommended. Steven will also try to continue expanding Seth's initial LaTeX-style lecture summary that was already available for the Part 1 of the class but not yet available for Part 2-3 of the class.

Note: This course registration section will not be prominent from Week 02 onwards (after the first lecture). This behavior is normal. You can view it again by scrolling to the top of this page.


Date News

Lesson Plan

Week Lecture
Tue 12-2pm
COM1-0204 (no webcast facility here)
Cells with course material that are not ready yet are highlighted with light pink color, past classes are highlighted with khaki color, current week is highlighted with light green color, future classes are not highlighted
PS: Public holiday on Wed, 9 Aug 17 (Singapore National Day)
but CS4234 first lecture is not affected and Steven has already returned from Tehran, Iran (for IOI 2017) by this week.
14 Aug
Not started
But please revise your CS1020+CS2010/CS2020 (future: CS2040) and CS3230
14-18 Aug
01.VertexCover.pptx, 01.VertexCover.pdf (both 2017 version)
Extra Reference: MVC @ VisuAlgo (the unweighted version)
Understanding Unsolvable Problem
(Re)-Introduction to the Min-Vertex-Cover problem (CS3230 review) and the 3C2 idea
21-25 Aug
02.LPIntro.pptx, 02.LPIntro.pdf (2016 version)
Extra Reference: MVC @ VisuAlgo (the weighted version)
Extra Material: 02.ExcelSample.xlsx, Simplex C++ implementation
Introduction to (Integer) Linear Programming + Relaxation
The Min-Weight-Vertex-Cover problem
28 Aug-01 Sep
03a.SetCover.pptx, 03a.SetCover.pdf (2016 version)
Another Combinatorial Optimization Problem (COP): Min-Set-Cover

03b.SteinerTree.pptx, 03b.SteinerTree.pdf (2016 version)
Yet another COP: Steiner-Tree (3 variants)
Extra Reference: Steiner Tree @ VisuAlgo (the general/graph version)
04-08 Sep
04.TSP.pptx, 04.TSP.pdf (2016 version)
Going deeper on this classic Travelling-Salesman-Problem
Extra Reference: TSP @ VisuAlgo
Extra Material: Someone made a movie out of this: Trailer, Movie website
11-15 Sep
Introduction to Max-Flow Problem
Ford-Fulkerson Algorithm
Max-Flow/Min-Cut Theorem
Max-Flow Visualization @ VisuAlgo
18-22 Sep
Analyzing the performance of Ford-Fulkerson
Other Augmenting Path Heuristics: Fattest-Path, Capacity-Scaling,
Edmonds Karp's Algorithm
Max-Flow Visualization @ VisuAlgo again
Recess Week, 23 Sep-01 Oct 2017
We can take a break this week :)
02-06 Oct
Introducing the Push-Relabel Algorithm
Sample (manual) execution
(no VisuAlgo page yet involving Push-Relabel)
Analysis of Basic Push-Relabel Algorithm
09-13 Oct
Midterm Test (25%)
Plan: Week01-06 material, excluding Lecture 7 Push-Relabel, but including T05
Including stuffs from PS1-3 (PS4 exposure is good to have too btw)
Open book (no restriction on this)
Only one constraint: No electronic device (except normal calculator)
Last year paper (S1 AY 2016/17) is here.
This year paper (S1 AY 2017/18) is currently in IVLE Workbin only.
16-20 Oct
Introduction to Max-(Cardinality/Weight)-(Bipartite)-Matching Problem
Max-Flow, Augmenting Path Algorithm++, Hopcroft Karp's Algorithm
Preview of Min-Cost Max-Flow, Hungarian, and Edmonds's Matching Algorithm
Graph Matching Visualization @ VisuAlgo

PS: Deepavali, 18 Oct 2017 (Wed)
No CS4234 class is affected
23-27 Oct
Introduction to Stochastic Local Search (SLS)
Paradigm change, SLS Characteristics,
No proof, just experiments...
30 Oct-03 Nov
Discussions of a few, more-sophisticated SLS algorithms
Simulated Annealing, Tabu Search, Iterated Local Search, Evolutionary Algorithms, etc...
Highlight on the need of tuning certain parameters of those SLS algorithms...
06-10 Nov
SLS Design and Tuning Problem (DTP)
Designing SLS algorithm; Doing (Parameter) Tuning;
Fitness Landscape and Search Trajectory Analysis
Example on another NP-hard COP: Quadratic-Assignment-Problem
qap_a-ro-ts-i.avi, qap_a-ro-ts-a.avi, qap_b-ro-ts-i.avi, qap_b-ro-ts-b.avi, QAP_FL_Demo.exe
ACM ICPC Jakarta 2017
Steven, Rais, and 3 other current CS4234 students (Wei Liang, Kien, Xinan) have competed in ACM ICPC Jakarta 2017, 10-11-12-13 Nov 2017
No CS4234 class was affected

13-17 Nov
Steven's PhD thesis: 2004-2010, downloadable from NUS ScholarBank
Continuation of Lecture 11
More FL/ST insights; More on SLS implementation techniques
Invitation to do PhD in algorithm... :)
Closed with module review and final assessment preview
Study Week
Final Assessment Consultations (per request)
Final Assessment, Wed, 29 Nov 2017 (Afternoon), Venue: COM1-02-12 (SR3, near our own lecture room) (35%)
Last year paper (S1 AY 2016/17) is here.
This year paper (S1 AY 2017/18) can be found at IVLE workbin (will be a 'past paper' next year).

Class Roster

Steven uses a small-scale gamification system in his version of CS4234 for extra study motivation.
The list of possible achievements are as follows: (achievements highlighted with red color/green color are already completed in the past/being given, respectively)

  1. MPE: Given to students who got CS4234 via MPE (21 July 2017), i.e. the early birds...
  2. Bid (Round): Given to students who bid CS4234 via CORS (late July-early August 2017) instead of MPE-ing it during early July 2017 (closed after round 3B; Master/PhD student do not have to bid but will be classified here anyway)
  3. I Say Hi: Given to students who reply Steven's first email regarding their reasons for taking CS4234 (sent on Monday, 07 August 2017, 3.50pm); It will help Steven in planning the second iteration of this module (closed after the first lecture)
  4. In FB: Given to students who are already in CS4234 FB group (closed after tutorial 01)
  5. Kiasu (#): Given to the first 7 students who solve all subtasks of PS1-Art Gallery+
  6. Spanning Tree Master (#): Given to the first 7 students who solve all subtasks of PS2-Rubble+
  7. Mini Researcher (#): Given to the 5 students who have 100 points in PS3 (written)
  8. Flows Like Water (#): Given to the first 7 students who solve all (different) tasks of PS4-Flows
  9. Test Master (#): Given to the top 9 students who have the highest Midterm Test scores
  10. Active in Class: Given to the top 3 students per tutorial group who participated the most in our first 9+ tutorial classes (Given on Week 11+, these students will get full 5% tutorial participation points, the rest will fight for 4, 3, 2, 1% tutorial participation points)
  11. Future Algorithm Researcher: Given to top 3 project groups who perform well in their mini project about SLS experiments on two (NP-)hard COPs
  12. Nowhere to Hide (Reason): Given to students who already remembered by Steven; These students can choose to hide their matric cards during CS4234 official assessments and Steven will allow them to do so
Student Name