Auckland · COMPSCI120 · Mathematics for Computer Science

COMPSCI120: pass the exams, not just read the notes

Your complete guide to University of Auckland's mathematics for computer science course. See where the marks are, work real practice questions, and study with an AI tutor that knows COMPSCI120.

15 credit points Stage 1 undergrad Offered Summer / S1 / S2 ~50% exams School of Computer Science

Sia generates COMPSCI120 practice questions, walks through integers and modular arithmetic step by step, and quizzes you on the material the exam weights most heavily.

Try a real exam-style question

Worked example

Multiple choice · solution revealed after you answer

Prove or disprove: for every integer n, n squared plus n is even. Which argument is a correct proof?

Worked solution

Factor: n squared plus n equals n(n+1), the product of two consecutive integers.

Argue by cases on parity. If n is even, the product has an even factor. If n is odd, n+1 is even, so again the product has an even factor.
Conclude: in both cases n(n+1) is even, so n squared plus n is even for every integer n. This is a direct proof by cases.
Reject the alternatives. Option B checks examples, which proves nothing for 'every integer'. Option C assumes the conclusion. Option D forgets that n odd makes n+1 even, so the sum n squared plus n is odd plus odd, which is even.

The trap: Treating a list of checked cases as a proof, or assuming the claim in order to prove it. The course marks the structure of the argument, and both errors score zero regardless of whether the claim is true. classic slip!

your whole grade
Where your grade comes from Exams 50% · Test 40% · Coursework 9% · Quizzes 1%

One exam decides 50% of your grade. Test + exam: at least 44.55 of 90 points required. This whole page is built around that.

Overview

What COMPSCI120 is, and where it sits

COMPSCI 120 is the University of Auckland's discrete mathematics course for the Computer Science major and the foundation for COMPSCI 220, COMPSCI 225 and the later algorithms, machine learning and theory courses. The catalogue frames it around one idea — mathematical proof — and warns that the course will feel different from most others because it cares as much about how an argument is formed as about the answer.

The published key topics are integers, primes, divisibility and modular arithmetic; sets and strings; the basics of combinatorics and probability; algorithms and their running time, functions and limit techniques; an introduction to graph theory; and the proof methods themselves — direct, by cases, by contradiction, by construction and by induction. The four learning outcomes run from reading and writing mathematical notation through modelling tasks as algorithms to proving the correctness of a simple algorithm.

Assessment is 100 points: 50 for the final exam, 40 for two tests, and 10 for tutorials, written assignments and a diagnostic quiz. Passing needs at least 49.5 points overall and at least 44.55 of the 90 points across tests and exam. Tutorials are unrecorded and attendance is required for credit. The course runs in Summer Semester, Semester One and Semester Two at the City campus.

How it differs from its first-year siblings. COMPSCI 120 is the course where 'it works on my examples' stops being an argument. You will be asked to prove that an algorithm is correct, and the proof — not the code — is what the tests and exam mark.

Always treat your own course outline and the exam timetable as authoritative.

Difficulty & time commitment

Is COMPSCI120 hard, and how much time does it take?

COMPSCI120 is manageable if you keep a weekly rhythm and treat the back half as the main event. The pattern is consistent: it starts gently and steepens, and the heaviest assessment is the part that separates grades.

Difficulty
3.4 / 5
Moderately hard. Gentle early, demanding back half. Hard to fail with steady work; a top grade takes consistent practice.
Exam load
50%
The exams decide most of the grade. The heaviest single component is 50%.
Weekly time
~10 hrs
Around 10 hours per week including class, across lectures, study and assessment.
Integers, modular arithmetic, sets and strings, direct proofssteady
Induction, counting, probability, functions and running timesteep
Graph theory and proof by contradiction and constructionsteep

The difficulty curve and the assessment weighting point the same way: the back half is harder and worth more. Front-loading effort there is the highest-return decision in the course.

Is this course for you

Who tends to do well, and who tends to struggle

You will likely do well if

  • You enjoy being asked why something is true, not just whether it is.
  • You write proofs out in full sentences and check every step follows.
  • You attend the weekly tutorial and do the problems there, where the proof habits form.
  • You treat the two tests as the exam in miniature, because they carry 40 points.

