University of Melbourne · S1 2026 · FACULTY OF INFORMATION TECHNOLOGY

COMP90038 · Algorithms And Complexity

- one subject, every graph, every model, every mark
50% final exam · hurdle10 Chapters75-page Bible
Our own words - no uploaded lecturer files
Built to mirror S1 2026 · updated this semester
The Complete Exam Bible · S1 2026

Algorithms and Complexity

— name the technique, run the trace, state and justify the bound

Algorithms and Complexity is the University of Melbourne's core algorithms subject — it builds the analysis toolkit (the RAM cost model, big-O / Ω / Θ, recurrences and the Master Theorem) and then works through the design paradigms in order: brute force, graph traversal, decrease-and-conquer, divide-and-conquer, the transform-and-conquer structures (heaps, balanced trees, hashing), dynamic programming and greedy. The final exam is 60% of your grade, in-person and open-book (paper) — but “open book” is a trap: you cannot out-flip hundreds of pages of Levitin in three hours, and the marks live in hand-tracing speed and method, not in lookup. This guide drills exactly that — every technique on one recurring answer shape: name the technique → run the trace / set up the recurrence → state AND justify the time and space bound → decide.

COMP90038 · University of Melbourne
Assessment

How COMP90038 is assessed

ComponentWeightFormat
Final examination60%In-person, open-book (paper based) · 15 min reading + ~180 min writing · Q1 = MCQ hand-traces, Q2 = True/False with justification, Q3–Q10 = design-and-analyse
Weekly quizzes10%10 Canvas quizzes across the semester (MCQ / short numeric) drilling the recurring hand-trace moves
Assignment 115%Recurrence proofs + design-and-analyse — no AI tools permitted; confirm the exact rules in your subject guide
Assignment 215%Algorithm design — later in the semester; confirm the exact dates in your subject guide
Worked example · free

Applying the Master Theorem — reading off the running time, case by case

Q [6 marks]. For each divide-and-conquer recurrence, identify the parameters a, b, d and use the Master Theorem to state Θ(·): (i) mergesort T(n) = 2T(n/2) + Θ(n); (ii) binary search T(n) = T(n/2) + Θ(1); (iii) the naive recursion T(n) = 4T(n/2) + Θ(n).
costinput size ncase 1: n^(log_b a)case 2: n^d log ncase 3: n^d (root wins)log_b a vs d
  • +1Set up the comparison. For T(n) = aT(n/b) + Θ(nd), compute the watershed exponent logba and compare it with d (the exponent of the combine cost). Three cases follow from which side wins.
  • +2(i) Mergesort: a = 2, b = 2, d = 1, so logba = log22 = 1 = d → Case 2 (a tie): T(n) = Θ(nd log n) = Θ(n log n).
  • +1(ii) Binary search: a = 1, b = 2, d = 0, so log21 = 0 = d → Case 2: T(n) = Θ(n0 log n) = Θ(log n).
  • +2(iii) Four-way naive recursion: a = 4, b = 2, d = 1, so log24 = 2 > d = 1 → Case 1 (leaves dominate): T(n) = Θ(nlogba) = Θ(n2).
(i) Θ(n log n); (ii) Θ(log n); (iii) Θ(n2). The case is decided by comparing logba (cost of the leaves) with d (cost of the combine): leaves win → Case 1; tie → Case 2 with an extra log n; root wins → Case 3.
Sia tip — Always write the three parameters a, b, d explicitly before quoting a case — the marks are in showing logba vs d, not just the final Θ. And remember the Master Theorem only applies when the sub-problems are equal-sized; an uneven split (e.g. T(n) = T(n−1) + Θ(n)) needs the recurrence-tree method instead.
Glossary

Key terms

