REA1121 - Mathematics for Programming


Examination arrangement

Examination arrangement: Written examination

Evaluation form Weighting Duration Examination aids Grade deviation
Written examination 100/100 5 hours A

Course content

- Logic puzzles
- Solving logic puzzles by programming
- Bitwise logic

- Elementary probability and enumeration
- Conditional probability
- Random variables
- Modelling using Markov chains
- Expectation and variance
- Programming simulations

Mathematics for 3d-graphics
- Trigonometry and vector algebra
- Linear transformations in 3d
- Complex numbers and quaternions

Introduction to Functional Programming 
- Functional programming concepts
- Introduction to functional programming in C++
- Lazy data structures in C++
- Automatic differentiation

A selection of applications
- Implementation of the A*-algorithm for pathfinding
- Noise and procedural generation
- Flocking behaviour

Mechanics for games/applications
- Differentiation and integration
- Newtonian mechanics
- Numerical solution of the equations of motion
- Elastic and inelastic collisions
- Inverse kinematics
- Particle systems

Learning outcome

After completing the subject the students should have knowledge of:
- Applications of mathematical logic in programming
- Algorithms for pathfinding
- Functional programming
- Elementary mechanics for games/applications
- The role of mathematics in software development

Skills in:
- Programming in logic and functional paradigms 
- Creating pathfinding solutions
- Constructing and analysing Markov Chain models
- Turning mathematical descriptions into programming code

General competence of:
- General logical and mathematical reasoning
- Problems solving and rigorous descriptions of solutions
- General programming ability
- Communication in written and spoken English

Learning methods and activities

Lectures, assignments

Up to 5 compulsory assignments

Compulsory assignments

  • Obligatoriske arbeidskrav

Further on evaluation

Re-sit of written exam in August.

Specific conditions

Exam registration requires that class registration is approved in the same semester. Compulsory activities from previous semester may be approved by the department.

Admission to a programme of study is required:
Bachelor of Game Programming (BSP)
Computer Science (ÅRINF)
IT Operations and Information Security (BITSEC)
Programming (BPROG)

Course materials

Handouts and internet resources.

More on the course



Version: 1
Credits:  10.0 SP
Study level: Foundation courses, level I


Term no.: 1
Teaching semester:  SPRING 2019

No.of lecture hours: 6
Lab hours: 2
No.of specialization hours: 70

Language of instruction: English

Location: Gjøvik

Subject area(s)


Contact information
Course coordinator:

Department with academic responsibility
Department of Mathematical Sciences



Examination arrangement: Written examination

Term Status code Evaluation form Weighting Examination aids Date Time Digital exam Room *
Summer UTS Written examination 100/100 A
Room Building Number of candidates
Spring ORD Written examination 100/100 A 2019-05-16 09:00
Room Building Number of candidates
A154, 1.etg. Ametyst 0
A254, 2.etg. Ametyst 0
A-atriet-2/3 (A-160) Ametyst 0
  • * The location (room) for a written examination is published 3 days before examination date. If more than one room is listed, you will find your room at Studentweb.

For more information regarding registration for examination and examination procedures, see "Innsida - Exams"

More on examinations at NTNU