Skip to content

ivanovitchm/datastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

303 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Federal University of Rio Grande do Norte

Technology Center

Department of Computer Engineering and Automation

Algorithms and Data Structure II (DCA3702)

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.

References

Tool Link
😃 Networkx networkx.org
⚙️ Gephi gephi.org
🚀 OSMnx github.com/gboeing/osmnx
💾 Dataset snap.stanford.edu/data

Lessons

Week 01

  • Open in PDF 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
  • Open in PDF Network Fundamentals I: ntroduction to network science, including its scope, real-world applications, mathematical foundations, and core concepts from graph theory.

Week 02

  • Open in PDF Network Fundamentals II: Probability, extended graphs, matrices, degree and representation.

Week 03

  • Open in PDF 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)
    • Jupyter Wikipedia Pages Network Notebook
  • Open in PDF Small World: Paths, Distances, Connected Components, Clustering Coefficient, Friends of Friends
    • Jupyter Paths, Walks and Distances
    • Jupyter Connected Components (Giant, WCC, SCC)
    • Jupyter Clustering Coeficient

Week 04

  • Project 01

Week 05

  • Open in PDF Hubs: key centrality metrics and illustrative case studies.
    • Eccentricity, Diameter, Periphery, Radius, and Center
    • Degree, Closeness, Betweenness, and Eigenvector Centrality
    • Centrality distributions and interpretation
  • Jupyter Hands on: practical exploration of centrality measures

Week 06

  • Open in PDF Hubs: key centrality metrics continuation
    • Core decomposition and its relevance
  • Jupyter Hands on: core decomposition
  • Gephi: The Open Graph Viz Platform
    • A brief overview about Gephi Open in Loom
    • Quick start Open in Loom
    • Using layouts Open in Loom
    • Node and network measures Open in Loom
    • Visualize and filtering nodes and communities Open in Loom
    • Renderize, export the network, and highlight a community Open in Loom
    • Deploy the network into an HTML page Open in Loom Open in Loom
    • Another way to publish your network to the web using Retina and Gephisto Open in Loom
  • 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.
  • 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

  • Jupyter Project 02: Structural analysis of Urban Networks using OSMnx, NetworkX and Gephi

Week 08

  • Open in PDF Classical Algorithms: Dijsktra: Shortest path algorithm
    • You will learn: a) Explain how the Dijkstra algorithm works. b) Understand the algorithm’s time complexity.
    • Ready to practice?
      • Jupyter: Dijsktra: Implement the algorithm both with and without path reconstruction.
  • Open in PDF 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 siftDown and siftUp mechanisms
      • Efficient heap construction from unsorted arrays using buildHeap
    • Jupyter 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.
    • Jupyter: Min-Heap: an implementation of Dijkstra's algorithm using a min-heap, with and without path reconstruction.

Week 09

  • Open in PDF 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:
      1. Start at source node.
      2. For each neighbor, compute:
        • ( g ): actual cost
        • ( h ): heuristic estimate
        • ( f = g + h )
      3. Use priority queue (lowest ( f ) first)
      4. Repeat until reaching the goal
    • Visual flow:
      Start → [g + h] → expand node → update queue → repeat → Goal
  • Jupyter A* Implementation: Jupyter Notebook with A* implementation using NetworkX and OSMnx, applying different heuristics to real urban graphs.

About

Repository for DCA0209, an undergraduate course about Data Structure and Algorithms

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors