Choose one pathway
Each student must complete either the one-week practical assignment or attend both Lab Class 09 and Lab Class 10. Students choosing the laboratory-class pathway must attend both classes.
Complete the large-scale IoV/UAV shortest-path assignment and submit it by the stated deadline.
Attend both laboratory classes. Complete the three Lab 09 questions below and the seven Lab 10 questions.
Lab Class 09: In-Class Programming Questions
Students choosing the lab-class pathway must attend both Lab Class 09 and Lab Class 10. Implement all three programs below during Lab Class 09.
- Implement Dijkstra’s Algorithm.
- Implement Prim’s Algorithm for finding the Minimum Spanning Tree (MST) using a min-heap.
- Implement Prim’s Algorithm for finding the MST using an array.
Shortest-Path Planning in a Large-Scale IoV/UAV Mobility Network
Objective: Study the practical performance of shortest-path algorithms on a realistic large-scale mobility network. Identify a suitable publicly available dataset related to Internet of Vehicles (IoV), vehicular mobility, UAV mobility, road networks, or a similar moving-network scenario; model it as a weighted graph; and analyze shortest-path performance on graphs of different sizes.
Problem Statement
Consider a mobility network represented as a weighted graph:
- V represents locations, intersections, waypoints, or mobility nodes.
- E represents feasible movements between locations.
- Each edge (u, v) has a positive weight w(u, v), representing distance, travel time, or another meaningful movement cost.
Your task is to determine the shortest path between a given source location S and destination location D.
Part A: Dataset Selection
Identify a suitable publicly available real-world or realistic dataset that can be used to formulate the shortest-path problem. It may relate to vehicular mobility/IoV, urban road networks, UAV mobility or waypoints, traffic networks, transportation networks, or another suitable mobility scenario.
The dataset must be sufficiently large to permit meaningful algorithmic performance analysis. Clearly report:
- dataset name;
- source or URL;
- brief description of the dataset;
- number of records, nodes, and edges used;
- how the dataset is converted into a graph;
- what each vertex represents;
- what each edge represents;
- what edge weight is used;
- why the selected dataset is suitable for this problem.
Choosing and justifying an appropriate dataset is part of the assignment. Do not use a small manually created graph as the primary dataset.
Part B: Graph Construction
Preprocess the selected dataset and construct the corresponding weighted graph using an adjacency-list representation.
After constructing the graph, report:
- number of vertices;
- number of edges;
- average degree;
- maximum degree.
If the original dataset contains additional information that is not required for shortest-path computation, extract only the relevant information needed to construct the graph.
Part C: Dijkstra's Algorithm
Implement Dijkstra's shortest-path algorithm using a min-priority queue. For a given source S and destination D, report:
- shortest-path cost;
- complete sequence of vertices in the shortest path;
- number of vertices explored;
- number of edges examined;
- execution time.
Built-in shortest-path implementations from graph-processing libraries are not permitted. Also state and explain the theoretical time complexity of your implementation.
Part D: A* Algorithm
Implement the A* shortest-path algorithm for the same graph. For a vertex v, evaluate:
Here, g(v) is the cost from the source to v, and h(v) is a heuristic estimate of the cost from v to the destination.
If positional coordinates are available, an appropriate distance-based heuristic may be used. Justify the selected heuristic and discuss whether it is admissible. Report the same performance metrics as for Dijkstra's algorithm.
Part E: Experimental Evaluation
Perform experiments using multiple graph sizes obtained from the selected dataset. Suggested graph sizes are approximately:
For each graph size, use multiple source-destination pairs. Record results in a table similar to the following:
| Graph Size | Algorithm | Shortest-Path Cost | Vertices Explored | Edges Examined | Execution Time |
|---|---|---|---|---|---|
| — | Dijkstra | — | — | — | — |
| — | A* | — | — | — | — |
Use at least five different source-destination pairs for each selected graph size and report average performance over the selected queries.
Part F: Analysis
- Why is the dataset you selected suitable for shortest-path analysis?
- How did you transform the raw dataset into a weighted graph?
- Do Dijkstra's algorithm and A* produce the same optimal path cost in your experiments? Explain.
- Which algorithm explores fewer vertices, and why?
- How does execution time vary as the graph size increases?
- Explain the effect of the graph's density on shortest-path computation.
- What is the theoretical time complexity of your Dijkstra implementation?
- What heuristic did you use for A*? Is it admissible and/or consistent? Justify your answer.
- What difficulties did you face while converting the real-world dataset into a graph?
- Based on your observations, which algorithm would you recommend for large-scale IoV/UAV route planning? Justify your answer.
Bonus Task: Dynamic Edge Costs
Real mobility networks are dynamic. Travel cost may change due to congestion, link quality, weather, or other factors. Define an edge cost such as:
- d(u, v) represents distance;
- c(u, v) represents another dynamic cost such as congestion or delay;
- α and β are weighting parameters.
Modify selected edge weights and recompute the shortest path. Compare the new route with the original route and discuss the effect of changing network conditions.
Implementation Requirements
- Students must independently identify a suitable dataset.
- The selected dataset must be publicly available and properly cited.
- The graph must be represented using an adjacency list.
- Dijkstra's algorithm must use a min-priority queue.
- A* must be implemented independently.
- Built-in shortest-path implementations are not permitted.
- Path reconstruction must be implemented explicitly.
- The implementation must handle disconnected source-destination pairs appropriately.
- Dataset preprocessing steps must be clearly documented.
- All experiments must be reproducible.
Submission
Submit the following:
- source code;
- dataset source/reference;
- preprocessing details;
- README with execution instructions;
- experimental results;
- plots comparing the algorithms;
- a short report containing observations and answers to Part F.
Place all files in a single folder and compress it into a .zip or .rar archive. Name the compressed file admission_number.zip or admission_number.rar, replacing admission_number with your admission number.