A polished terminal application that plans walking routes between locations on the Dhaka International University campus. It is 100% pure C11 and runs from a single executable and a single launcher script.
| # | Name | Student ID |
|---|---|---|
| 1 | Abdullah Alif | 252-15-834 |
| 2 | MD. Musfikur Rahman | 252-15-248 |
| 3 | Irfanul Hoque Taseen | 252-15-300 |
| 4 | Tamim Mohammed Nur Syed | 252-15-938 |
DIU Smart Campus Navigator (nav_camp.c, nav_camp.exe,
run.bat).
You pick a starting location and a destination. The Navigator plans the best walking route and prints one screen with:
- Best Route — the shortest weighted walking distance.
- Fewest-Stops Route — the route with the smallest number of intermediate stops.
- Campus Walk — a depth-first traversal that visits the destination.
- Route Verified — a second engine cross-checks the shortest distance; the two engines agree on every route on the campus graph.
- Route Summary — a one-glance comparison.
You can then open Route Analysis to compare two routes and to inspect the pattern of segment distances.
| Feature | Page |
|---|---|
| Plan a route | [1] Start Navigation |
| See the campus layout | [2] View Campus Map |
| Browse all 18 locations | [3] View All Locations |
| Read product info | [4] About Navigator |
| Compare two routes | post-screen → [2] Compare Routes |
| Inspect segment pattern | post-screen → [2] Compare Routes |
============================================================
DIU SMART CAMPUS NAVIGATOR
============================================================
Smart Campus Route Planning
------------------------------------------------------------
[1] Start Navigation
[2] View Campus Map
[3] View All Locations
[4] About Navigator
[0] Exit
------------------------------------------------------------
Select an option:
Algorithm names are intentionally not on the menu. The user picks where they want to go, and the engine decides which path is best.
1) [Start Navigation] <- choose [1] from the main menu
2) [Select Starting Location] <- numbered list of 18 locations
3) [Select Destination] <- numbered list, source is shown
4) [Planning Route] <- brief status screen
5) [Route Recommendations] <- single unified result page
6) Post-screen submenu:
[1] Start Another Navigation
[2] Compare Routes
[3] Return to Main Menu
[0] Exit
If the source and destination are the same, the Navigator prints You are already at <name>. No navigation is required. and does not run the engines.
[2] Compare Routes opens the Route Analysis page (see below)
without re-running the navigation engines.
The Navigator plans routes using these algorithms internally:
| Role | Algorithm | What it gives the user |
|---|---|---|
| Best route | Dijkstra | Shortest weighted walking distance |
| Fewest stops | BFS | Minimum number of hops between stops |
| Campus walk | DFS | A depth-first traversal of the graph |
| Cross-verification | Bellman-Ford | Recomputes the shortest distance |
| Route similarity | LCS | Longest common subsequence of routes |
| Segment pattern | LIS | Longest increasing pattern of segments |
Dijkstra, BFS, DFS, and Bellman-Ford are navigation primitives. LCS and LIS are analysis tools. None of the algorithm names are exposed through the menu.
Choosing [2] Compare Routes from the post-screen submenu opens the
Route Analysis page. It does not pick new routes — it
describes the routes the Navigator has already produced:
-
[LCS] Route Similarity — compares the Best Route (Dijkstra) with the Campus Walk (DFS) as integer node-ID sequences, runs the Longest-Common-Subsequence DP on them, and prints the common locations in order. If both routes happen to follow the same campus path, LCS correctly returns the full route and the page says so explicitly.
-
[LIS] Route Segment Pattern — extracts the actual edge-weight sequence of the Best Route and reports the longest strictly increasing subsequence of those segment distances. This is an analysis of the route's segment-distance pattern; it does not determine the shortest route.
LIS and LCS are analysis tools. They do not determine the shortest route.
| Locations | 18 named spots |
| Edges | 24 walking connections |
| Type | Undirected weighted graph |
| Distance | Approximate walking-path estimate (metres) |
| Walking speed | ~80 m / minute (~4.8 km/h) |
The graph is stored as an int[18][18] adjacency matrix inside
nav_camp.c. If a new walkway is added on campus, see Adding a new
path below.
| Route | Distance | Time |
|---|---|---|
| Engineering Campus ↔ Main Entrance | ~800 m | ~10 min |
| Parking Area ↔ Green Garden | ~470 m | ~6 min |
| Food Court ↔ YKSG-2 Male Hall | ~360 m | ~5 min |
| Main Entrance ↔ Food Court | ~250 m | ~3 min |
| Main Entrance ↔ Green Garden | ~250 m | ~3 min |
| DSC Lake ↔ YKSG-3 Male Hall | ~160 m | ~2 min |
These are approximate estimates, not GPS measurements.
gcc nav_camp.c -Wall -Wextra -Wpedantic -std=c11 -O2 -o nav_camp.exeRequired: 0 errors, 0 warnings. Run from PowerShell or CMD in
the project directory. run.bat does this automatically.
From PowerShell, in the project directory:
.\run.batrun.bat will:
- Switch the console to UTF-8 (
chcp 65001) so arrows and emoji render correctly. - Move to its own directory (
cd /d "%~dp0"). - Verify that
gccis onPATH. - Compile
nav_camp.cwith the strict flags above. - Stop if compilation fails (does not run an old executable).
- Print
[ OK ] BUILD SUCCESSFULand launchnav_camp.exe. - Print a short
Navigator closed.message after the application exits.
To run the executable directly:
.\nav_camp.exeDistances are approximate campus-scale walking estimates and are not GPS measurements. Edge weights are calibrated so the shortest walk from Main Entrance to the Engineering Campus is roughly 800 m (~10 minutes) at the configured walking speed. The application is for campus-scale planning; it does not replace a real map application for turn-by-turn directions.
- Distances are approximate walking-path estimates, not GPS-measured.
- The graph is undirected; one-way paths are not modelled.
- The ASCII campus map is a stylised overview; it does not show every internal walkway.
- The graph reflects only the roads visible in
campus_map.png. If a new path is added on campus, it must be added toinitialize_graph()before the Navigator will use it. - Walking speed is fixed at 80 m/min, not configurable.
- The route engine is for planning; it does not replace a real map application for turn-by-turn directions.
| File | Purpose |
|---|---|
nav_camp.c |
Pure C11 source — graph, six algorithms, unified RouteResult, UI, ASCII map, route validation. |
campus_map.png |
Reference image used to trace the campus road network. |
run.bat |
Build + launch the application (single launcher; sets UTF-8 code page). |
nav_camp.exe |
Built executable. |
README.md |
This file. |