Professional Documents
Culture Documents
01A Introduction
01A Introduction
01A Introduction
Useful URLs:
• Telegram Grp for G3 (for announcements): https://t.me/+QjSB5RYNtNk3NTk1
• Padlet for collecting your answers: https://padlet.com/atmai/vl89qwo8wyuu39jl
• eLearn for G3: https://elearn.smu.edu.sg/d2l/home/344463
• eLearn for all CT sections (for exams): https://elearn.smu.edu.sg/d2l/home/348312
2022/23 Term 2
Need to know some "high school Maths"
• Basic algebra
• Logarithms
• Sum of series in AP/GP
Road Map
Algorithm Design and Analysis
✦ Week 1: Introduction, Counting, Programming
✦ Week 2: Programming
Here now
✦ Week 3: Complexity
✦ Week 4: Iteration, Decomposition
✦ Week 5: Recursion
CHAN Enqi Alden NG HUANG Beif Allyne ZHA SAMUEL Jade GOH Benjamin G
Elton TAY Ryan POY OH
ei NG
TA
LIU Huiwen
Senior TA
(Project)
Assessment (2022/23 T2)
• Exams (60%) Important: Reserve this slot on your calendar NOW:
– Midterm Exam (20%) 24th Feb 2023 (Wk 7 Friday), 6-7:30pm
Class Part
Attendance & Punctuality: Score
- Automatic fail for 3 absences
without valid reasons
weekly Kahoot! Quizzes:
- taken sometime during the class,
based on previous & current week's
Homework Labs: content
- 5 labs in all - good revision opportunity
- correct attempts
Admin Issues
• Announcements/reminders:
– Will be sent via Telegram group for this section
• Voice out problems ASAP and seek help
• Walk-in consultation
– Ask for my availabilities
– SCIS1, level 5. Room: 5014
• Attending another section’s class:
– Not encouraged. Occasionally allowed with good reason
– Let me know ASAP if necessary
Make-Up Lesson for Week 3 (G1)
• Week 3 Mon (23 Jan 2023) is a public holiday.
• From Registrar’s Office:
Affect our Week 3 class
• Makeup for this section scheduled on 28 Jan (Sat) 3:30pm, ZOOM LESSON
Mid-Term Exam
CT merged section: https://elearn.smu.edu.sg/d2l/home/348312
Comparing the traditional classroom with the flipped classroom. Diagram adapted from Mok (2014)
…Pedagogy
Jazryl Quek
IS major, Year 4
Interned as Algorithm Engineer at Shopee
Example of a Problem
• You are the emcee of a "couple matching" game
show
– There are 8 participants: 4 males and 4 females
– After a series of self introductions, each M ranks each F from 1
(most preferred) to 4 (least preferred). Each woman does the same.
• Objective:
– You need to match them to form 4 "stable" couples
– All matches are stable if, for any one particular couple (M x-Fx),
• there is no F whom Mx prefers (over Fx), and who prefers Mx (over her current
partner)
• There is no M whom Fx prefers (over Mx), and who prefers Fx (over his current
partner)
• In other words, no 2 people of opposite sex who would both rather have each
other than their current partners
Consider the following solutions – are they stable? If not, give an
example of a couple which will elope:
Solution (i): (M1-F1), (M2-F3), (M3-F2), (M4-F4)
Solution (ii): (M1-F3), (M2-F1), (M3-F4), (M4-F2)
Solution (i): (M1-F1), (M2-F3), (M3-F2), (M4-F4)
Solution (ii): (M1-F3), (M2-F1), (M3-F4), (M4-F2)
2. Each unmatched male proposes to his highest ranked female whom he hasn’t proposed to
previously.
4. If she is already matched, she picks her more preferred male and rejects one of them.
5. Repeat steps 2-4 if there is still at least one male who is unmatched. When every man is
matched, the problem is solved.
While there exists an unmatched male m who has not proposed to all females:
Let f be the highest ranked female to whom m has not proposed
If f is free:
(m, f) are matched
Else it means that some other pair (m', f) already exists:
If f prefers m to m'
(m, f) are matched
m' becomes free
Else
# do nothing!
(m', f) remain matched
m remains free
End
End
End
• Week 2: Programming
• Week 3: Complexity
• Week 5: Recursion
Course Outline
• Course emphasizes:
– Conceptual thinking and reasoning, not programming
– Formulating a problem in terms of how it can be computed
– Characterizing the complexity of problems and solutions
– Designing solutions with simplicity and efficiency in mind