You may struggle if

  • You expect a programming course; this one is mathematics about programs.
  • You verify claims with examples instead of arguments — the marks are for the argument.
  • You skip induction because it feels mechanical; it is the technique the correctness outcome is built on.
  • You lean on the 10 coursework points; the pass rule sits on the other 90.
do this ↘
What top students do differently
  • For every theorem in the course book, cover the proof and reconstruct it before reading it.
  • Practise the five proof methods on the same statement where possible, so you can choose the right one under time.
  • Write inductive proofs with the base case, the hypothesis and the step labelled every time.
  • For graph and counting questions, draw the object first and name what you are counting before computing.

Syllabus

The 12 topics, topic by topic

The exam-weight marker on each topic shows where the marks concentrate. The amber topics carry the highest exam weight.

1

T1 · Integers, primes and divisibility

Key topics

Divisibility, primes and the division algorithm as the first objects to reason about.

High exam weightQuiz me on integers →
2

T2 · Modular arithmetic

Key topics

Congruences and arithmetic mod n, the working example for many proofs.

3

T3 · Sets and strings

Key topics; learning outcome 1

Set notation and operations; strings as the objects programs manipulate.

High exam weightQuiz me on sets →
4

T4 · Direct proof and proof by cases

Key topics: methods of proof

Building an argument from definitions; splitting into exhaustive cases.

5

T5 · Proof by contradiction and by construction

Key topics: methods of proof

Assuming the negation; exhibiting an object that satisfies a claim.

6

T6 · Proof by induction

Key topics: methods of proof; learning outcome 4

Base case, inductive step, and inductive proofs of algorithm correctness.

7

T7 · Formal logic

Learning outcome 4

Statements, truth tables and validity, the tools for judging an argument.

8

T8 · Combinatorics

Key topics; learning outcome 3

Counting arrangements and selections in easy real-life settings.

9

T9 · Probability

Key topics; learning outcome 3

Basic probability and the expectation of a discrete random variable.

10

T10 · Functions and algorithms

Key topics; learning outcome 2

Functions as mathematical objects; translating tasks into algorithms.

High exam weightQuiz me on functions →
11

T11 · Running time and limit techniques

Key topics

Comparing growth rates and reasoning about running time.

12

T12 · Graph theory

Key topics; learning outcome 2

Vertices, edges, paths and trees as models for real-life tasks.

How it's assessed

Assessment structure

ComponentWeightFormat & timing
Assignments4%Written assignments. Across the semester. Individual coursework.
Diagnostic Quiz1%Diagnostic quiz. Start of semester. Individual coursework.
Tutorials5%Weekly tutorials; attendance required to receive credit. Weekly. Group and individual coursework.
Final Exam50%Final examination, on campus. Examination period. Test + exam: at least 44.55 of 90 points required.
Tests40%Two tests, on campus, 20 points each. Across the semester. Test + exam: at least 44.55 of 90 points required.
Assignments4%
Written assignments.
Diagnostic Quiz1%
Diagnostic quiz.
Tutorials5%
Weekly tutorials; attendance required to receive credit.
Final Exam50%
Final examination, on campus.
Tests40%
Two tests, on campus, 20 points each.
  • Two conditions: at least 49.5 of the 100 points overall, AND at least 44.55 of the 90 points available for the tests plus the final examination. Tutorial, assignment and quiz points cannot lift a test-plus-exam total under that line.
  • Ninety of the hundred points are two on-campus tests (20 each) and a 50-point exam, all marked on the quality of the argument. The 10 coursework points reward attendance and practice rather than carrying the grade.
read this! If you read nothing else

This is an exam-cram course. With the exams at 50% of the grade and the final exam alone at 50%, your result is overwhelmingly decided by how well you perform under time pressure. Test + exam: at least 44.55 of 90 points required.

Final exam timing: During the examination period. Confirm the exact date and venue on your exam timetable.

How to actually pass it

A weekly rhythm, two checklists, and the traps to avoid

The course rewards consistency over cramming, and practice over re-reading. Here is the loop that works, then what to have nailed before each exam.

The weekly loop

