Algorithmic programming

Što ćeš naučiti?

How does Google Maps know the shortest way to Grandma's?

Why does a mobile find a song in an instant, while I spend half an hour searching a list?

Can I simply try every possibility, and how long would that take?

How do I know that my solution always works, and not only on this example?

What is the chance that I draw exactly that card?

The module develops general problem-solving and logical thinking through algorithmic and competitive programming, from the first steps in Logo to Python and C++ preparation for school and international contests. As well as programming skills, participants in the programme regularly work on the mathematical skills necessary for a high level of knowledge and for success in contests.

Key facts

  • Age:
    • Programming: For younger and older primary-school pupils, and secondary-school pupils
    • Mathematics: older primary-school pupils and secondary-school pupils
  • Focus:
    • Programming: programming and algorithms; contests optional
    • Mathematics: logic, number theory, combinatorics, graphs
  • Prerequisite:
    • Programming: Digital literacy (recommended)
    • Mathematics: basic programming
  • Ministry of Science and Education (MZO) domain: B
  • Infokup: Algorithms (competitive), Algorithms (support)
  • Scope: 2 sets of learning outcomes from the curriculum, 79 topics
  • Progression: groups by level of knowledge, not by age

Module aims

Algorithmic programming

  • write a first visible program and a small game
  • use variables, loops and functions in code
  • solve an algorithmic problem and estimate complexity
  • (optional) compete at Infokup and HONI

Mathematics for informatics

  • prove a statement (induction, contradiction)
  • apply modular arithmetic
  • count (combinatorics, inclusion-exclusion)
  • connect mathematics with algorithms

Learning outcomes

Algorithmic programming. The participant solves an algorithmic problem, estimates the complexity of the solution and proves correctness on the given tests.

Mathematics for informatics. The participant proves a simple statement by mathematical induction and applies modular arithmetic in an algorithmic task.

MZO outcomes (NN 22/2018)

Outcomes are mapped to the Informatics curriculum from the Official Gazette (Narodne novine) 22/2018. Codes are unique only within a track, so the track is stated with each code (OŠ – primary school, gimn – grammar school, PMG – science and mathematics grammar school).

  • Algorithmic programming: B.7.1, B.8.2, B.8.3 (OŠ); B.3.5, B.4.2.a (PMG)
  • Mathematics for informatics: A.1.4, A.1.5 (gimn); B.3.5 (PMG), with a link to MZO Mathematics

Levels of mastery

Four levels describe what mastering the module means in practice. A participant progresses by level, not by age.

Algorithmic programming

  • satisfactory: solves a simple task with a ready-made example
  • good: independently solves a standard task and explains it
  • very good: estimates complexity and chooses a suitable algorithm
  • exceptional: solves a contest/Olympiad set and proves correctness

Mathematics for informatics

  • satisfactory: follows a given proof and applies a formula
  • good: independently proves a simple statement (induction)
  • very good: connects a technique with an algorithm and estimates complexity
  • exceptional: proves a non-trivial result and applies it to a new problem

Breakdown

The breakdown is organised by sets of learning outcomes and levels of knowledge. A participant enrols at the level they have reached, regardless of age. Click a topic for an explanation of what it covers.

Algorithmic programming

51 topics · For younger and older primary-school pupils, and secondary-school pupils

Foundation level - USACO Bronze

complexity (Big-O)

estimating how fast or slow an algorithm is (big-O notation)

arrays

arrays: storing and processing a sequence of values

simulation

step-by-step execution of the rules of the task in code

complete search

brute force - try every possibility

sorting

putting data in order, and why that helps

sets and maps

set and dictionary: fast searching and counting

introduction to the greedy approach

a greedy approach - choose the locally best option

introduction to graphs

nodes and edges: how to represent a network/connections

Intermediate level - USACO Silver

prefix sums

fast summation of a range using precomputed sums

two pointers

two pointers - two indices that walk through an array

binary search (and on the answer)

halving the range; searching for the smallest valid answer

priority queues

priority queue/heap - always extract the smallest or the largest

BFS/DFS

traversing a graph breadth-first and depth-first

flood fill

colouring a connected region (like the ‘bucket’ in painting)

introduction to trees

a tree - a graph with no cycles, a root and children

bitwise operations

working with bits (AND, OR, XOR, shifts)

Advanced level - USACO Gold

dynamic programming

DP - break the problem into subproblems and remember the solutions