Big-O / Ω / Θ
Asymptotic bounds on a function's growth: O(g) is an upper bound (grows no faster than g), Ω(g) a lower bound, and Θ(g) a tight bound (both at once). They describe behaviour as n → ∞, ignoring constants and lower-order terms — so 3n2 + 5n is Θ(n2).
Master Theorem
A formula for solving divide-and-conquer recurrences of the form T(n) = aT(n/b) + Θ(nd). Compare the watershed exponent logba with d: if logba > d the leaves dominate (Case 1); a tie gives an extra log factor (Case 2); if d wins the root dominates (Case 3). It only applies to equal-sized sub-problems.
Amortised analysis
The average cost per operation across a worst-case sequence, even when individual operations vary wildly. A dynamic array's append is O(n) on the resize step but O(1) amortised, because expensive resizes are rare enough to spread their cost. Distinct from average-case, which averages over random inputs.
Heap
A complete binary tree stored in a plain array that maintains the heap property (every parent dominates its children). It gives O(log n) insert and delete-min/max and O(1) peek, and can be built in O(n) by heapify — the engine behind heapsort and the priority queue.
Dynamic programming
An optimisation technique for problems with overlapping sub-problems and optimal substructure: solve each sub-problem once, store its answer in a table, and build up the final answer instead of re-solving. Bottom-up (fill the table) and top-down memoisation are the two styles; Warshall's and Floyd's algorithms are the classic graph examples.
FAQ

COMP90038 FAQ

Is COMP90038 hard?

It is conceptually rich and trace-heavy. The difficulty is precision and speed under exam time: the same moves — hand-tracing an AVL insert, filling a Floyd matrix, identifying a Master-Theorem case, designing an algorithm to a target complexity — recur on fresh inputs, so the work is making each one automatic. The 60% open-book final concentrates the stakes on one paper, and open-book lulls students into not practising the very speed it tests.

How is COMP90038 assessed?

The final exam is 60% — in-person, open-book on paper. The rest is 10 weekly Canvas quizzes (10%), Assignment 1 on recurrences and design (15%, no AI tools permitted) and Assignment 2 on algorithm design (15%). Confirm this year's exact weights, dates and the open-book rules in your subject guide and on Canvas.

What is on the COMP90038 final exam?

A fixed structure: Q1 is around ten 1-mark MCQ hand-traces (AVL inserts, 2-3 build, linear probing, Warshall and Floyd matrices, DFS topological sort, MST weight); Q2 is True/False with justification (state the constants or a counterexample, not just the verdict); and Q3–Q10 are design-and-analyse questions worth most of the marks, where you must state AND justify both time and space.

Is the exam really open-book, and does that make it easier?

It is open-book on paper — you may bring paper copies of the textbook, lecture slides and workshop solutions, but no devices. It does not make it easier: Q1's hand-traces and Q3–Q10's designs are the work itself, not something you can look up, and flipping hundreds of pages in three hours costs time you do not have. The win is a concise per-technique reference plus the design-technique decoder. Confirm the current rules on your own LMS.

Is using AskSia for COMP90038 cheating?

No. AskSia is a study reference written in our own words — we host none of your lecturer's files, our pseudocode and hand-traces are our own, and every worked example uses our own invented inputs, never the assessed assignment datasets or the exam. Sia teaches you the method to earn the marks; it does not complete or sit your assessments, and Assignment 1 prohibits AI tools — follow that rule.

Study strategy

How to study for the exam

Treat hand-tracing speed and the design-technique decoder as the grade-deciders, because that is exactly what the 60% open-book paper tests and exactly what flipping the textbook cannot buy you. Drill the Q1 moves until they are automatic: insert keys into an AVL tree and rebalance, build a 2-3 tree, run linear probing, fill a Warshall R2 and a Floyd D1 matrix, and reconstruct a tree from its traversals. For Q3–Q10, practise reading the required complexity off the prompt and naming the technique — bounded universe → counting sort; O(n log n) → presort + scan; shortest-from-source → Dijkstra with a heap; all-pairs → Floyd Θ(n3); overlapping sub-problems → dynamic programming — then state and justify both time and space, because that is where the marks sit. Open-book is a trap: print a concise reference, but bank the method beforehand.

A+Everything unlocked
Unlocks this Bible + all 24 of your University of Melbourne subjects - and 1,000+ Bibles across every Australian university.
Sia - your COMP90038 tutor, unlimited, worked the way the exam marks it
The full 75-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$25/ month
30-day money-back · cancel in one tap · how it works
Unlock the full COMP90038 Bible + 24 University of Melbourne subjects解锁完整 COMP90038 Bible + University of Melbourne 24 门科目
$25/mo