This module aims to prepare students in competitive problem solving.
It will benefit NUS students who want to compete in ICPC, invited high school students who want to compete in IOI (not just for NOI), and NUS students in general who aspire to excel in technical interviews of top IT companies, especially NUS current (2019/20 + 20/21 - sponsorship frozen due to COVID-19 cancelling/postponing most ICPC-related events) ICPC donors: Indeed Singapore, Sea Group, SenseTime, Jump Trading, Citadel | Citadel Securities, HRT, DRW.
It covers techniques for attacking and solving challenging* computational problems. Fundamental algorithmic solving techniques covered include complete search, divide/reduce/transform and conquer, greedy, dynamic programming, etc. Domain specific techniques like graph, mathematics-related, string processing, and computational geometry will also be covered. Some additional topics may be included depending on how the semester progresses. Programming language libraries that are commonly used in problem solving will also be taught.
*We only study well-known/solved problems, not research problems.
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.
The quota of this class (Sem 2 AY2020/21) is ... technically only limited by the REDUCED size of COM1-B-PL2 (46 fast Acer Nitro laptops) but I can only have 15 students onsite at PL2 reduced capacity... but not that many NUS students are eligible (or dare enough) to take this extremely competitive module. In recent years, only ~20 NUS students were enrolled and only a few (10 out of 189) are female...
Useful information to help you decide on whether you should offline register for CS3233:
Do you have national (but preferably international) programming competition background before? Examples: NOI (or IDN OSN, VNM VNOI, CHN NOIP, MYS MCO, PHL NOI, IND ICO, etc), IOI (especially IOI 2020 (Online Competition) hosted by Singapore), ICPC (especially ICPC Asia Singapore Regional Contest 2015/2018), Google Code Jam, Facebook Hacker Cup, CodeForces rated rounds, Topcoder Open, etc?
The difficulty of this course is very extreme for those without such background... but typically those that satisfy the next requirement (see question 2) can survive just as well... We will study problems that require (advanced) data structure and/or algorithms that are typically asked in programming competitions, and we have to implement those solutions fast and without bug...
Did you score well (at least A-) in CS2010/CS2040/C/S or equivalent (and preferably score A+ in all CS1101S+CS2020 (senior batch) or CS1010+CS1020+CS2010 (senior batch) or CS1010/CS1101S+CS2030+CS2040 (current batch))?
This module has a very high performance bar and the average CAP of the students enrolled in the past ten academic years excluding last AY (cannot track anymore) were 4.57 , 4.78 (remember, year 1 nowadays have much more S/U options) , 4.3+ (not tracked, I didn't survey that AY) , 4.33, 4.44, 4.43, 4.45, and 4.30 (out of 5.00), respectively. You will need special permission from the instructor (Dr Steven Halim) if you do not satisfy the pre-requisites listed above (the filter is there for your own good).
Are you OK to be tortured for one semester for a mere 4 modular credits (your other modules may also suffer)?
You may have to take lighter set of other modules or be ready to S/U other modules or to rush course project submissions (for project-based modules that have STePS on Wednesday night of Week 13 — no longer clash with CS3233 Monday night classes) or to rush final assessment preparations for other modules only during study week (no final assessment for CS3233). Please do NOT take CS3233 module with another module that is known to be challenging/demanding (e.g., the 5 MC CS3217 in Sem2, among others) unless you are very confident of yourself and have historical academic performance to back that up. Moreover, your ego may be hurt if some of the young NOI trainees (Sec2-JC2 students) beat you in (many) CS3233 contests (probably they still join online only due to COVID-19). Try to ask CS3233 seniors who have taken (and survived) this module before applying, read their public stories, e.g., Lim Jay Ching (exchange from University of Waterloo), or read several NUSWhispers related posts about CS3233!
Are you thinking on applying to top (or emerging) IT companies like NUS current (2019/20 and 20/21) ICPC donors: Indeed Singapore, Sea Group, SenseTime, Jump Trading, Citadel | Citadel Securities, HRT, DRW; or other large IT companies like Google, Facebook, Microsoft, Dropbox, etc in the future?
Some of our ex-CS3233 graduates are now in those companies :). See the CS3233 Hall of Fame to see the current known status of CS3233 past top students. Since a few AYs ago, many of these company (HR) reps will visit some of our (mini) contests and give prizes and/or recruitment talks which may be (much) faster than normal application route... Some seniors have cited that this direct connections with top IT companies is actually one of the nicest features of CS3233...
Can you code in C++ (primary language), Java (second choice), and/or Python (third choice)?
We will use C++ (17), Java (11), and Python (3) in CS3233 S2 AY2019/20. In this course, we are expecting students to be multi-lingual :O. Although a few ex-students had survived CS3233 with only Java (nobody survived with only Python), they struggled more compared to those who are well versed in C++ (fastest programming language for programming competitions). Since AY 2018/19, Python (3) has been used and has given some advantage at certain problems for students who master this language. However, Python code is usually slow (albeit usually also shorter). An algorithm written in Python may get TLE while the same algorithm written in C++/Java pass the time limit.
Do you want to learn interesting data structures, algorithms, (other programming language especially if C++ is not your primary language) and more importantly: On how to apply them properly — from teaching staffs who are deeply involved in such programming competitions?
(Senior) Lecturer: Dr Steven Halim, current Singapore IOI team leader, Deputy Director for IOI 2020 in Singapore, NUS ICPC coach, ICPC Asia Singapore Regional Contest Director, the author of Competitive Programming text book (the official text book of this module, we will use CP4 Book 1 and Book 2).
| Rating (out of 5.0, SoC avg ~4.1) | Jan-Apr 2020 (n=12) | Jan-Apr 2019 (n=22) | Jan-Apr 2018 (n=21) | Jan-Apr 2017 (n=16) | Jan-Apr 2016 (n=20) | Jan-Apr 2015 (n=22) | Jan-Apr 2014 (n=19) |
|---|---|---|---|---|---|---|---|
| Module feedback | 4.9 (PB) ▲ | 4.6 ▼ | 4.8 == | 4.8 ▲ | 4.563 ▼ | 4.733 ▲ | 4.455 ▼ |
| Module difficulty | 4.2 ▼ | 4.3 | 4.1 | 4.3 | 4.563 :O | 4.067 | 3.909 |
| Steven's teaching | 4.9 (PB) ▲ | 4.5 ▼ | 4.8 == | 4.8 ▲ | 4.603 ▼ | 4.863 ▲ | 4.548 ▲ |
Qualified Teaching Assistants:
Usually, CS3233 TAs have teaching feedback rating of around ~4.5 too (i.e., very good).
Both TAs will be mostly available in NUS ICPC Lab (COM1-02-15), especially every Monday, 3.45-5.30pm to answer any CS3233/Competitive Programming queries, if any (or e-consultations via Zoom if necessary).
Known damages are (illustrations are in C++), but not limited to:
Fortunately, it is known that past CP-ers can somehow undo these damages to return back to normal SE practices, e.g., this one (so don't worry my fellow SoC SE colleagues :).
If you have read all (scary) questions above and are still interested, simply notify Steven for offline registration before round 3B (the last day of application). The offline registration will be closed as soon as the number of students hits 15 accepted NUS students (the current hard limit of the reduced capacity of PL2). This time we will *NOT* be joined ONSITE by about ~20 SG high school students but some of them may join online due to COVID-19 restrictions. To minimize the annual attrition rate on Week 02 (Drop without penalty) and also :O on Recess Week (Drop with a 'W' grade, it happens!), the pre-acceptance selection will be made reasonably rigorous, i.e., by showing Steven that the applicant can score at least 500.0 Kattis points by Thursday, 31 December 2020, 23.59.
Note: This course registration section will not be prominent from Monday, 11 January 2021 onwards (Week 01). This behavior is normal. You can view it again by scrolling to the top of this page.
| Date | News |
|---|
| No | Flag | Name | Course/Year | Qualified? | Kattis points, rank (23 Nov 20) | Remarks |
|---|---|---|---|---|---|---|
| 1 | Lim Yong Shen, Kevin | COM/3 | Yes, if decide to take | 1500.6 | 3x CS2040/S TA | |
| 2 | Ho Kai Lun | ENG/3 | probably soon | 310.1 | doing well in CS4234 S1 AY20/21 | |
| 3 | Lin Geyu | COM/2 | Not yet | 0.0 | - | |
| 98 | Zhang Guangxuan (admin only+[R]) | COM/1 | Yes | 75.2 | SGP IOI Silver 17, NUS ICPC 2020 | |
| 99 | Clarence Chew Xuan Da (admin only+[R]) | FOS/1 | Yes | 777.6 | SGP IOI Silver 16, NUS ICPC 2020 |
| Week | Self Reading from CP4 before class (Flipped Classroom) | Homework (Mon, 10.00am) |
Contest + Debrief (Mon, 5.50-7.05-7.35pm, PL2) |
Class Topics (Mon, 7.50-9.20pm, PL2) |
|---|---|---|---|---|
| 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 | ||||
|
-06/-05/ -04/-03/ -02/-01 |
As many pages from CP1/2/3/3.17a/b/3.18a/b/3.19a/4.beta/4-1+4-2; At least from preface up to the end of Chapter 4; Note: For the actual semester, you must have a copy of CP4 (both book 1+2) to go through this course successfully | Lots of preparatory work especially for those who do not have competitive programming background yet | No contest yet; But if you are not a multi-lingual programmer yet, pick up both C++11 (and C++17) (main), Python3 (secondary), and Java11 (tertiary) by yourself during holiday time | At home: Set up a (free) Kattis account (open), solve first few easy ≤ 3.0 pointer problems @ Kattis, then use Dec20+early Jan21 holiday (~2-3 weeks) to get ≥ 500.0 points (~250 AC of ~2 pointer problems (first ~3+ pages sorted based on Kattis difficulty ratings :O), use Steven's classification here) in Kattis by Mon, 11 Jan 21, 09:00 (or earlier) to ensure module acceptance, familiarize yourself with Ubuntu 16 (or 18) LTS with GNOME desktop, or self-read the older teaching materials in this public website |
|
01 11 Jan |
Preface to Chapter 1 (all pages) plus simple Ad Hoc problems in Chapter 9 |
Optional Kattis set #00 due Do Kattis set #01 :) |
Mock Ad Hoc (after first lecture) |
Let's Talk CP Introduction; Brief Course Admins; Focus on delivering some "Wow Moments"; A Bit of C++11/C++17, Python3, Java11, Mock/Preview Contest (not graded, but has high standard) |
|
02 18 Jan |
Chapter 2; Focus on Section 2.2, 2.4.3, and 2.4.4; Read the rest of Chapter 2 by yourself Decision to Drop CS3233/R without penalty by Fri, 22 Jan 21 (email UG office for manual drop, cc to Dr Steven Halim; avoid weekend >.<) |
HW01 due Kattis set #01 due |
Mini 01 "~Linear" Algorithms Money Contest sponsored by [all 7 ICPC donors] |
Be A Librarian Mastery of Libraries (C++ STL, Java API, & Python Standard Library); Focus on Bit Manipulation and Binary Indexed (Fenwick) Tree VisuAlgo: bitmask, segmenttree (optional), fenwicktree |
|
03 25 Jan |
Chapter 3, 4, 8, and 9; Focus on Section 3.1-2, 4.2.3, 4.4.2-3, 8.1-8.2, 8.6 (some NP-hard/complete problems with complete search solution), 9.3; Read Section 3.3 (DnC) and 3.4 (Greedy) by yourself |
HW02 due Solve Mini 01 B/C Kattis set #02 due |
Mini 02 Libraries Money Contest sponsored by [all 7 ICPC donors] |
Searching for Answers Iterative Techniques (the fancier ones); Recursive Backtracking (bitmask-based, reverse thinking, data compression, etc); State-Space Search (harder form of SSSP, Graph modeling + BFS/Dijkstra's) with Meet in the Middle (Bidirectional Search) VisuAlgo: bitmask, recursion |
|
04 01 Feb |
Chapter 3, 4, 5, 6, 8, and 9; Focus on Section 3.5, 4.6.2, 5.4, 5.6, 5.9, 6.5, 8.3, 8.4, 8.6 (some NP-hard/complete problems with DP solution), 9.7, 9.31, and 9.42 Re-Read Section 3.4 (Greedy) by yourself |
HW03 due Solve Mini 02 B/C Kattis set #03 due |
Mini 03 Complete Search Money Contest sponsored by [all 7 ICPC donors] |
The Art of Stenography Dynamic Programming; "Instant" review of CS3230 DP Materials; Focus on relationship between DP and DAG; Discussion of a few non-classic DP examples; Formulating non trivial DP states + transitions VisuAlgo: bitmask, recursion |
This table records the previous top students of CS3233 under Dr Steven Halim (rank 1 up to at most rank 3) of that Academic Year and their current known affiliation as per last contact with Dr Steven Halim.
| AY (Iteration) | Rank | Flag and Name | Best ICPC Record | Current Job |
|---|---|---|---|---|
| 2008/09 (1) | 1 | World Finalist 2009 (HM) & 2010 (HM) | Addepar (US) | |
| 2008/09 (1) | 2 | World Finalist 2009 (HM) & 2010 (HM) | Microsoft (US) | |
| 2009/10 (2) | 1 | World Finalist 2012 (HM) & 2013 (joint-48) | Quantcast (SG) | |
| 2010/11 (3) | 1 | World Finalist 2012 (HM) | Microsoft (US) | |
| 2010/11 (3) | 2 | World Finalist 2012 (HM) & 2013 (joint-48) | Facebook (US) | |
| 2011/12 (4) | 1 | N/A | Dynamic Technology Lab (SG) | |
| 2012/13 (5) | 1 | World Finalist 2013 (joint-48) & 2016 (joint-14) | Anduin Transactions (VN) | |
| 2013/14 (6) | 1 | World Finalist 2014 (joint-19) & 2015 (joint-28) | Facebook (US) | |
| 2013/14 (6) | 2 | World Finalist 2014 (joint-19) & 2015 (joint-28) | Google (SG) | |
| 2014/15 (7) | 1 | Fourth place in Regional Asia Singapore 2015 | Improbable (UK) | |
| 2014/15 (7) | 2 | World Finalist 2015 (joint-28) & 2018 (joint-56) | Dynamic Technology Lab (SG) | |
| 2015/16 (8) | 1 | Tenth place in Regional Asia Phuket+Singapore 2015 | Graduated (pls update me) | |
| 2015/16 (8) | 2 | Twentieth place in Regional Asia Singapore 2015 | Sea Group (SG) | |
| 2016/17 (9) | 1 | Sixteenth place in Regional Asia Singapore 2018 | Google (SG) | |
| 2016/17 (9) | 2 | World Finalist 2017 (joint-20) | Sirclo (ID) | |
| 2017/18 (10) | 1 | Third place in Regional Asia Jakarta 2018 | 4th year UG | |
| 2017/18 (10) | 2 | Third place in Regional Asia Jakarta 2018 | 4th year UG | |
| 2017/18 (10) | 3 | World Finalist 2019 (joint-62) & 2020 (result TBA) | Graduated (pls update me) | |
| 2018/19 (11) | 1 | World Finalist 2018 (joint-14) | 2nd → 3rd year UG | |
| 2018/19 (11) | 2 | Champion in Regional Asia Jakarta 2019 | 3rd year UG | |
| 2018/19 (11) | 3 | N/A | Graduated (pls update me) | |
| 2019/20 (12) | 1 | Sixth place in Regional Asia Jakarta 2018 and Kuala Lumpur 2019 | 2nd year UG |
There are two big scoring components: SP(eed) (from live contests, up to 63%) and DI(ligence) (from non-speed-related stuffs, up to 54%).
The theoretical max is therefore 117%, with just 60% needed to secure at least a B+ grade in this extremely competitive module.
The SP(eed) component is further divided into two sub-components: M(ini)C(ontest) (up to 36%) and T(eam)C(ontest) (up to 27%).
The DI(ligence) component is further divided into four sub-components: H(ome)W(ork) (up to 15%), (Problem)Bs (up to 9%), K(attis)S(ets) (up to 12%), and Ac(hievements) (up to 18%).
9 Weekly Mini Contests, three problems in 75 minutes, using Mooshak.
(9 weeks x (3%+0.5%+0.5%)/week = 36%).
Occasionally (if Steven is not that lazy), we may open problem D (or even E) which is (are) the easier form of problem B/C. We give bonus 0.5% for top 3 in each mini contest. We use strict binary grading (Accepted or not Accepted: Wrong Answer, Time Limit, Memory Limit, Runtime Error, etc) for our contests.
1 Midterm Team Contest (13%+0.5%=13.5%, 13 "original" problems, worth 1.0% each).
1 Final Team Contest (13%+0.5%=13.5%, 13 "original" problems, worth 1.0% each).
Bonus 0.5% for top 3 teams in both team contests.
Team size is three students.
If the class size is not divisible by 3, the last team can have 4 or 5 members.
10 Weekly Homework (10 weeks * 1.5%/week = 15%).
CP4 book 1+2 review + solve certain written exercises + update the lecturer, 1.5%.
Scoring scheme: 0% = no submission, 0.5% = poor, 1% = default score, 1.5% superb.
Solve problem B of last week's mini contest at home, on your own pace, by next Mon 05.15pm (closed by the time Robin's consultation hour is over), if you fail to solve it during the live Mini Contest. Simply submit your code to Mooshak, TA will check your last submission @ Mooshak.
Scoring scheme:
0% = not AC in the actual mini contest and not attempted after one more week.
1% = managed to solve problem B during mini contest itself or before deadline.
There is no additional marks for solving problem C at home (for CS3233R students).
We use Kattis@NUS for this semester.
Steven selects twelve targeted Kattis problems related to CS3233 topic of that week (that he has solved before). To get 1% per week, student has to solve at least three (of any preferred difficulty level as indicated in Kattis) of the selected problems within the stipulated deadline (Monday night 09:15pm SGT of that week until Monday 05:30pm SGT of the following week). Note that Steven can see all CS3233 class submissions at nus.kattis!
One star = 1%, most achievements are manual entry: