Overview (from Dr Seth Gilbert's version of S1 AY 2015/16 - many AYs 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 course 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.
CS4234 class size average in the past 6 AYs is ~35 pax. We will go full F2F throughout this sem (except on the first and last weeks when Steven is known to be away).
Useful information that has been used by current students to decide on whether they should register for CS4234 (see CS4234 in nusmods.com) in S1 AY21/22:
(Senior) Lecturer: Dr Steven Halim, the key man behind VisuAlgo that will be used with increasing importance in some of CS4234 lectures. Steven is working towards fully flipping almost every modules that he teaches and there will be more flipped components (not all) in this course this semester... PS: His 'Dr' title was obtained after ~6 years working on (visualizations of local search algorithms on) NP-hard Combinatorial Optimization Problems (2004-2010)...
Teaching Assistant (TA): Audrey Felicio Anwar (took CS4234 last AY, A), Steven runs one tutorial session and Audrey takes the other two tutorial sessions.
Machines, e.g., VisuAlgo and Kattis will continue be used to help Steven run this course...
Rating (out of 5.0) |
Aug-Nov 22 (n=27/43) 63% ▼ |
Aug-Nov 21 (n=24/31) 77% ▲ |
Aug-Nov 20 (n=15/44) 34% ▼ |
Aug-Nov 19 (n=18/32) 56% ▼ |
Aug-Nov 18 (n=19/26) 73% ▲ |
Aug-Nov 17 (n=20/33) 60% ▲ |
Aug-Nov 16 (n=23/40) 58% |
---|---|---|---|---|---|---|---|
Course feedback (SoC avg ~3.9) | 4.3 ▼ (but as per target) | 4.5 ▲ (PB) | 4.1 ▼ (C-19+IOI20) | 4.2 ▼ (> avg) | 4.3 ▼ | 4.4 ▲ | 4.00 |
Course difficulty (SoC avg ~3.8) | 4.3 == (fail to reduce diff) | 4.3 ▼ | 4.4 ▲ (C-19+IOI20) | 4.2 == | 4.2 ▲ | 4.1 ▼ | 4.13 |
Steven's teaching (SoC avg ~4.2) | 4.5 == (more than target) | 4.5 ▲ | 4.1 ▼ (C-19+IOI20) | 4.7 ▲ (PB) | 4.6 == | 4.6 ▲ | 4.53 |
For the sixth iteration of CS4234, Steven uses the following lesson plan (initially derived from Dr Seth Gilbert's version of S1 AY15/16 but has significantly branched out since then). Also in S1 AY 2022/23, Steven is trying to push more 'flipped classroom' components in CS4234:
If you have any important questions regarding this course, email stevenhalim at gmail dot com. Relevant answers will be posted here to reach wider audiences.
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 |
---|
Week | Tutorial Date, Time, Venue |
Lecture Thu 12-2pm LT19 (F2F with post-lecture recordings) |
Assignment |
---|---|---|---|
Cells with course material that have not been updated are highlighted with pink color, past classes more than one week ago are hidden so that we can focus on the current and future classes, but you can restore them by clicking 'Show Past' button above, future classes are not highlighted | |||
00, Bef 08 Aug |
Not Started |
Please revise your CS1010+CS2040 (or their variants) and CS3230 PS: If you happen to have taken CS3233 before, revise Max Flow, Matching, and NP-hard/complete that we have discussed in CS3233 before Pre-reading material: CP4 Book 2 Chapter 8.6.6 (Min Vertex Cover) 01.VertexCover.pdf MVC @ VisuAlgo (the unweighted version) Understanding Unsolvable Problem Slides used in the flipped classroom (early recording: 00.Introduction.pdf (2022) Administrative stuffs for the S1 AY 2022/23 edition 01.VertexCoverLecture.pdf (2021, no change) (Re)-Introduction to the Min-Vertex-Cover problem (CS3230 review) and the 3C2 idea MVC Online Quiz (easy static questions at the moment) |
PS1-Prerequisites Out on Mon, 01 Aug 2022, 08.00am (start with 5 tasks) nus.kattis will help Steven + one TA checks your code PS1 only contains problems that can be solved with just CS1010+CS2040+CS3230 knowledge, namely: Greedy, DP, SSSP/APSP, MST, If you struggle to solve at least 3/5 tasks, it is a sign that maybe CS4234 is not for you (yet) |
01, 08-12 Aug |
Not started |
National Day is on Tue, 09 Aug 2022 But Steven is in Yogyakarta, Indonesia, for IOI 2022 According to the schedule for Thu, 11 Aug 22, midday (GMT+7 in IDN or GMT+8 in SGP), he is not able to do live (Zoom) class at this time, The first Lecture has been recorded on Week 00 |
PS1, continued |
02, 15-19 Aug |
Not Started |
Pre-reading material: Week 01 material (especially if you were absent on Week 01), plus: CP4 Book 2 Chapter 8.6.6 (Min Weight Vertex Cover) CP4 Book 2 Chapter 9.32 (Linear Programming) 02.LPIntro.pdf MVC @ VisuAlgo (now the weighted version) Slides used in the flipped classroom: 02.ApproximationLecture.pdf (2021) Approximation Algorithms for M(W)VC Introduction to (Integer) Linear Programming + Relaxation The Min-Weight-Vertex-Cover problem + its approximate solution Extra Material: 02.ExcelSample.xlsx, lp_solve tutorial, Simplex code in C++ or Java Or linprog-simplex in Python scipy |
PS2-NP-hard 1 Out on Sat, 20 Aug 2022, 08.00am (still 5 tasks) PS1 due on Sat, 20 Aug 2022, 07.59am Sun, 21 Aug 2022, 11.59pm (5%) Do not forget to decide whether CS4234 is for you (or not) by end of this Week 02... |
03, 22-26 Aug |
T01.pdf (ans in Discord) The Intro COP: Min-(Weight)-Vertex-Cover LP, 2 More COPs: Max-Clique, Graph-Coloring, PS1 Debrief |
Pre-reading material: CP4 Book 2 Chapter 8.6.7 (Set Cover) + 8.6.10 (Steiner Tree) 03a.SetCover.pdf No Min Set Cover visualization @ VisuAlgo yet :'(... 03b.SteinerTree.pdf Steiner Tree @ VisuAlgo (the general/graph version) Slides used in the flipped classroom: 03a.SetCoverLecture.pdf (2021) Another Combinatorial Optimization Problem (COP): Min-Set-Cover 03b.SteinerTreeLecture.pdf (2021) Yet another COP: Steiner-Tree (3 variants); stop at Complete Search solution |
PS2, continued |
04, 29 Aug- 02 Sep |
T02.pdf (ans in Discord) 4 More COPs: Min-Set-Cover Steiner-Tree Min-(Weight)-Feedback-Edge-Set 2-CNF-SAT PS2 Overview |
Pre-reading material: CP4 Book 2 Chapter 3.5 + 8.6.3 (TSP) 04.TSP.pdf TSP @ VisuAlgo (1.5-approx has a 'bug') Extra Material: Someone made a movie out of this: Trailer, Movie website Slides used in the flipped classroom: The last part (2-approximation) of 03b.SteinerTreeLecture.pdf (2021) 04.TSPLecture.pdf (2021) Going deeper on this classic Travelling-Salesman-Problem TSP Online Quiz (medium, static questions at the moment) |
PS2 due on Sat, 03 Sep 2022, 07.59am (5%) PS3-NP-hard 2+Flows 1 Out on Sat, 03 Sep 2022, 08.00am Scaled down to 4 tasks and 2.5 weeks |
05, 05-09 Sep |
T03.pdf (ans in Discord) 3 More COPs: Travelling-Salesman-Problem Max-Independent-Set PIT PS3 Overview |
Pre-reading material: CP4 Book 2 Chapter 8.4 (Network Flow) Max-Flow Visualization @ VisuAlgo (Slide 1-7) Before attending the class, at least read Overview and Motivation, Flow and Residual Graph (and their technical definitions), and test run FF/EK/Dinic's on some Example (flow) Graphs in VisuAlgo Slides used in the flipped classroom: 05.MaxFlowLecture.pdf (2022 - latest version) Introduction to Max-Flow Problem and its applications (using a random flow graph) Ford-Fulkerson Algorithm (a quick demonstration on that random flow graph) Max-Flow/Min-Cut Theorem (the hard one, the focus of the lecture) Analyzing the performance of Ford-Fulkerson (quick analysis) Better FF algorithms analysis: Edmonds-Karp + Dinic's Algorithm (follow up in T04) Max Flow Online Quiz (Medium) Live solve one simple max flow problem |
PS3, continued |
06, 12-16 Sep |
T04.pdf (ans in Discord) Back to a P optimization problems: Max-Flow Edmonds-Karp vs Dinic's discussion and analysis Max-Cardinality-Bipartite-Matching Max-Independent(/Edge-Disjoint)-Path Min-Cut Alternative Ford-Fulkerson analysis |
Pre-reading material: CP4 Book 1 Chapter 3.4 (Greedy Bipartite Matching) CP4 Book 1 Chapter 4.6.3 (Bipartite Graph) CP4 Book 2 Chapter 8.5 (Graph Matching) CP4 Book 2 Chapter 8.6 (special cases of some NP-hard problems) CP4 Book 2 Chapter 9.26 (Hopcroft-Karp Algorithm) Graph Matching Visualization @ VisuAlgo (Slide 1 to 4-21) Before attending the class, at least read Overview and skim through the various MCBM Algorithms then test run Augmenting Path algorithm (3 variants) on some Example (Bipartite Matching) Graphs in VisuAlgo Slides used in the flipped classroom: 06.MatchingLecture1.pdf (2022 - latest version) Introduction to (Weighted) Max-Cardinality-(Bipartite)-Matching Problem Week 06 focus: MCBM and its applications Max-Flow, Augmenting Path Algorithm Plus, Hopcroft-Karp/Dinic's Algorithm Matching Online Quiz (Medium) Live solve one MCBM-related problem |
PS3, continued |
Recess Week, 17-25 Sep 2022 We can take a break this week :) But only if you can finish PS3 earlier... and choose not to start PS4 early... |
PS3 due on Wed, 21 Sep 2022, 07.59am (5%) PS4-Flows 2+Matchings Out on Wed, 21 Sep 2022, 08.00am Still just 4 tasks and 3 weeks |
||
07, 26-30 Sep |
T05.pdf (ans in Discord) Assignment-Problem (Max-Flow vs MCBM version) Greedy MCBM Application of MCBM (or Max-Flow) on two NP-hard COPs Berge's theorem (revisited) |
Pre-reading material: CP4 Chapter 4.6.3+8.5+8.6+9.26 again, plus CP4 Book 2 Chapter 9.25 (Min Cost (Max) Flow) CP4 Book 2 Chapter 9.27 (Kuhn-Munkres Algorithm) CP4 Book 2 Chapter 9.28 (Edmonds' Matching Algorithm) Hungarian Method visualization @ TUM Graph Matching Visualization @ VisuAlgo (for Unweighted MCM) Slides used in the flipped classroom: 07.MatchingLecture2.pdf (2021) The 'harder' matching problems/algorithms Week 09 focus: Weighted MCBM (MCMF or Kuhn-Munkres/Hungarian), Unweighted MCM (Edmonds' Matching) --- high level tour, Weighted MCM (small graph), Wrap-ups of Graph Matching Topic |
PS4, continued |
08, 03-07 Oct |
T06 (modal answers are NOT uploaded) Midterm test preparation Steven has the modal answers of the past 6 midterm papers. (but we will scope our discussion to the recent 3 AYs only). This is a Free and Easy session. Discuss any past paper questions on the spot only. Each tutorial group may have different discussions. You can attend ≥ 1 tutorial groups if you want. |
Midterm Test [ONSITE, F2F] (25%) Material: Week 01-06, up to Matching Lecture part 1 Excluding Matching Lecture part 2 (only discussed on Week 07) Including stuffs from PS1-3 plus the first 2 tasks of PS4 Including stuffs from Tut01-06 notice the inclusion of Tut05+Tut06 Open book+Open laptop (no restriction other than airplane mode) That is, this test is NOT Open Internet Steven will only print 15 questions papers (out of 43 students) Majority will just read the questions on their laptop Steven will print 43 answer sheets You will write-down your answers on printed answer sheets You will only hand-in the (thinner) answer sheets at the end. Midterm Test Past Papers (recent 3 AYs+ours only): Midterm test paper (S1 AY 2019/20), Midterm test paper (S1 AY 2020/21), Midterm test paper (S1 AY 2021/22), Midterm test paper (S1 AY 2022/23) — our paper. |
PS4, continued |
09, 10-14 Oct |
T07.pdf (ans in Discord) Midterm test debrief Weighted MCBM: Hungarian tracing One weighted MCBM problem Another Optimization Problem involving matching |
08.StochasticLocalSearch.pdf (2016) [not flipped-classroom]: Introduction to Stochastic Local Search (SLS) Paradigm change, SLS Characteristics, No proof, just experiments... |
PS4 due on Thu, 13 Oct 2022, 07.59am (5%) Mini-Project - Local Search Out on Thu, 13 Oct 2022, 12 noon Proper launch during Lecture 09 in 10 project group of size 4 (the first 7/stronger groups have size 4) (the last 3/random groups has size 5) |
10, 17-21 Oct |
T08.pdf (ans in Discord) Overview of Mini-Project Discussion about Stochastic Local Search Using Mini Project topics as the context Past Paper discussion round 1 |
09.Meta-heuristics.pdf (2016) [not flipped-classroom]: 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... Fri, 21 Oct 2022 is chosen as NUS well being day S1 AY 2022/23 No CS4234 class is affected NUS Online Teaching Feedback opens this Fri But this timing is too early for our course... You can wait until the end of Mini-Project |
Mini-Project, continued |
11, 24-28 Oct |
No class, Deepavali |
Deepavali is on Mon, 24 Oct 2022 CS4234 Monday Tutorial classes are cancelled 10.SLS-DTP.pdf (2016) 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 Invitation to do PhD in algorithm... :) Steven's PhD Thesis: 2004-2010 is downloadable from NUS ScholarBank |
Mini-Project, continued |
12, 31 Oct- 04 Nov |
T09.pdf (ans in Discord) Discussion about SLS, continued Its applications for your Mini Project First round of "Active in Class" achievement is given this week Given to the most present+most active students in each Tutorial Group Last session for Steven's Tutorial Group 02. |
Mini Project Presentations and Q&A Segment Final assessment preview Course review Reminder about Teaching Feedback Official class onsite photo at LT19 |
Mini-Project due on Thu, 03 Nov 2022, 11.59am (15%) Before the last onsite lecture |
13, 07-11 Nov |
T10 (modal answers are NOT uploaded) Past Paper discussion (last) round Final class photo (TG1+TG3) PS: Steven's Tutorial Group 02 members join Group 01 or 03. (or just read Audrey's slides). "Active in Class" achievement is finalized this week (2nd or even 3rd most talkative students in each TG to be identified) Tutorial Participation Marks given (5%) |
Steven is at Dhaka, Bangladesh, for ICPC World Finals 2021 (that has been postponed until this week, 06-11 Nov 2022) Thu, 10 Nov 2022 is ICPC World Finals 2021 date. So Steven has decided to just put the optional PushRelabel lecture here. 11.PushRelabel.pptx (2016) Pre-reading material: CP4 Book 2 Chapter 9.24 (Push-Relabel Algorithm) No Push Relabel visualization @ VisuAlgo yet :'(... Introducing the Push-Relabel Algorithm Sample (manual) execution Analysis of Basic Push-Relabel Algorithm |
N/A |
Study Week, 12-18 Nov 2022 Final Assessment Consultations (per request) Final Assessment Past Papers (recent 3 AYs only): Final paper (S1 AY 2019/20, without the MCQs), Final paper (S1 AY 2020/21), Final paper (S1 AY 2021/22), Final paper (S1 AY 2022/23, without the MCQs) (our paper) NUS Online Teaching Feedback System closes on Friday of Study Week |
|||
Final Assessment, Tue, 29 Nov 2022 (EV, 5-7pm SGT), Venue: COM1-2-SR1 (F2F), Open book+Open laptop (no restriction on this) but NOT open Internet (i.e., airplane mode) 40% MCQs (very tricky); then three essay questions (of easier level than the midterm) (the MCQs are there to speed up grading as Steven has other final assessments on 26 Nov (206 pax) and 03 Dec (178 pax)) (35%) |
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)
No | Student Name | Achievements |
---|