This is the repository for the Algorithms and Data Structures II course, offered by the Department of Computer Engineering and Automation (DCA) of the Technology Center (CT) at the Federal University of Rio Grande do Norte (UFRN).
The DCA aims to train professionals capable of designing and developing computer systems for industrial automation, embedded systems, software systems, distributed systems, computer networks, and information systems. The CT offers undergraduate and graduate courses in Engineering. This course is part of the curriculum of the Computer Engineering program at DCA/UFRN.
| Tool | Link |
|---|---|
| 😃 Networkx | networkx.org |
| ⚙️ Gephi | gephi.org |
| 🚀 OSMnx | github.com/gboeing/osmnx |
| 💾 Dataset | snap.stanford.edu/data |
Week 01
Course Outline: Provides an overview of the course structure and topics covered.
- 🎉 GitHub Education Benefits
- GitHub Education Pro: Get access to the GitHub Education Pro pack by visiting GitHub Education
- 📖 Learning Resources
- GitHub Learning Game: Check out the interactive Git learning game at GitHub Learning Game
- Basic Python: Enhance your Python skills through the Kaggle Python course.
- 🎉 GitHub Education Benefits
Network Fundamentals I: ntroduction to network science, including its scope, real-world applications, mathematical foundations, and core concepts from graph theory.
Network elements using networkx tool.
- 📚 Further reading: Chapters 2, 3, 6, and 7 of The Atlas For The Aspiring Network Scientist.
Week 02
Network Fundamentals II: Probability, extended graphs, matrices, degree and representation.
Extended graphs and representation using networkx tool.
- 📚 Further reading: chapters 7, 8, 9 of the book The Atlas For The Aspiring Network Scientist.
Week 03
Small-World Networks: This week introduces fundamental concepts in network science, including small-world phenomena. The lecture explores how these properties influence the structure and dynamics of real-world networks.
- In this case study, you will construct and analyze a real-world network derived from Wikipedia pages using a snowball sampling approach.
- Build a graph from Wikipedia pages starting from a seed node
- Collect data through a snowballing (BFS-like) exploration process
- Clean the dataset by truncating expansion depth and removing duplicates
- Explore structural properties of the resulting network (e.g., degree distribution, connectivity)
Wikipedia Pages Network Notebook
Small World: Paths, Distances, Connected Components, Clustering Coefficient, Friends of Friends
Week 04
- Project 01
Week 05
Hubs: key centrality metrics and illustrative case studies.
- Eccentricity, Diameter, Periphery, Radius, and Center
- Degree, Closeness, Betweenness, and Eigenvector Centrality
- Centrality distributions and interpretation
Hands on: practical exploration of centrality measures
Week 06
Hubs: key centrality metrics continuation
- Core decomposition and its relevance
Hands on: core decomposition
- Gephi: The Open Graph Viz Platform
- Graph GeoSpatial Data Science (2GDS)
- osmnx - OpenStreetMaps Network X
- First read the Getting Started guide for an introduction to the package and FAQ.
- Then work through the Examples Gallery for step-by-step tutorials and sample code.
- osmnx - OpenStreetMaps Network X
- Advanced steps (optional)
- City2Graph - Transform geospatial relations into graphs for Graph Neural Networks and network analysis
- LLM Knowledge Bases Karpathy's idea about using LLMs to build personal knowledge bases.
- Graphify - AI coding assistant skill
Week 07
Week 08
Classical Algorithms: Dijsktra: Shortest path algorithm
Heap Structures and Time Complexity: This lesson explores Min-Heap data structures, focusing on their array representation and the behavior of the main operations such as insert, remove, and peek.
- Topics covered include:
- Properties of a Min-Heap and array-based implementation
- Understanding parent and child index calculations
- Explanation of
siftDownandsiftUpmechanisms - Efficient heap construction from unsorted arrays using
buildHeap
MinHeap Implementation and Testing: Interactive Jupyter Notebook that includes the full implementation of a Min-Heap class in Python, along with detailed unit tests to validate correctness and ensure that the min-heap property is preserved after each operation.
: Min-Heap: an implementation of Dijkstra's algorithm using a min-heap, with and without path reconstruction.
- Topics covered include:
Week 09
A* Algorithm: Introduction to the A* algorithm, combining Dijkstra's search with heuristic-based guidance. Key concepts:
- Combines Dijkstra (guarantees cheapest path) and Greedy search (guides exploration).
- Heuristics:
- Euclidean: for local planar maps.
- Great-circle: for large geographical distances.
- Manhattan: for grid-like networks.
- A* process:
- Start at source node.
- For each neighbor, compute:
- ( g ): actual cost
- ( h ): heuristic estimate
- ( f = g + h )
- Use priority queue (lowest ( f ) first)
- Repeat until reaching the goal
- Visual flow:
Start → [g + h] → expand node → update queue → repeat → Goal
A* Implementation: Jupyter Notebook with A* implementation using NetworkX and OSMnx, applying different heuristics to real urban graphs.
