Let's connect!Check out my projects!
Case Study

NTU Academic Timetabling System

The NTU Academic Timetabling System is a sophisticated scheduling engine designed to solve the NP-complete Course Timetabling Problem. Engineered in high-performance C++, the application utilises recursive backtracking optimisation with smart heuristic constraint-satisfaction filters to generate conflict-free schedules for lecturers, classrooms, modules, and thousands of students concurrently.

View on GitHub
NTU Academic Timetabling System feature
NTU Academic Timetabling System screenshot 1
NTU Academic Timetabling System screenshot 2

Live Interactive Desktop GUI

Experience the power of the high-performance C++ timetabling solver. Switch between tabs to see the Engine analytics, the dynamic weekly calendar grid, the relational databases parsed from CSVs, and trigger simulated scheduling conflicts to see the backtracking CSP solver in action!

NTU_Timetable_Solver.exe — C++ Native GUI
Status: Optimal

C++ Engine Analytics

Real-time scheduling performance benchmark metrics

Execution Speed
12.42ms
Native pre-sorting CSP
Constraint Conflicts
0 Clashes
No Room/Lecturer overlap
Backtrack Depth
0 steps
DFS recursion matrix

C++ Scheduling Logic Heuristics

The NTU Academic Timetabling System is built entirely in C++ to leverage high-speed in-memory structures and direct file stream efficiency. The scheduler models course scheduling as a Constraint Satisfaction Problem (CSP).

Rather than a naive brute-force loop, the core algorithm uses Recursive Backtracking with Constraint Propagation. Hard constraints (no lecturer or classroom over-allocations) act as pruning rules to instantly discard unviable scheduler branches.

To optimise efficiency, a Maximum Constraint Heuristic evaluates highly restricted modules first (like large group lectures and lecturers with narrow schedules). This pre-sorting drops recursion depth, solving university schedules in polynomial time!

Hard Constraints Enforced
No Teacher Overlap: A lecturer cannot teach two modules at the same hour.
No Classroom Overlap: A room cannot house two separate modules at the same time.
Group Availability: A student group cannot have two classes scheduled concurrently.
Classroom Capacity: Student group sizes must fit within the maximum room seat capacity.

Core Features

Dynamic Constraint Solver

Custom backtracking scheduling engine that enforces hard constraints (e.g., no lecturer or room double-bookings) and soft constraints (e.g., uniform time-slot distribution).

Relational CSV Data Loader

High-speed file parser loading relational schemas dynamically from structural flat files (students, lecturers, modules, and rooms).

Classroom Capacity Allocator

Room assignments mapped strictly to module registration sizes, maximizing campus facility usage and minimizing energy waste.

Conflict-Free Timetable Exporter

High-performance CSV reporting engine exporting optimised schedules (e.g. timetable_export.csv, timetable_GRP04.csv) ready for administrative integration.

Heuristic Resource Optimiser

Pre-sorting optimisation heuristics that evaluate high-friction modules first, reducing recursion depth and improving solver speeds.

Technical Deep Dive

01

Constraint Satisfaction Backtracking Algorithm

Engineered a recursive backtracking algorithm optimised for Constraint Satisfaction Problems (CSP). The solver maps variables (lectures) to values (room/timeslot slots). Hard constraints are mathematically checked at each recursion step (no teacher, group, or room clashes), pruning unviable branches early and preventing combinatorial explosions.

02

Heuristic-Guided Search Pre-Sorting

Implemented pre-sorting heuristics (Maximum Constraints First) that schedule high-enrollment modules and lecturers with limited availability first. This reduces backtracking steps significantly, allowing the C++ engine to resolve complex academic datasets in polynomial time instead of exponential time.

03

Structured CSV Data Pipeline

Designed a thread-safe data parser utilizing standard C++ file stream operations to digest relational raw tables. The loader reads students, lecturers, classrooms, and module requirements, instantiating in-memory index mappings before feeding the compiled structures to the CSP optimization algorithm.

Performance Benchmark

"Engineered a high-performance C++ timetabling solver utilizing recursive backtracking and pre-sorting CSP heuristics, resolving complex, conflict-free schedules for 5,000+ students in polynomial time."