bitmask DP

DP over subsets represented by bits

range DP

DP over every subinterval of an array

digit DP

counting numbers in a range with some property, digit by digit

number theory

prime numbers, divisibility, modular arithmetic

Dijkstra

the shortest path in a graph with edge weights

MST

minimum spanning tree - the cheapest way to connect everything

DSU (union-find)

a structure for merging sets and checking membership

topological sorting

an ordering of tasks that respects dependencies

Fenwick/BIT

a binary indexed tree for fast sums and updates

Euler tour

flattening a tree into an array for queries on subtrees

LCA

the lowest common ancestor of two nodes in a tree

DP on a tree

dynamic programming over the structure of a tree

polynomial hashing

fast comparison of strings/substrings via hash values

Olympiad level - USACO Platinum / IOI syllabus

geometric primitives

vectors, the cross product, orientation - the foundation of geometry

segment trees (lazy)

a segment tree with lazy propagation for range updates

sparse and 2D segment trees

segment trees for large/sparse and 2D ranges

sqrt decomposition

splitting into blocks of about √n for faster queries

binary lifting

jumps by powers of two - the k-th ancestor and LCA

HLD

heavy-light decomposition of a tree for queries along a path

centroid decomposition

recursive splitting of a tree by its centroid

small-to-large merging (DSU on a tree)

small-to-large: efficient queries on subtrees

subset DP (SOS)

sum-over-subsets - DP over all subsets

divide-and-conquer DP

DP optimisation by splitting (divide & conquer)

convex hull trick

convex hull trick / Li Chao for DP optimisation

sweep line

a moving line that processes events in order

convex hull

convex hull - the smallest enclosure of a set of points

inclusion-exclusion

inclusion-exclusion in counting

maximum flow

max-flow - the greatest possible flow through a network

matching

matching - pairing in a (bipartite) graph

Above the IOI syllabus - CEOI / Codeforces / university

string algorithms (KMP, suffix array, Aho-Corasick)

advanced pattern search in text (above the IOI syllabus)

FFT/NTT (polynomial multiplication)

a fast transform for multiplying polynomials (above the IOI syllabus)

game theory (Sprague-Grundy, Nim)

winning/losing positions and Grundy numbers (above the IOI syllabus)

efficient flows (Dinic, MCMF)

fast maximum flow and minimum-cost flow (above the IOI syllabus)

persistent structures

structures that remember past states (versions over time)

Mathematics for informatics

28 topics · older primary-school pupils and secondary-school pupils

Foundation level

logic and proof

statements, implications, and what a valid proof looks like

sets, relations, functions

the basic mathematical language for everything else

relations and partial orders

relations, equivalences, and partial orders

GCD/Euclid

the greatest common divisor by Euclid’s algorithm

modular arithmetic

calculating with remainders (like a clock, ‘mod n’)

combinatorics

counting - how many possibilities there are

counting rules and bijections

the sum and product rules, and proof by bijection

Boolean algebra

true/false logic: AND, OR, NOT

Intermediate level

strong and structural induction

proof by induction, including on a structure

invariants and states

a quantity that does not change - the key to a proof

recurrences

solving recurrence relations (e.g. T(n))

linear recurrences

solving linear recurrence sequences

asymptotics (Master theorem)

estimating growth and the Master theorem (divide and conquer)

congruences and modular exponentiation

equations modulo n and fast exponentiation

pigeonhole

Dirichlet’s principle - more pigeons than holes

inclusion-exclusion

inclusion-exclusion in counting

graph theory

properties of graphs: degrees, connectivity, colouring

introduction to probability

chances, events, and the basic rules

conditional probability and Bayes

conditional probability, independence, and Bayes’ theorem

Advanced level

generating functions

generating functions for counting and recurrences

CRT and the modular inverse

the Chinese remainder theorem and division modulo n

number theory (Fermat/Euler, RSA)

Fermat’s little theorem, Euler’s theorem, φ and the idea of RSA

expectation and variance

the mean and the spread of a random variable

concentration inequalities (Markov, Chebyshev, Chernoff)

how far a random variable deviates from its expectation

random walks

a random walk and its properties

matrix exponentiation

fast computation of sequences via matrices

a proof-based approach to graphs (Hall’s theorem, matching)

proofs about colouring, matching and Hall’s theorem

correctness proofs

a formal proof that an algorithm works correctly

Enrolment and questions → Contact

HR EN
Classic Server