This course introduces non-computing students to efficient computational problem solving in an accelerated pace. Students will learn to formulate a computational problem, identify the data required and come up with appropriate data structures to represent them, and apply known strategies to design an algorithm to solve the problem. Students will also learn to quantify the space and time complexity of an algorithm, prove the correctness of an algorithm, and the limits of computation. Topics include common data structures and their algorithms (lists, heap, hash tables, trees, graphs), algorithmic problem solving paradigms (greedy, divide and conquer, dynamic programming), and NP-completeness.
The programming language used for this course is Python 3.
We use very basic object-oriented programming concepts in various data structures implementations, e.g., Stack class inherits LinkedList class.
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.
This is the going to be the eight time Prof Halim teaches previously 8-weeks → now 12-weeks (+ 1 more week before final assessment on Week 13) IT5003 course for MComp General Track (GT) — the main group of students — (plus a bit of other MSc degree specializations: Digital Financial Technology (DFT) + Biomedical Informatics (BMI) + NEW: Industry 4) and also a few (usually around 30-ish) Graduate Certificates in Computing Foundations (GC-CF). Prof Halim sets IT5003 (in Python) as a 'subset' (obviously, as we only have 12-weeks of 2 hours/week) of his full 13-weeks of 3 hours/week CS2040S Undergraduate version of similar course. The previous iterations were already (very) good. One thing to take note is that Prof Halim's teaching style is flipped classroom that may be quite surprising for some adult learners who are not used to this teaching style in the past.
For S1 AY24/25, due to adjustment of lesson format from Week 01 instead of Week 07 after IT5001, it is expected that there will be (much) fewer students in S1.
Prof Halim prepares for a [75-100]-ish class size.
Update as of 26 Aug 24 (three days after Drop without penalty): Erm, 33 pax...
Some other facts:
Rating (out of 5.0) |
Aug-Nov 24 (n=??/33) ??% |
Mar-May 24 (n=66/122) 54% ▲ |
Oct-Dec 23 (n=82/200) 41% ▼ |
Mar-May 23 (n=61/115) 53% ▼ |
Oct-Dec 22 (n=100/178) 56% ▼ |
Mar-May 22 (n=57/99) 58% ▼ |
Oct-Dec 21 (n=83/130) 63% ▲ |
---|---|---|---|---|---|---|---|
Course feedback (SoC avg lvl 5000 ~4.1) | [4.3..4.4] (tgt) | 4.3 == | 4.3 ▼ | 4.5 ▲ (PB) | 4.4 == | 4.4 ▲ | 4.3 ▲ |
Course difficulty (SoC avg lvl 5000 ~3.6) | [4.0..4.1] (lower a bit) | 4.2 ▲ (uh oh) | 3.9 == | 3.9 == | 3.9 ▲ | 3.8 ▲ | 3.5 ▼ (PB) |
Prof Halim's teaching (SoC avg lvl 5000 ~4.3) | [4.4..4.5] (tgt) | 4.4 ▲ | 4.3 ▼ | 4.6 == (PB) | 4.6 == (PB) | 4.6 ▲ (PB) | 4.5 ▲ |
TAs:
Date, Time | Live Session (Venue) (#Stu/#Cap) | No | TA |
---|---|---|---|
a/Sat, 1000-1200 | COM1-B112 (PL1) — for part-time students (10/15) | B3A | @jeanette |
b/Mon, 1600-1800 | COM1-B109 (PL2) — for full-time students (23/23) | B2 | @prof_halim |
List of TAs for Aug-Nov 2024 (only two):
This is what you will learn in IT5003 as taught by Prof Halim, compare it with the superset CS2040S version:
If you have any important questions regarding this course, email dcssh at nus dot edu dot sg. Relevant answers will be posted here to reach wider audiences.
Note: This course registration section will not be prominent from Week 1 onwards. This behavior is normal. You can view it again by scrolling to the top of this page.
Date | News |
---|
The 4 units IT5003 syllabus will be delivered over 12 weeks, with Week 13 reserved for final assessment.
This course is approximately 24/39 ~= 62% of the content of CS2040S.
The weekly lesson plan of Week X is typically as follows (2+(1+1)+(2+1)+3 = 10 hours/week):
Then, repeat this throughout the semester :).
The S1 AY 2024/25 timetable below is still tentative, especially those that are highlighted with pink color. The Wed evening of IT5003 will be as close as possible with Wed morning of CS2040S.
Week | Tutorial+Lab Combo | Lecture | Interesting Problem Set |
---|---|---|---|
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 | |||
-01, 29 Jul-02 Aug |
Has Not Started |
Has Not Started, but please revise your CS1101S/IT5001/equivalent Prof Halim assumes that all of you have taken or exempted from this course/its variants Register at Kattis (use full name as in Matric card), read Python specific instructions @ Kattis, pick up basic Python by yourself, and solve the selected Online Judge (OJ) Problem Set 0 (PS0) by yourself (CS1101S/IT5001/equivalent level) (solving many 'trivial problems' from this set ---trackable by Prof Halim, indirectly tells him about your CS1101S/IT5001/equivalent rough grade) |
PS0: Easy Coding Challenges (01-14 Aug) Already graded to speed up registration admins Solve any 3 out of 10 trivial tasks for 1% |
00, 05-09 Aug |
Has Not Started |
Has Not Started Continue attempting PS0 (hints in class Discord) Singapore National Day on Fri, 09 August 2024 |
PS0, continued Remember, solve any 3 for 1% |
01, 12-16 Aug |
Has Not Started |
01a. Course Admin, (Re-)Introduction to Python Setting the tone for a flipped classroom course VisuAlgo + this Private Canvas + Kattis (NUS) + Kattis (open) Basic Python review/new feature introduction Kattis problem(s) discussed today: A few PS0 tasks (just for warm-up) In the middle of 01a: VisuAlgo Online Quiz 0 (1%) There will be 1 trivial question during the first lecture Bring your own laptop This one is put here to speed-up admins (don't skip the first lecture) Reminder: Read simple algorithms on unsorted array (Slide 1 to 6-1) before the next lecture Reminder: Read sorting intro, algorithm analysis, and O(N^2) sorting algorithms (Slide 1 to 9-3) before the next lecture |
PS0 (1%) Due: Wed, 14 Aug 24, 07.59pm PS1: Basic Programming Out: Wed, 14 Aug 24, 08.00pm Mentioned at the end of the first lecture IT5003 students do problem A+B |
02, 19-23 Aug |
PS: Prof Halim use this slot for his tut01 make-up slot (not all topics can be discussed) (but we will discuss as much as we can) Saturday sessions start from this Week 02 see T01+L01: tut01.pdf below |
02a. Analysis of Algorithms (Slide 1 to 9-3) Live SpeedTest.cpp | py | java demo (measure runtime, count # of operations, vs asymptotic analysis) Fast review of O(N^2) sorting algorithms Kattis problem(s) discussed today: thanos (analysis: exponential growth, logarithmic steps) mjehuric (bubble sort simulation) height (insertion sort simulation) nothanks (sorting library and linear pass) Last flipped classroom reminder: Read all sorting e-Lecture slides before next lecture |
PS1 (2%) Due: Sat, 24 Aug 24, 07.59am PS2: Sorting-related Problems Out: Sat, 24 Aug 24, 08.00am |
03, 26-30 Aug |
T01+L01: tut01.pdf Introduction, OOP review (List ADT, ListArray.py | java) Algorithm Analysis, Hands-on, a basic List ADT task, PS1 Debrief (short), PS2 Discussion (algorithmic) PS: Prof Halim was late as he gave a talk at RISE 2024 at Alumni House nearby (4.00-4.30pm) (He resumed tut01 at 5.00-5.30pm) |
03a. Sorting (Slide 10 to 13-2) O(N log N) Merge Sort algorithm (Java Collections.sort; Python list.sort) Expected O(N log N) (Rand) Quick Sort algorithm (C++ sort; Java Arrays.sort (primitives)) See the details at SortingDemo.cpp | py | java Python list, list.sort(), or sorted(list) Sorting Online Quiz (medium) Kattis problem(s) discussed today: sortofsorting (custom comparator, stable sorting library) Prof Halim departed to Alexandria, Egypt |
PS2, continued |
04, 02-06 Sep |
T02+L02: tut02.pdf Sorting Application(s), Sorting, mini experiment, QuickSelect, ADT/List ADT, VA OQ demo (sorting), Hands-on, sorting applications, PS2 Discussion (algorithmic) PS: Jeanette will run B2 this week |
Prof Halim was in Alexandria, Egypt, for IOI 2024 (01-08 Sep 2024) 04a lecture was covered by Jeanette. 04a. List ADT: SLL/Stack/Queue/DLL/Deque (all slides) Introducing List ADT, (resizeable) array versus SLLDemo.cpp | py | java implementation Introducing Stack ADT and MyStack implementation (extension of SLLDemo) Stack, but using (resize-able) Array implementation, i.e., Python list as stack Introducing Queue ADT and MyQueue implementation (another extension of SLLDemo) DLL and Deque ADT (Fixed-size) Python list as queue, circular list, versus Python deque as queue Linked List Online Quiz (medium) A few other LL technicalities |
PS2 (2%) Due: Sat, 07 Sep 24, 07.59am PS3: List+PQ Problems Out: Sat, 07 Sep 24, 08.00am |
05, 09-13 Sep |
T03+L03: tut03.pdf Linked List, mini experiment, Applications: Reversing/Sorting a List, Application: Stack-related, PS2 Debrief (short), Python list/deque, VA OQ demo (list), Hands-on, a list application, PS3 Discussion (algorithmic) PS: Prof Halim return to SGP early this morning |
05a. Priority Queue (PQ) ADT: Binary Heap (Slide 1 to 8-2) Introducing PQ ADT Introducing basic Binary Heap structure and its Insert+ExtractMax operations Discussing CreateHeap (two versions) and HeapSort operations BinaryHeapDemo.cpp | py | java Python heapq; see priority_queue.cpp | py | java at GitHub repo of CPbook website Last 20m of 05a: VisuAlgo Online Quiz 1 (11%) Bring your own laptop that can run at least 20 minutes on battery power. (we do not provide any spare laptop). Material: /array (4 Qs), /sorting (4 Qs), /list (4 Qs), and 4 'new' questions. Prof Halim will depart to Astana, Kazakhstan |
PS3, continued |
06, 16-20 Sep |
T04+L04: tut04.pdf Binary Heap, Max-Min conversion, Additional ADT PQ Operations, Python heapq, VA OQ demo (heap), Hands-on, a simple problem involving PQ, PS3 last Discussion (algorithmic) PS: Prof Halim will run tut04 on Mon of Week 07 |
Prof Halim will be in Astana, Kazakhstan, for ICPC World Finals 2024 (15-20 Sep 2024) 06a lecture will be covered by Jeanette. 06a. Table ADT part 1: Hash Table (slide 1 to 10-5) Table ADT and DAT Basic Hashing Concepts Easiest Collision Resolution Technique: CA (SC) Another Collision Resolution Technique: OA (LP) More Collision Resolution Techniques: OA (QP and DH) Comparing CA: SC with OA: DH Other technicalities of Hash Table Hash Table Online Quiz (easy; a bit too tedious on medium/hard settings) |
PS3 (2%) Due: Sat, 21 Sep 24, 07.59am PS4: Hash Table Problems Out: Sat, 21 Sep 24, 08.00am |
Recess Week, 21-29 Sep 2024 You can take a break this week :) |
|||
07, 30 Sep-04 Oct |
T05 is cancelled for IT5003 As we do not have midterm test PS: Prof Halim will use this slot for his tut04 make-up slot |
First half quick review, especially 04a + 06a Followed by CS2040S Midterm Quiz live discussion Short 09a lecture preview |
PS4, continued |
08, 07-11 Oct |
T06+L06: tut06.pdf Table ADT 1 - unordered, Basic hashing concepts, Hash Table issues, Python set, dict, defaultdict, Counter PS3 Debrief (short), NOT for IT5003: VA OQ demo (hashtable), For IT5003: Hands-on, a hash table application, PS4 Discussion (algorithmic) |
08a. Table ADT part 2: BST (Slide 1 to 12-1) BST concepts and the various BST operations The multiset idea BST (only) Online Quiz (medium) BSTDemo.cpp | py | java Randomly built BST and a preview of balanced BST, e.g., AVL Tree Last 20m of 08a: VisuAlgo Online Quiz 2 (11%) Material: /array (2 Qs), /heap (5 Qs), /hashtable (5 Qs), and 4 'new' questions. Prof Halim will depart to Shenzhen, China |
PS4 (2%) Due: Sat, 12 Oct 24, 07.59am PS5: Combo DS Problems Out: Sat, 12 Oct 24, 08.00am |
09, 14-18 Oct |
T07+L07: tut07.pdf Table ADT 2 - ordered, (balanced) BST advanced stuffs: Select and Rank, PQ ADT alternative implementation, Comparison with Table ADT 1: unordered vs ordered, The issue of no equivalent Python standard library, PS4 Debrief (short), VA OQ demo (bst) Hands-on, a combo DS task, PS5 Discussion (algorithmic) PS: Jeanette will run B2 this week |
Prof Halim will be in Shenzhen, China, for ICPC Challenge Championship powered by Huawei 09a lecture will be covered by Jeanette. 09a. Graph DS (all slides) + DFS Traversal (Slide 1 to 5-8) Implementations of graph DS and its applications Graph DS Online Quiz (medium), No built-in C++ STL container | Python standard library | Java API, See graph_ds.cpp | py | java at GitHub repo of CPbook website, Early discussion of the basic forms of Graph Traversal algorithms: DFS first + one application (count #CC) See dfs_cc.cpp | py | java Kattis problem(s) discussed today: reachableroads (AL; count #CC; DFS introduction) |
PS5, continued |
10, 21-25 Oct |
T08+L08: tut08.pdf Graph DS Review, Some Graph Properties Discussion, Graph DS Conversion Exercise, DFS Review, NOT for IT5003: Custom graph DS implementation review, VA OQ demo (graphds,dfsbfs), Hands-on, a simple Graph DS task, PS5 Discussion (algorithmic) |
10a. Graph Traversal Applications (Slide 6 to 7-11) Review DFS and introducing BFS Focus on a few more basic DFS/BFS applications (we skip slide 8-12, out of CS2040/C/S and IT5003 scope) DFS/BFS Online Quiz (medium) No built-in C++ STL algorithm | Python standard library | Java API, See UVa00469.cpp | py | java, and bfs.cpp | bfs.py | java at GitHub repo of CPbook website, Kattis problem(s) discussed today: builddeps (AL of Strings + postorder DFS toposort demo) NUS Online Teaching Feedback opens this Fri But this timing is too early for our course... You can wait until you have completed the course |
PS5 (2%) Due: Sat, 26 Oct 24, 07.59am PS6: Graph Problems Out: Sat, 26 Oct 24, 08.00am |
11, 28 Oct-01 Nov |
T09+L09: tut09.pdf BFS Review DFS/BFS advanced stuffs: Cycle Detection, Toposort++, Floodfill/CC, Modeling exercise, PS5 Debrief (short), VA OQ demo (dfsbfs), Hands-on, a Graph Traversal task, PS6 Discussion (algorithmic) |
11a. SSSP Problem (Slide 1 to 7-5) Review of basic SSSP problem Preview of O(VE) / O(kE) Bellman-Ford algorithm QnA on BFS algorithm for unweighted SSSP SSSP Online Quiz (medium) QnA on Dijkstra's algorithm (modified Dijkstra's first) See dijkstra.cpp | py | java at GitHub repo of CPbook website Kattis problem(s) discussed today: modulosolitaire (SSSP; unweighted graph; BFS; implicit graph) shortestpath1 (basic Dijkstra's) Thu, 31 Oct 2024 is Deepavali PH Additionally, Fri, 01 Nov 2024 is chosen as NUS well-being day S1 AY 2024/25 Enjoy our short break here |
PS6, continued |
12, 04-08 Nov |
As Sat, 02 Nov 2024 is part of NUS long well-being weekend Sat sessions will do last T10+L10 on Sat, 09 Nov 2024 instead T10+L10: tut10.pdf BFS/Dijkstra's review Modeling exercises (continued), VA OQ demo (sssp), Hands-on, an SSSP task, PS6 Discussion (algorithmic) Tut+Lab participation marks given (3%) |
12a. SSSP, NP-completeness, and Course Wrap-Up QnA on other special cases of SSSP problem Showing the limit of computation: Introduction to the theory of NP-completeness Course wrap-up Last 20m of 12a: VisuAlgo Online Quiz 3 (11%) Material: /bst (3 Qs), /graphds (3 Qs), /dfsbfs (3 Qs), /sssp (3 Qs), and 4 'new' questions. |
PS6 (2%) Due: Sat, 09 Nov 24, 07.59am |
13, 11-15 Nov |
"Study Window", 06-12 Nov 2024 Final Assessment Discussions at Class Discord Final Assessment Past Papers (recent 3 AYs only): AY 2022/23: S1-final.pdf, S2-final.pdf, AY 2023/24: S1-final.pdf, S2-final.pdf, AY 2024/25: S1-final.pdf (will be our paper). Make-up slot for VA OQ 1 (? pax), OQ 2 (? pax), and OQ 3 (? pax) Date and Time: Wed, 13 Nov 2024, 5.00-5.30pm Venue: TBA (but will not be too far from LT13) Final Assessment (50%) Date and Time: Wed, 13 Nov 2024, 6.30-8.30pm (notice that this is on NUS Week 13) Venue: LT13 (our own lecture venue) Open book Non-programmable calculator is allowed (as with Online Quiz), but won't be that useful 40% MCQs (extremely tricky); I use my own OCR form (the MCQs are there to speed up grading as Prof Halim (solo grader: 1 versus 14) has two other papers (CS3230: 412 pax, CS2040S: 157 pax) 3 → 2 short questions (10% --- do not lose too many marks here), and 2 → 4 essays (50%) |
||
Study Week, 16-22 Nov 2024 and Examination Period, 23 Nov-07 Dec 2024 Nothing for IT5003 (our final assessment is on Week 13) You can prepare for your other final assessment (if any) NUS Online Teaching Feedback System closes on Friday of Study Week |