Before the tutorial
Attempt the tutorial problems alone; attendance is required and the discussion is where proofs get corrected.
After each lecture
Rewrite one proof from the lecture from memory, in full sentences.
Weekly
Submit the assignment; the points are small but the practice is the test preparation.
Before each test
Work past-style problems under time, on paper, without notes — the tests are on campus.

Before the mid-semester checklist

  • Read and write basic notation for numbers, sets, functions and strings.
  • Prove a divisibility or modular-arithmetic statement directly and by cases.
  • Construct a proof by contradiction.
  • Write a correct inductive proof.

Before the final heaviest topics

  • Count arrangements and selections and compute a discrete expectation.
  • Determine the validity of a logical statement by truth table.
  • Model a task with functions, trees or graphs and reason about running time.
  • Prove the correctness of a simple algorithm.

The mistakes that cost marks

01

Examples offered as proof. Checking a claim for n = 1, 2, 3 proves nothing. The course exists to break this habit.

02

Induction without a stated hypothesis. The inductive step must say what is assumed; markers look for it explicitly.

03

Assuming what is to be proved. Circular arguments are the most common way a proof scores zero.

Formula & concept sheet

The vocabulary and formulas you must own

Divisibility
a divides b when b is an integer multiple of a; the basic relation of number theory.
Modular arithmetic
Arithmetic on remainders after division by n.
Set
A collection of distinct objects, manipulated with union, intersection and complement.
String
A finite sequence of symbols over an alphabet.
Direct proof
An argument from definitions and known results straight to the conclusion.
Proof by contradiction
Assuming the negation of the claim and deriving an impossibility.
Proof by induction
Proving a base case and that each case implies the next.
Truth table
A tabulation of a compound statement's truth value for every assignment of its variables.
Combination
A selection of items where order does not matter.
Expectation
The probability-weighted average of a discrete random variable.
Graph
A set of vertices joined by edges; a tree is a connected graph with no cycles.
Running time
How the number of steps an algorithm takes grows with input size.

Set texts

The prescribed reading

The syllabus references map straight onto these.

COMPSCI 120 course book

.

Where it fits

Prerequisites, related courses & why it matters

Prerequisite: MATHS 102, or at least 13 credits in NCEA Level 3 Mathematics, or D in CIE A2 Mathematics, or C in CIE AS Mathematics, or 3 out of 7 in IB Mathematics. Restriction: COMPSCI 225, MATHS 254. COMPSCI 120 is 15 points at Stage 1, core to the Computer Science major, offered in Summer Semester, Semester One and Semester Two at the City campus.

Why it matters beyond the grade. Proof, counting, probability and graphs are the language of algorithms, cryptography, machine learning and theoretical computer science. This course is where Computer Science students learn to argue that software is correct rather than that it seems to work.

FAQ

Frequently asked questions

Is COMPSCI 120 hard?

It rates moderately hard. Proof-based mathematics is a genuine step for most first-year students, 90% of the marks are tests and exam, and the pass rule requires 49.5% on that component as well as overall.

What is the assessment breakdown?

Assignments 4%, diagnostic quiz 1%, tutorials 5%, two tests totalling 40% and a final exam 50%, per the catalogue page. You need at least 49.5 points overall and at least 44.55 of the 90 test-plus-exam points.

What are the prerequisites?

MATHS 102, or at least 13 credits in NCEA Level 3 Mathematics, or D in CIE A2 Mathematics, or C in CIE AS Mathematics, or 3 out of 7 in IB Mathematics. It cannot be taken with or after COMPSCI 225 or MATHS 254.

Is programming involved?

The course is mathematics. It models tasks as algorithms and proves things about them, but the published outcomes are about notation, modelling, counting, probability, logic and proof, not writing code.

Are tutorials compulsory?

Attendance at tutorials is required to receive credit for that component (5%). Tutorials are not recorded.

What does it lead to?

COMPSCI 220 and COMPSCI 225, and the advanced courses on algorithms, machine learning and theoretical computer science that the catalogue names.

Study COMPSCI120 with Sia

Work through integers, modular arithmetic, sets and the rest of the course with a tutor that knows it and quizzes you on the topics the assessments weight most heavily.

Start studying with Sia